Makefile
changeset 4 fe368de5cf81
parent 0 c163c53b5be4
--- a/Makefile	Mon Sep 14 16:18:34 2009 +0200
+++ b/Makefile	Mon Oct 15 12:36:02 2012 +0200
@@ -1,14 +1,22 @@
-SCRIPT = check-cert
+SCRIPTS = check_cert
+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 -f ${CLEANFILES}
 
-%:	%.pl Makefile
-	# $@
+install:	all
+	install -d -m 0755 ${DESTDIR}/${plugindir}
+	install -m 0755 $(SCRIPTS) ${DESTDIR}/${plugindir}/
+
+%:	%.pl
 	@perl -c $<
 	@cp -f $< $@
-	@chmod a=rx $@
+	@chmod +x $@