3fb19b914b6b0a3515183dacab90b88d2d6fcc97
[olsrd.git] / make / Makefile.linux
1 #
2 # LINUX SPECIFIC CONFIGURATION
3 #
4
5 ARCH := $(shell uname -m)
6 DESTDIR ?=
7 LIBDIR =        $(DESTDIR)/usr/lib
8
9 SRCS +=         $(wildcard src/linux/*.c src/unix/*.c)
10 HDRS +=         $(wildcard src/linux/*.h src/unix/*.h)
11
12 CPPFLAGS +=     -Dlinux -DLINUX_NETLINK_ROUTING
13 LIBS +=         
14
15 PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so
16 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
17 INSTALL_LIB =   install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
18                 /sbin/ldconfig -n $(LIBDIR)
19 UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
20                 /sbin/ldconfig -n $(LIBDIR)
21
22 ifdef OLSRD_PLUGIN
23 GENERATE_PIC = true
24 endif
25 ifeq ($(filter-out mips mips64 alpha x86_64 parisc64 ia64, $(ARCH)),)
26 GENERATE_PIC = true
27 endif
28
29 ifdef GENERATE_PIC
30 CFLAGS +=       -fPIC
31 LDFLAGS +=      -fPIC
32 endif
33
34 OS_LIB_PTHREAD = -lpthread
35 OS_CFLAG_PTHREAD = -pthread
36 OS_LIB_DYNLOAD = -ldl
37
38 # Local Variables:
39 # mode: makefile
40 # End: