Makefile
changeset 2 b7ec299a0f88
parent 0 b6e0cc8761df
--- a/Makefile	Mon May 23 16:06:08 2016 +0200
+++ b/Makefile	Mon May 23 16:07:17 2016 +0200
@@ -1,14 +1,22 @@
-SCRIPT = check_avastlicense
+SCRIPTS = check_avastlicense
+CLEANFILES = $(SCRIPTS)
+DESTDIR =
+prefix = /usr
 
-.PHONY:	all clean
+plugindir = $(prefix)/lib/nagios/plugins/ius
 
-all:	$(SCRIPT)
+.PHONY:	all clean install
+
+all:	$(SCRIPTS)
 
 clean:
-	rm -rf $(SCRIPT)
+	rm -rf $(CLEANFILES)
 
-%:	%.sh Makefile
+install: all
+	install -d -m 0755 $(DESTDIR)/$(plugindir)
+	install -m 0755 $(SCRIPTS) $(DESTDIR)/$(plugindir)/
+
+%:	%.sh
 	# $@
 	@sh -n $<
 	@cp $< $@
-	@chmod +x $@