#############################################################################
#	$RCSfile: Makefile,v $
#	$Revision: 0.14 $
#	$Author: marten $
#	$Date: 1993/08/11 09:53:47 $
#############################################################################
#
# YOU ARE NOT SUPPOSED TO MAKE CHANGES TO ANYTHING BELOW
#
#############################################################################

LIBS=	rconf dbopen dbclose donetdbm enread 			\
	addkey enkeys enukey misc entype syslog dbmatch enwrite \
	adderror dbadd defines encmp enparse syntax dblock	\
	updatecheck rfc822 handle notify defaults template	\
	maintainer net2net cldb time

PROGS=	showdbm netdbm whoisd dbupdate newdb cleandb sortdb # checkupd

BINMODE= 755
LIBMODE= 644

.SUFFIXES: .pl .


default:
	@echo "-- DO NOT RUN MAKE HERE, ONE DIRECTORY UP PLEASE --"

all:	$(LIBS) $(PROGS)


.pl:	Makefile
	install -c -m $(LIBMODE) $< $(LIBDIR)/$<


checkupd:	checkupd.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< checkupd.pl > $@
	chmod $(BINMODE) $@


netdbm:	netdbm.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< netdbm.pl > $@
	chmod $(BINMODE) $@


showdbm: showdbm.pl
	sed	-e 's:PERL:$(PERL):g'		\
		< showdbm.pl > $@
	chmod $(BINMODE) $@


whoisd:	whoisd.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'        \
		-e 's:DEFCONFIG:$(DEFCONFIG):g'  \
		-e 's:PERL:$(PERL):g'    \
		< whoisd.pl > $@
	chmod $(BINMODE) $@


cleandb: cleandb.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< cleandb.pl > $@
	chmod $(BINMODE) $@


newdb:	newdb.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< newdb.pl > $@
	chmod $(BINMODE) $@


dbupdate:	dbupdate.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< dbupdate.pl > $@
	chmod $(BINMODE) $@


sortdb:	sortdb.pl
	sed	-e 's:LIBDIR:$(LIBDIR):g'	\
		-e 's:DEFCONFIG:$(DEFCONFIG):g'	\
		-e 's:PERL:$(PERL):g'	\
		< sortdb.pl > $@
	chmod $(BINMODE) $@


install: $(PROGS) $(LIBS)
	install -m $(BINMODE) $(PROGS) $(BINDIR)


clean:
	rm -f $(PROGS) core
