main: olsr_create_lock_file: fix return value check on 'open' call
[olsrd.git] / make / Makefile.fbsd
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 CFLAGS +=       -fPIC
32 LDFLAGS +=      -fPIC
33 endif
34
35 PLUGIN_SONAME ?= $(PLUGIN_NAME)
36 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
37 INSTALL_LIB =   install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
38                 /sbin/ldconfig
39 UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
40                 /sbin/ldconfig
41
42 OS_LIB_PTHREAD = -pthread
43 OS_CFLAG_PTHREAD = -pthread
44 OS_LIB_DYNLOAD =
45
46 # Local Variables:
47 # mode: makefile
48 # End: