mydir=plugins$(S)kdb$(S)hdb
BUILDTOP=$(REL)..$(S)..$(S)..
KRB5_RUN_ENV = @KRB5_RUN_ENV@
KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ;
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
MODULE_INSTALL_DIR = $(KRB5_DB_MODULE_DIR)
DEFS=
DB_VERSION = @DB_VERSION@

LOCALINCLUDES = -I../../../lib/kdb -I$(srcdir)/../../../lib/kdb
DEFINES = -DPLUGIN -DSHLIBEXT=\"$(SHLIBEXT)\"

LIBBASE=hdb
LIBMAJOR=0
LIBMINOR=0
SO_EXT=.so
RELDIR=../plugins/kdb/hdb
# Depends on libk5crypto and libkrb5
# Also on gssrpc, for xdr stuff.
SHLIB_EXPDEPS = \
	$(GSSRPC_DEPLIBS) \
	$(TOPLIBD)/libkdb5$(SHLIBEXT) \
	$(TOPLIBD)/libk5crypto$(SHLIBEXT) \
	$(TOPLIBD)/libkrb5$(SHLIBEXT)
SHLIB_EXPLIBS= $(GSSRPC_LIBS) -lkdb5 -lkrb5 -lcom_err -lk5crypto $(KDB5_DB_LIB) $(SUPPORT_LIB) $(LIBS) @DB_EXTRA_LIBS@

SHLIB_DIRS=-L$(TOPLIBD)
SHLIB_RDIRS=$(KRB5_LIBDIR)

SRCS= \
	$(srcdir)/kdb_hdb.c \
	$(srcdir)/kdb_marshal.c \
	$(srcdir)/kdb_windc.c

STOBJLISTS=OBJS.ST $(DBOBJLISTS)
STLIBOBJS= \
	kdb_hdb.o \
	kdb_marshal.o \
	kdb_windc.o

all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-liblinks clean-libs clean-libobjs

$(DB_DEPS) $(DBOBJLISTS-k5) $(DBSHOBJLISTS): all-recurse

clean::
	$(RM) lib$(LIBBASE)$(SO_EXT)

@libnover_frag@
@libobj_frag@

.depend-verify-db: depend-verify-db-$(DB_VERSION)
depend-verify-db-k5:
	@if test -r .depend-verify-db; then :; \
		else (set -x; touch .depend-verify-db); fi
depend-verify-db-sys:
	@echo 1>&2 error: cannot build dependencies using system db package
	@exit 1

.d: .depend-verify-db

