main: olsr_create_lock_file: fix return value check on 'open' call
[olsrd.git] / make / Makefile.kfbsd
1 #
2 # FREEBSD SPECIFIC CONFIGURATION
3 #
4
5 PREFIX ?= /usr/local
6
7 SRCS +=         $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
8 HDRS +=         $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
9
10 LIBS =
11
12 CPPFLAGS +=     -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
13
14 ifdef NO_80211
15 CPPFLAGS +=     -DFBSD_NO_80211=1
16 endif
17
18 ifdef LIBNET
19
20 CPPFLAGS +=     -DSPOOF -I$(PREFIX)/include
21 LIBS +=         -L$(PREFIX)/lib -lnet
22
23 endif
24
25 ifdef OLSRD_PLUGIN
26 GENERATE_PIC = true
27 endif
28 ifeq ($(filter-out alpha x86_64 parisc64 ia64, $(ARCH)),)
29 GENERATE_PIC = true
30 endif
31
32 ifdef GENERATE_PIC
33 CFLAGS +=       -fPIC
34 LDFLAGS +=      -fPIC
35 endif
36
37 PLUGIN_SONAME ?= $(PLUGIN_NAME)
38 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
39 INSTALL_LIB =   install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME);
40 UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME);
41
42 OS_LIB_PTHREAD = -pthread
43 OS_CFLAG_PTHREAD = -pthread
44 OS_LIB_DYNLOAD = -ldl
45
46 # Local Variables:
47 # mode: makefile
48 # End: