
CFLAGS = -O2 -Wall -funroll-loops
LDFLAGS = 
# -s -N for a.out
CC=gcc
PROGS=xferstats
BINDIR=/usr/sbin
MANDIR=/usr/man
INSTALL=install

all: $(PROGS)

xferstats: xferstats.c
	$(CC) $(CFLAGS) xferstats.c -o xferstats

solaris:
	$(CC) $(CFLAGS) -D SOLARIS xferstats.c -o xferstats

install: $(PROGS)
	@set -x ;for i in $(PROGS) ; do \
	${INSTALL} -c -o bin -g bin -m 755 $$i ${BINDIR} ; done
	@echo Installing man page...
	${INSTALL} -c -o bin -g bin -m 755 xferstats.8 ${MANDIR}/man8/xferstats.8
	
clean:
	rm $(PROGS)
