]> mj.ucw.cz Git - nwho.git/blobdiff - Makefile
Make the systemd service be ordered after autofs.service, so that it is ordered befor...
[nwho.git] / Makefile
index 4b3255e0dc1d31ced12ae8f0cc829900257d319e..6da5aeef5a3c71c2ebb995e84710a3b6e7a11d28 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,38 +1,34 @@
-# Makefile for the ywho toolkit
+# Makefile for the nwho toolkit
 
-CFLAGS=-O2 -Wall -Wno-parentheses
+CFLAGS=-O2 -Wall -Wextra -Wno-parentheses -DVERSION=$(VERSION) -std=gnu99
 LDFLAGS=-s
 ROOT=/
-REL=ywho-1.9
+VERSION=1.15
+ARCHIVE=nwho-$(VERSION).tar.gz
 
-all: ywho nwhod nwho
+all: nwhod nwho
 
-ywho: ywho.o
+nwhod: nwhod.o util.o
+nwhod.o: nwhod.c nwho.h
+util.o: util.c nwho.h
 
-ywho.o: ywho.c
-
-nwhod: nwhod.o
-
-nwhod.o: nwhod.c net.h
-
-nwho: nwho.o
-
-nwho.o: nwho.c net.h
+nwho: nwho.o util.o
+nwho.o: nwho.c nwho.h
 
 clean:
-       rm -f *.o ywho nwhod nwho *~
-       rm -rf dist
+       rm -f *.o nwhod nwho *~
 
 install:
-       strip ywho
        mkdir -p $(ROOT)/usr/bin $(ROOT)/usr/sbin
-       install -s -m 755 ywho nwho $(ROOT)/usr/bin
+       install -s -m 755 nwho $(ROOT)/usr/bin
        ln -sf nwho $(ROOT)/usr/bin/nuptime
        install -s -m 755 nwhod $(ROOT)/usr/sbin
-       install -d -m 755 $(ROOT)/var/spool/nwho
-
-dist: clean
-       mkdir dist
-       cp -a . dist/$(REL)
-       rm -rf `find dist/$(REL) -name CVS -o -name tmp` dist/$(REL)/dist
-       cd dist ; tar czvvf /tmp/$(REL).tar.gz $(REL)
+       install -d -m 755 $(ROOT)/var/state/nwho
+
+release:
+       git tag v$(VERSION)
+       git push --tags
+       git archive --format=tar --prefix=nwho-$(VERSION)/ HEAD | gzip >$(ARCHIVE)
+       scp $(ARCHIVE) atrey:~ftp/pub/local/mj/linux/
+       ssh jw "cd www && bin/release-prog nwho $(VERSION)"
+       mv $(ARCHIVE) ~/archives/sw/nwho/