--- src/Makefile.orig 2010-10-02 16:21:01 UTC +++ src/Makefile @@ -53,7 +53,8 @@ CONFIGURE_ARGS += --without-ntlm endif # run configure shell script -DUMMY_VAR := $(shell ./configure $(CONFIGURE_ARGS)) +DUMMY_VAR := $(shell env OPENSSLINC=$(OPENSSLINC) OPENSSLLIB=$(OPENSSLLIB) \ + ./configure $(CONFIGURE_ARGS)) # pull in variables set by configure script include configure.mk @@ -68,7 +69,7 @@ PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0` PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` -FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\ +FLAGS = -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\ ${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT LIBS = $(PKG_LIB) $(GTOP_LIBS) $(X11_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\ @@ -131,13 +132,20 @@ $(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellm endif -freebsd3 freebsd: +freebsd3 freebsd4: ifeq ($(HAVE_SSL),1) $(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat" gkrellm else $(MAKE) EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellm endif +freebsd5 freebsd6 freebsd7 freebsd8 freebsd9 freebsd: +ifeq ($(HAVE_SSL),1) + $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat" gkrellm +else + $(MAKE) EXTRAOBJS= SYS_LIBS="-ldevstat -lmd" gkrellm +endif + # Darwin target for systems that still have libkvm darwin: ifeq ($(HAVE_SSL),1) @@ -201,16 +209,16 @@ install: install_bin install_inc install_man install_bin: - $(INSTALL) -d -m $(INSTALLDIRMODE) $(INSTALLDIR) - $(INSTALL) -c $(STRIP) -m $(BINMODE) $(PACKAGE)$(BINEXT) $(INSTALLDIR)/$(PACKAGE)$(BINEXT) + $(INSTALL) -d -m $(INSTALLDIRMODE) $(DESTDIR)$(INSTALLDIR) + $(INSTALL) -c $(STRIP) -m $(BINMODE) $(PACKAGE)$(BINEXT) $(DESTDIR)$(INSTALLDIR)/$(PACKAGE)$(BINEXT) install_inc: - $(INSTALL) -d -m $(INCLUDEDIRMODE) $(INCLUDEDIR)/gkrellm2 - $(INSTALL) -c -m $(INCLUDEMODE) $(GKRELLM_INCLUDES) $(INCLUDEDIR)/gkrellm2 + $(INSTALL) -d -m $(INCLUDEDIRMODE) $(DESTDIR)$(INCLUDEDIR)/gkrellm2 + $(INSTALL) -c -m $(INCLUDEMODE) $(GKRELLM_INCLUDES) $(DESTDIR)$(INCLUDEDIR)/gkrellm2 install_man: - $(INSTALL) -d -m $(MANDIRMODE) $(MANDIR) - $(INSTALL) -c -m $(MANMODE) ../gkrellm.1 $(MANDIR)/$(PACKAGE).1 + $(INSTALL) -d -m $(MANDIRMODE) $(DESTDIR)$(MANDIR) + $(INSTALL) -c -m $(MANMODE) ../gkrellm.1 $(DESTDIR)$(MANDIR)/$(PACKAGE).1 uninstall: $(RM) $(INSTALLDIR)/$(PACKAGE)