]> mj.ucw.cz Git - nwho.git/blob - Makefile
Let die() be shared between nwho and nwhod
[nwho.git] / Makefile
1 # Makefile for the nwho toolkit
2
3 VERSION=1.12
4 CFLAGS=-O2 -Wall -Wno-parentheses -DVERSION=$(VERSION)
5 LDFLAGS=-s
6 ROOT=/
7 REL=nwho-$(VERSION)
8
9 all: nwhod nwho
10
11 nwhod: nwhod.o util.o
12 nwhod.o: nwhod.c nwho.h
13 util.o: util.c nwho.h
14
15 nwho: nwho.o util.o
16 nwho.o: nwho.c nwho.h
17
18 clean:
19         rm -f *.o nwhod nwho *~
20
21 install:
22         mkdir -p $(ROOT)/usr/bin $(ROOT)/usr/sbin
23         install -s -m 755 nwho $(ROOT)/usr/bin
24         ln -sf nwho $(ROOT)/usr/bin/nuptime
25         install -s -m 755 nwhod $(ROOT)/usr/sbin
26         install -d -m 755 $(ROOT)/var/spool/nwho
27
28 dist: clean
29         mkdir -p ~/tmp
30         cp -a . ~/tmp/$(REL)
31         rm -rf `find ~/tmp/$(REL) -name CVS -o -name tmp`
32         cd ~/tmp ; tar czvvf $(REL).tar.gz $(REL)
33         rm -rf ~/tmp/$(REL)