#
CC	= gcc
OBJS	= trust.o repeater.o login.o KeyIn.o insEntry.o NoRoute.o config.o
DEST	= /usr/local/bin
LIBS	= -lcrypt
PROGRAM	= trust

all:	$(PROGRAM)

trust.o: trust.c trust.h shm.h
	$(CC) -c trust.c

repeater.o: repeater.c trust.h shm.h repeater.h 
	$(CC) -c repeater.c

login.o: login.c 
	$(CC) -c login.c

KeyIn.o: KeyIn.c trust.h shm.h repeater.h
	$(CC) -c KeyIn.c

insEntry.o: insEntry.c trust.h shm.h repeater.h
	$(CC) -c insEntry.c

NoRoute.o: NoRoute.c trust.h shm.h repeater.h
	$(CC) -c NoRoute.c

config.o: config.c trust.h
	$(CC) -c config.c

$(PROGRAM): $(OBJS)
	$(CC) $(OBJS) $(LIBS) -o $(PROGRAM)

clean:
	rm -f *.o *~ $(PROGRAM)

install: $(PROGRAM)
	install -s $(PROGRAM) $(DEST)

