Skip to content

Preliminary changes to add FreeBSD support to direwolf #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated to support hamlib and gpsd
Added PREFIX LOCALHOST defines
  • Loading branch information
DianeBruce committed Jan 21, 2017
commit ba6c53aecc0ad4a5ce32e2f3e2059e9b49a89d25
47 changes: 24 additions & 23 deletions Makefile.FreeBSD
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------


Expand Down Expand Up @@ -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.

Expand Down