Merge branch 'stable' into pud
[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 VERSION_FILE = ./src/version.h
21
22 LIBS += -lnmea -lm
23
24
25 ifneq ($(OS),linux)
26
27 default_target install clean:
28         @echo "*** $(PLUGIN_NAME) plugin only supported on Linux, sorry!"
29
30 else
31
32 all: default_target
33
34 default_target: $(VERSION_FILE) $(PLUGIN_FULLNAME)
35
36 $(PLUGIN_FULLNAME): $(OBJS) version-script.txt
37         @echo "[LD] $@"
38         @$(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS)
39
40 $(VERSION_FILE): Makefile scripts/makeVersionH
41         @echo "[$@]"
42         @./scripts/makeVersionH "$@" "$(PLUGIN_VER)"
43
44
45 .PHONY: install uninstall clean dist distclean doc doc-clean
46
47 install: $(PLUGIN_FULLNAME)
48         $(INSTALL_LIB)
49         $(STRIP) "$(LIBDIR)/$(PLUGIN_FULLNAME)"
50
51 uninstall:
52         rm -f "$(LIBDIR)/lib$(PLUGIN_NAME).so" "$(LIBDIR)/$(PLUGIN_NAME)"
53         $(UNINSTALL_LIB)
54
55 clean: doc-clean
56         @echo "[$@]"
57         @rm -f $(OBJS) $(SRCS:%.c=%.d) "$(PLUGIN_FULLNAME)" "$(VERSION_FILE)"
58
59 dist:                           distclean
60 distclean:                      clean
61
62 doc:
63         @$(MAKE) -C doc all
64
65 doc-clean:
66         @$(MAKE) -C doc clean
67
68 endif