#CC = gcc

#Uncomment these two lines to use the DBM features of wnauth
#You will likely have to change DBMLIB to whatever library contains
# the NDBM functions dbm_open(), dbm_fetch() and dbm_close() on your system.
# Typically this is -lndbm or -ldbm.

#DBMLIB = -lndbm
#DBMFLAG =  -DDBM_AUTH
BINDIR=../bin
LIBS = -lcrypt


CFLAGS = -I../wn/ -O $(DBMFLAG) -Wall

OBJS = wnauth.o

all:	wnauth

wnauth: $(OBJS)
	$(CC) $(CFLAGS) -o wnauth $(OBJS) $(LIBS) $(DBMLIB)

install:	wnauth
	@-if test ! -d $(BINDIR) ; then \
		echo "Creating $(BINDIR)" ; \
		mkdir $(BINDIR) ; \
	fi
	@echo "Installing wnauth in $(BINDIR)"
	@cp wnauth $(BINDIR)
	@strip $(BINDIR)/wnauth

clean:
	@rm -f *.o  *~ wnauth

wnauth.o: 		wnauth.h  ../config.h

