]> mj.ucw.cz Git - nwho.git/blobdiff - Makefile
Debianized...
[nwho.git] / Makefile
index 3d997d0b9731ae7c128e438d141a89a4666f9d65..d3f0f6bf970200554ff79c65a3aee240775c485b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,30 @@
-# Makefile for YWHO
+# Makefile for the ywho toolkit
 
-ywho: ywho.c
-       gcc -s -N -O2 -m486 -fomit-frame-pointer -Wall -Wno-parentheses ywho.c -o ywho
+CFLAGS=-O2 -m486 -fomit-frame-pointer -Wall -Wno-parentheses -malign-loops=0 -malign-jumps=0 -malign-functions=2
+LDFLAGS=-s
+ROOT=/
+
+all: ywho nwhod nwho
+
+ywho: ywho.o
+
+ywho.o: ywho.c
+
+nwhod: nwhod.o
+
+nwhod.o: nwhod.c net.h
+
+nwho: nwho.o
+
+nwho.o: nwho.c net.h
 
 clean:
-       rm *.o ywho
+       rm -f *.o ywho nwhod nwho *~
 
 install:
        strip ywho
-       mv ywho /usr/local/bin
+       mkdir -p $(ROOT)/usr/bin $(ROOT)/usr/sbin
+       install -s -m 755 ywho 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