# Makefile for the nwho toolkit VERSION=1.13 CFLAGS=-O2 -Wall -Wextra -Wno-parentheses -DVERSION=$(VERSION) -std=gnu99 LDFLAGS=-s ROOT=/ REL=nwho-$(VERSION) all: nwhod nwho nwhod: nwhod.o util.o nwhod.o: nwhod.c nwho.h util.o: util.c nwho.h nwho: nwho.o util.o nwho.o: nwho.c nwho.h clean: rm -f *.o nwhod nwho *~ install: mkdir -p $(ROOT)/usr/bin $(ROOT)/usr/sbin 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/state/nwho dist: clean mkdir -p ~/tmp cp -a . ~/tmp/$(REL) rm -rf `find ~/tmp/$(REL) -name CVS -o -name tmp` cd ~/tmp ; tar czvvf $(REL).tar.gz $(REL) rm -rf ~/tmp/$(REL)