HASH_DEBUGOPTS=
# DEBUG4 does not compile
# DEBUG1 does not work
#HASH_DEBUGOPTS=	-DHASH_STATISTICS -DDEBUG -DDEBUG2 -DDEBUG3 -DPURIFY

.c.o:
	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
@SHARED_RULE@

CFLAGS = $(CCOPTS) $(DEFS) -D__DBINTERFACE_PRIVATE $(LOCALINCLUDE) $(HASH_DEBUGOPTS)

##DOSBUILDTOP = ..\..\..
##DOSLIBNAME=..\db.lib
##DOS!include $(BUILDTOP)\config\windows.in

CDEFS_INCLUDE = @CDEFS_INCLUDE@

LOCALINCLUDE=$(CDEFS_INCLUDE)			\
	-I$(srcdir)/../PORT/krb5/include	\
	-I$(srcdir)/../PORT/include		\
	-I$(srcdir)/../include			\
	-I$(srcdir)

OBJS=	hash.$(OBJEXT)		\
	hash_bigkey.$(OBJEXT)	\
	hash_buf.$(OBJEXT)	\
	hash_func.$(OBJEXT)	\
	hash_log2.$(OBJEXT)	\
	hash_page.$(OBJEXT)	\
	hsearch.$(OBJEXT)	\
	krb5_ndbm.$(OBJEXT)	\
	mktemp.$(OBJEXT)


SRCS=	$(srcdir)/hash.c	\
	$(srcdir)/hash_bigkey.c	\
	$(srcdir)/hash_buf.c	\
	$(srcdir)/hash_func.c	\
	$(srcdir)/hash_log2.c	\
	$(srcdir)/hash_page.c	\
	$(srcdir)/hsearch.c	\
	$(srcdir)/krb5_ndbm.c	\
	$(srcdir)/../PORT/clib/mktemp.c

mktemp.o:	../PORT/clib/mktemp.c
	$(CC) $(CFLAGS) -c $(srcdir)/../PORT/clib/mktemp.c
@SHARED_RULE@

all:: all-$(WHAT)

all-unix:: shared $(OBJS)

shared:
	mkdir shared


