Update version after release of v0.6.6.1
[olsrd.git] / lib / sgwdynspeed / Makefile
1 include Makefile.inc
2
3 TOPDIR = ../..
4 include $(TOPDIR)/Makefile.inc
5
6
7 RESOURCESDIR = ./resources
8
9 SUPPORTED = 0
10 ifeq ($(OS),linux)
11 SUPPORTED = 1
12 endif
13 ifeq ($(OS),android)
14 SUPPORTED = 1
15 endif
16
17
18 ifeq ($(SUPPORTED),0)
19
20 .PHONY: all default_target install clean
21
22 all: default_target
23
24 default_target install clean:
25         @echo "*** $(PLUGIN_NAME) plugin not supported on $(OS), sorry!"
26
27 else
28
29 GIT_SHA = $(shell git describe 2> /dev/null || echo "Unknown")
30 CFLAGS += -DGIT_SHA=\"$(GIT_SHA)\" -DPLUGIN_VER=\"$(PLUGIN_VER)\"
31
32 .PHONY: all default_target install uninstall clean doc doc-clean java java-instal java-uninstall
33
34 all: default_target
35
36 default_target: $(PLUGIN_FULLNAME)
37
38 $(PLUGIN_FULLNAME): $(OBJS) version-script.txt
39 ifeq ($(VERBOSE),0)
40         @echo "[LD] $@"
41 endif
42         $(MAKECMDPREFIX)$(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS)
43
44 install: all
45         $(INSTALL_LIB)
46         mkdir -p "$(DOCDIR_OLSRD)"
47         cp "$(RESOURCESDIR)/olsrd.sgw.speed.conf" "$(DOCDIR_OLSRD)"
48         $(STRIP) "$(LIBDIR)/$(PLUGIN_FULLNAME)"
49
50 uninstall:
51         rm -f "$(LIBDIR)/lib$(PLUGIN_NAME).so" "$(LIBDIR)/$(PLUGIN_NAME)" "$(DOCDIR_OLSRD)/olsrd.sgw.speed.conf"
52         $(UNINSTALL_LIB)
53         rmdir -v -p --ignore-fail-on-non-empty "$(LIBDIR)" "$(DOCDIR_OLSRD)"
54
55 clean:
56 ifeq ($(VERBOSE),0)
57         @echo "[$@]"
58 endif
59         $(MAKECMDPREFIX)rm -f $(OBJS) $(SRCS:%.c=%.d) "$(PLUGIN_FULLNAME)"
60         $(MAKECMDPREFIX)$(MAKE) -C doc clean
61
62 doc:
63         $(MAKECMDPREFIX)$(MAKE) -C doc all
64
65 doc-clean:
66         $(MAKECMDPREFIX)$(MAKE) -C doc clean
67
68 endif