Support for Debian/FreeBSD
[olsrd.git] / make / Makefile.kfbsd
1 #
2 # FREEBSD SPECIFIC CONFIGURATION
3 #
4
5 PREFIX ?= /usr/local
6 SBINDIR = $(PREFIX)/sbin
7 ETCDIR = $(PREFIX)/etc
8 LIBDIR = $(PREFIX)/lib
9 DOCDIR = $(PREFIX)/share/doc
10 MANDIR = $(PREFIX)/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 CPPFLAGS +=     -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
18
19 ifdef NO_80211
20 CPPFLAGS +=     -DFBSD_NO_80211=1
21 endif
22
23 ifdef LIBNET
24
25 CPPFLAGS +=     -DSPOOF -I$(PREFIX)/include
26 LIBS +=         -L$(PREFIX)/lib -lnet
27
28 endif
29
30 ifdef OLSRD_PLUGIN
31 GENERATE_PIC = true
32 endif
33 ifeq ($(filter-out alpha x86_64 parisc64 ia64, $(ARCH)),)
34 GENERATE_PIC = true
35 endif
36
37 ifdef GENERATE_PIC
38 CFLAGS +=       -fPIC
39 LDFLAGS +=      -fPIC
40 endif
41
42 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
43 INSTALL_LIB =   install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME);
44
45 OS_LIB_PTHREAD = -pthread
46 OS_CFLAG_PTHREAD = -pthread
47 OS_LIB_DYNLOAD = -ldl
48
49 # Local Variables:
50 # mode: makefile
51 # End: