#
# FREEBSD SPECIFIC CONFIGURATION
#

PREFIX ?= /usr/local
SBINDIR = $(PREFIX)/sbin
ETCDIR = $(PREFIX)/etc/olsrd
LIBDIR = $(PREFIX)/lib
DOCDIR = $(PREFIX)/share/doc
MANDIR = $(PREFIX)/man

SRCS +=		$(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
HDRS +=		$(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)

LIBS =

CPPFLAGS +=	-DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"

ifdef NO_80211
CPPFLAGS +=	-DFBSD_NO_80211=1
endif

ifdef LIBNET

CPPFLAGS +=	-DSPOOF -I$(PREFIX)/include
LIBS +=		-L$(PREFIX)/lib -lnet

endif

ifdef OLSRD_PLUGIN
CFLAGS +=	-fPIC
LDFLAGS +=	-fPIC
endif

PLUGIN_SONAME ?= $(PLUGIN_NAME)
PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
INSTALL_LIB =	install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
		/sbin/ldconfig
UNINSTALL_LIB =	rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
		/sbin/ldconfig

OS_LIB_PTHREAD = -pthread
OS_CFLAG_PTHREAD = -pthread
OS_LIB_DYNLOAD =

# Local Variables:
# mode: makefile
# End:
