chiark / gitweb /
clean up for distribution
[elogind.git] / Makefile
index 6b129dfc9b78f3c1b590efbd7387def0c35c1e42..9a528a17e99b15fc93c44eea09f2ea4e5bab606a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
+# $Id$
+
 CFLAGS=-Wall -pipe -W -O2 -Wextra -Wno-unused-parameter
+VERSION=0.1
 
 libnss_myhostname.so.2: nss-myhostname.o
        $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,$@ $^
@@ -10,4 +13,13 @@ install:
 clean:
        rm -f *.o *~ libnss_myhostname.so.2
 
-.PHONY: clean  
+nss-myhostname.tar.gz:
+       rm -rf "nss-myhostname-$(VERSION)"
+       mkdir "nss-myhostname-$(VERSION)"
+       cp Makefile README *.c "nss-myhostname-$(VERSION)"/
+       tar czf "nss-myhostname-$(VERSION).tar.gz" "nss-myhostname-$(VERSION)"/
+       rm -rf "nss-myhostname-$(VERSION)"
+
+tar: nss-myhostname.tar.gz
+
+.PHONY: clean install tar