5fc4492af065451902691508b9694ac5a35a588f
[olsrd.git] / lib / pud / Makefile
1 include Makefile.inc
2
3 TOPDIR = ../..
4 include $(TOPDIR)/Makefile.inc
5
6
7 #CFLAGS += -DPUD_DUMP_GPS_PACKETS_RX_NON_OLSR
8 #CFLAGS += -DPUD_DUMP_GPS_PACKETS_TX_OLSR
9
10 #CFLAGS += -DPUD_DUMP_GPS_PACKETS_RX_OLSR
11 #CFLAGS += -DPUD_DUMP_GPS_PACKETS_TX_NON_OLSR
12
13 #CFLAGS += -DPUD_DUMP_AVERAGING
14 #CFLAGS += -DPUD_DUMP_DEDUP
15
16
17 CFLAGS += -Werror -D_GNU_SOURCE
18
19
20 LIBS += -lnmea -lm
21 PUD_DOC_DIR = ./doc
22
23
24 ifneq ($(OS),linux)
25
26 default_target install clean:
27         @echo "*** $(PLUGIN_NAME) plugin only supported on Linux, sorry!"
28
29 else
30
31 default_target: version $(PLUGIN_FULLNAME)
32
33 version: Makefile scripts/makeVersionH
34         ./scripts/makeVersionH "./src/version.h" "$(PLUGIN_VER)" 
35
36 $(PLUGIN_FULLNAME): $(OBJS) version-script.txt
37         $(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS)
38
39 .PHONY: install uninstall clean dist distclean doc doc-clean
40
41 install:        $(PLUGIN_FULLNAME)
42         $(STRIP) $(PLUGIN_FULLNAME)
43         $(INSTALL_LIB)
44
45 uninstall:
46         $(UNINSTALL_LIB)
47
48 clean: doc-clean
49         rm -f $(OBJS) $(SRCS:%.c=%.d) $(PLUGIN_FULLNAME) "./src/version.h"
50
51 dist:                           distclean
52 distclean:                      clean
53
54 doc:
55         $(MAKE) -C doc all
56
57 doc-clean:
58         $(MAKE) -C doc clean
59
60 endif