Skip to content

Commit ba6c53a

Browse files
committed
Updated to support hamlib and gpsd
Added PREFIX LOCALHOST defines
1 parent e7569d5 commit ba6c53a

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

Diff for: Makefile.FreeBSD

+24-23
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,47 @@ all : $(APPS) direwolf.desktop direwolf.conf
1111
@echo " sudo make install"
1212
@echo " "
1313

14+
#
15+
# Freebsd usually looks for non-base install libs and include in LOCALBASE
16+
# which is usually /usr/local
17+
#
18+
LOCALBASE= /usr/local
19+
CFLAGS += -I${LOCALBASE}/include
1420
CFLAGS += -pthread -Igeotranz
21+
LDFLAGS := -lm -lpthread -L${LOCALBASE}/lib
1522

16-
LDFLAGS := -lm -lpthread
23+
# FreeBSD installs into a staging dir before generating the package
24+
# Many other systems do similiar so account for this for now
25+
#STAGEDIR :=
26+
# PREFIX is the local install directory relative to / for FreeBSD
27+
# Usually the same as LOCALBASE
28+
#
29+
PREFIX := /usr/local
1730

18-
# This needs work FreeBSD does support neon
31+
INSTALLDIR := ${STAGEDIR}${PREFIX}
32+
SHAREDIR := ${INSTALLDIR}/share
33+
1934
#CFLAGS += -mfpu=neon
2035

2136
#FreeBSD prefers OSS
2237
#CFLAGS += -DUSE_ALSA
2338
#LDFLAGS += -lasound
2439

25-
# FreeBSD can support gpsd just not for initial port ;)
26-
#enable_gpsd := $(wildcard /usr/local/include/gps.h)
27-
#ifneq ($(enable_gpsd),)
28-
#CFLAGS += -DENABLE_GPSD
29-
#LDFLAGS += -lgps
30-
#endif
31-
40+
enable_gpsd := $(wildcard ${LOCALBASE}/include/gps.h)
41+
ifneq ($(enable_gpsd),)
42+
CFLAGS += -DENABLE_GPSD
43+
LDFLAGS += -lgps
44+
endif
3245

3346
# Uncomment following lines to enable hamlib support.
34-
# FreeBSD also support hamlib not tested yet
35-
#CFLAGS += -DUSE_HAMLIB
36-
#LDFLAGS += -lhamlib
37-
47+
CFLAGS += -DUSE_HAMLIB
48+
LDFLAGS += -lhamlib
3849

3950
# Name of current directory.
4051
# Used to generate zip file name for distribution.
4152

4253
z := $(notdir ${CURDIR})
4354

44-
45-
4655
# -------------------------------- Main application -----------------------------------------
4756

4857

@@ -194,14 +203,6 @@ direwolf.conf : generic.conf
194203
# This is a step in the right direction but not sufficient to use /usr instead.
195204
# Eventually I'd like to have targets here to build the .DEB and .RPM packages.
196205

197-
# FreeBSD installs into a staging dir before generating the package
198-
# Many other systems do similiar so account for this for now
199-
#STAGEDIR :=
200-
# PREFIX is the local install directory relative to / for FreeBSD
201-
PREFIX := "/usr/local"
202-
203-
INSTALLDIR := ${STAGEDIR}${PREFIX}
204-
SHAREDIR := ${INSTALLDIR}/share
205206

206207
# Command to "install" to system directories. Use "ginstall" for Mac.
207208

0 commit comments

Comments
 (0)