From ba6c53aecc0ad4a5ce32e2f3e2059e9b49a89d25 Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Sat, 21 Jan 2017 18:41:04 -0500 Subject: [PATCH] Updated to support hamlib and gpsd Added PREFIX LOCALHOST defines --- Makefile.FreeBSD | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD index 432239a..8a87a8e 100644 --- a/Makefile.FreeBSD +++ b/Makefile.FreeBSD @@ -11,38 +11,47 @@ all : $(APPS) direwolf.desktop direwolf.conf @echo " sudo make install" @echo " " +# +# Freebsd usually looks for non-base install libs and include in LOCALBASE +# which is usually /usr/local +# +LOCALBASE= /usr/local +CFLAGS += -I${LOCALBASE}/include CFLAGS += -pthread -Igeotranz +LDFLAGS := -lm -lpthread -L${LOCALBASE}/lib -LDFLAGS := -lm -lpthread +# FreeBSD installs into a staging dir before generating the package +# Many other systems do similiar so account for this for now +#STAGEDIR := +# PREFIX is the local install directory relative to / for FreeBSD +# Usually the same as LOCALBASE +# +PREFIX := /usr/local -# This needs work FreeBSD does support neon +INSTALLDIR := ${STAGEDIR}${PREFIX} +SHAREDIR := ${INSTALLDIR}/share + #CFLAGS += -mfpu=neon #FreeBSD prefers OSS #CFLAGS += -DUSE_ALSA #LDFLAGS += -lasound -# FreeBSD can support gpsd just not for initial port ;) -#enable_gpsd := $(wildcard /usr/local/include/gps.h) -#ifneq ($(enable_gpsd),) -#CFLAGS += -DENABLE_GPSD -#LDFLAGS += -lgps -#endif - +enable_gpsd := $(wildcard ${LOCALBASE}/include/gps.h) +ifneq ($(enable_gpsd),) +CFLAGS += -DENABLE_GPSD +LDFLAGS += -lgps +endif # Uncomment following lines to enable hamlib support. -# FreeBSD also support hamlib not tested yet -#CFLAGS += -DUSE_HAMLIB -#LDFLAGS += -lhamlib - +CFLAGS += -DUSE_HAMLIB +LDFLAGS += -lhamlib # Name of current directory. # Used to generate zip file name for distribution. z := $(notdir ${CURDIR}) - - # -------------------------------- Main application ----------------------------------------- @@ -194,14 +203,6 @@ direwolf.conf : generic.conf # This is a step in the right direction but not sufficient to use /usr instead. # Eventually I'd like to have targets here to build the .DEB and .RPM packages. -# FreeBSD installs into a staging dir before generating the package -# Many other systems do similiar so account for this for now -#STAGEDIR := -# PREFIX is the local install directory relative to / for FreeBSD -PREFIX := "/usr/local" - -INSTALLDIR := ${STAGEDIR}${PREFIX} -SHAREDIR := ${INSTALLDIR}/share # Command to "install" to system directories. Use "ginstall" for Mac.