fixes for freebsd
[olsrd.git] / make / Makefile.fbsd
1 #
2 # FREEBSD SPECIFIC CONFIGURATION
3 #
4
5 INSTALL_PREFIX ?= /usr/local
6 SBINDIR = $(INSTALL_PREFIX)/sbin
7 ETCDIR = $(INSTALL_PREFIX)/etc
8 LIBDIR = $(INSTALL_PREFIX)/lib
9 DOCDIR = $(INSTALL_PREFIX)/share/doc
10 MANDIR = $(INSTALL_PREFIX)/share/man
11
12 SRCS +=         $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
13 HDRS +=         $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
14
15 LIBS =          
16
17 CFLAGS +=       -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
18
19 ifdef LIBNET
20
21 CFLAGS +=       -DSPOOF -I$(INSTALL_PREFIX)/include
22 LIBS =+         -L$(INSTALL_PREFIX)/lib -lnet
23
24 endif
25
26 ifdef OLSRD_PLUGIN
27 CFLAGS +=       -fPIC
28 LDFLAGS +=      -fPIC
29 endif
30
31 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
32 INSTALL_LIB =   install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
33                 /sbin/ldconfig
34
35 OS_LIB_PTHREAD = -pthread
36 OS_LIB_DYNLOAD =