CC=cc
CCOPTS=-g

default: all

shar: authd.shar

all: authd tcpuid tcpuname authuser.o test

authd: authd.c Makefile
	$(CC) $(CCOPTS) -o authd authd.c

tcpuid: authd Makefile
	rm -f tcpuid
	ln authd tcpuid

tcpuname: authd Makefile
	rm -f tcpuname
	ln authd tcpuname

authuser.o: authuser.c authuser.h Makefile
	$(CC) $(CCOPTS) -c authuser.c

test: authuser.o authuser.h test.c Makefile
	$(CC) $(CCOPTS) -o test test.c authuser.o

authd.shar: FILES
	shar `cat FILES` > authd.shar
	chmod 400 authd.shar

install:
	echo 'Run the INSTALL shell script.'

clean:
	rm -f *.o
