PORTDIR=$(srcdir)/../PORT/krb5
#	@(#)Makefile	8.15 (Berkeley) 7/28/94

PROG=	dbtest
OBJS=	dbtest.o strerror.o

# Uncomment the STAT line get hash and btree statistical use info.  This
# also forces ld to load the btree debug functions for use by gdb, which
# is useful.  The db library has to be compiled with -DSTATISTICS as well.
CDEFS_INCLUDE = @CDEFS_INCLUDE@
INC=	-I${PORTDIR}/include $(CDEFS_INCLUDE) -I${PORTDIR}/../../include -I${PORTDIR}/../../../include
OORG=	-g
#STAT=	-DSTATISTICS
CFLAGS=	-D__DBINTERFACE_PRIVATE -DDEBUG ${STAT} ${OORG} ${INC} ${DEFS}

dbtest: ${OBJS} ../libdb.a
	${CC} -o $@ ${OBJS} ../libdb.a

strerror.o: ${PORTDIR}/../clib/strerror.c
	${CC} -c ${PORTDIR}/../clib/strerror.c

clean::
	rm -f dbtest.core gmon.out ${OBJS} ${PROG} t1 t2 t3

${OBJS}: Makefile

check::	dbtest
	if [ -f /bin/sh5 ] ; then \
		/bin/sh5 $(srcdir)/run.test hash ; \
	else \
		/bin/sh $(srcdir)/run.test hash ; \
	fi
	if [ "X$$TMPDIR" != "X" ] ; then \
		rm -f $$TMPDIR/__dbtest ; \
	else \
		rm -f /var/tmp/__dbtest ; \
	fi

all::

