#	Build AGEF v3
#
#	SCCS ID:	@(#)Makefile	1.6	7/9/87
#
#	Define the type of system we're working with.  Three
# choices:
#
#   1.	BSD Unix 4.2 or 4.3.  Directory read support in the
# standard library, so we don't have to do much.  Select BSD.
#
#   2.	System V.  I depend on Doug Gwyn's directory reading
# routines.  They were posted to Usenet "comp.sources" early in
# May 1987.  They're worth the effort to get, if you don't have
# them already.  Select SYS_V.  Be sure to define NLIB to be the
# 'cc' option to include the directory library.
#
#   3.  System III, or machines without any directory read
# packages.  I have a minimal kludge.  Select SYS_III.
#

# Case 1:
SYS=	-DBSD
NLIB=

# Case 2:
#SYS=	-DSYS_V
#NLIB=	-lndir

# Case 3:
#SYS=	-DSYS_III
#NLIB=


#	Standard things you may wish to change:
#
#	INSTALL		directory to install agef in

INSTALL	=	/usr/local/bin


#	The following OPTIONS may be defined:
#
#	LSTAT		we have the lstat(2) system call (BSD only)
#	HSTATS		print hashing statistics at end of run
#
#	Define LSTAT, HSTATS here

OPTIONS	=	-DLSTAT

#  END OF USER-DEFINED OPTIONS


CFLAGS=	-O $(SYS) $(OPTIONS)
SRCS=	agef.c	hash.c	direct.c	\
	hash.h	customize.h	patchlevel.h
OBJS=	agef.o	hash.o

install:	agef
	install -m 0511 agef $(INSTALL)

clean:
	rm -f $(OBJS) agef *~

agef:	$(OBJS)
	cc -o agef $(CFLAGS) $(OBJS) $(NLIB)

agef.o:	agef.c direct.c hash.h customize.h patchlevel.h

hash.o:	hash.c hash.h customize.h patchlevel.h
