watchdog: install extra (documention) files
[olsrd.git] / lib / watchdog / Makefile
index 97f2960..021c775 100644 (file)
@@ -1,5 +1,10 @@
-# The olsr.org Optimized Link-State Routing daemon(olsrd)
-# Copyright (c) 2004-2009, the olsr.org team - see HISTORY file
+# The olsr.org Optimized Link-State Routing daemon (olsrd)
+#
+# (c) by the OLSR project
+#
+# See our Git repository to find out who worked on this file
+# and thus is a copyright holder on it.
+#
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -46,11 +51,25 @@ include $(TOPDIR)/Makefile.inc
 default_target: $(PLUGIN_FULLNAME)
 
 $(PLUGIN_FULLNAME): $(OBJS) version-script.txt
-               $(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS)
+ifeq ($(VERBOSE),0)
+               @echo "[LD] $@"
+endif
+               $(MAKECMDPREFIX)$(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS)
 
 install:       $(PLUGIN_FULLNAME)
                $(STRIP) $(PLUGIN_FULLNAME)
                $(INSTALL_LIB)
+ifneq ($(DOCDIR_OLSRD),)
+               mkdir -p "$(DOCDIR_OLSRD)"
+               cp "README_WATCHDOG" "$(DOCDIR_OLSRD)"
+endif
+
+uninstall:
+ifneq ($(DOCDIR_OLSRD),)
+               rm -f "$(DOCDIR_OLSRD)/README_WATCHDOG"
+               rmdir -p --ignore-fail-on-non-empty "$(DOCDIR_OLSRD)"
+endif
+               $(UNINSTALL_LIB)
 
 clean:
                rm -f $(OBJS) $(SRCS:%.c=%.d) $(PLUGIN_FULLNAME)