chiark / gitweb /
add LICENSE
[elogind.git] / Makefile
index 9301fab9f201530d1243ce24ef403e5f022d1927..af32519dde5bd105098d244ebf9afb693f73492e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,26 @@
+# $Id$
+
 CFLAGS=-Wall -pipe -W -O2 -Wextra -Wno-unused-parameter
+VERSION=0.1
 
 libnss_myhostname.so.2: nss-myhostname.o
-       $(CC) -shared -o $@ -Wl,-soname,$@ $^
+       $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,$@ $^
        strip $@
 
 install:
-       install -D -g root -m 644 -o root -s -v libnss_myhostname.so.2 /usr/lib/libnss_myhostname.so.2
+       install -D -g root -m 644 -o root -v libnss_myhostname.so.2 /lib/libnss_myhostname.so.2
 
 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 LICENSE README *.c "nss-myhostname-$(VERSION)"/
+       rm -f "nss-myhostname-$(VERSION).tar.gz"
+       tar czf "nss-myhostname-$(VERSION).tar.gz" "nss-myhostname-$(VERSION)"/
+       rm -rf "nss-myhostname-$(VERSION)"
+
+tar: nss-myhostname.tar.gz
+
+.PHONY: clean install tar