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