netjson: install extra (documention) files
[olsrd.git] / lib / netjson / Makefile
index dd344f2..e948d56 100644 (file)
@@ -50,7 +50,7 @@ include $(TOPDIR)/Makefile.inc
 
 LDFLAGS += -lm
 
-COMMONINFO = $(wildcard ../info/*.c)
+COMMONINFO = $(sort $(wildcard ../info/*.c))
 OBJS += $(COMMONINFO:%.c=%.o)
 
 default_target: $(PLUGIN_FULLNAME)
@@ -64,8 +64,16 @@ endif
 install:       $(PLUGIN_FULLNAME)
                $(STRIP) $(PLUGIN_FULLNAME)
                $(INSTALL_LIB)
+ifneq ($(DOCDIR_OLSRD),)
+               mkdir -p "$(DOCDIR_OLSRD)"
+               cp "README_NETJSON" "$(DOCDIR_OLSRD)"
+endif
 
 uninstall:
+ifneq ($(DOCDIR_OLSRD),)
+               rm -f "$(DOCDIR_OLSRD)/README_NETJSON"
+               rmdir -p --ignore-fail-on-non-empty "$(DOCDIR_OLSRD)"
+endif
                $(UNINSTALL_LIB)
 
 clean: