thisconfigdir=.
myfulldir=lib/kdb
mydir=.
BUILDTOP=$(REL)$(U)$(S)$(U)
KRB5_RUN_ENV = @KRB5_RUN_ENV@
KRB5_CONFIG_SETUP = KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ;
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)

LIB=kdb5
LIBMAJOR=3
LIBMINOR=0
RELDIR=kdb
# Depends on libk5crypto and libkrb5
SHLIB_EXPDEPS = \
	$(TOPLIBD)/libk5crypto$(SHLIBEXT) \
	$(TOPLIBD)/libkrb5$(SHLIBEXT)
SHLIB_EXPLIBS=-lkrb5 -lcom_err -lk5crypto $(LIBS)
SHLIB_DIRS=-L$(TOPLIBD)
SHLIB_RDIRS=$(KRB5_LIBDIR)


all:: 

SRCS= \
	$(srcdir)/keytab.c \
	$(srcdir)/encrypt_key.c \
	$(srcdir)/decrypt_key.c \
	$(srcdir)/kdb_cpw.c \
	$(srcdir)/kdb_db2.c \
	$(srcdir)/kdb_xdr.c \
	$(srcdir)/verify_mky.c \
	$(srcdir)/fetch_mkey.c \
	$(srcdir)/setup_mkey.c \
	$(srcdir)/store_mkey.c

STOBJLISTS=OBJS.ST
STLIBOBJS= \
	keytab.o \
	encrypt_key.o \
	decrypt_key.o \
	kdb_cpw.o \
	kdb_db2.o \
	kdb_xdr.o \
	verify_mky.o \
	fetch_mkey.o \
	setup_mkey.o \
	store_mkey.o

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

t_kdb:	t_kdb.o $(OBJS) $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o t_kdb t_kdb.o $(OBJS) $(KDB5_LIBS) $(KRB5_BASE_LIBS)

check::	t_kdb
	$(KRB5_CONFIG_SETUP) $(KRB5_RUN_ENV) ./t_kdb -tcv
	$(KRB5_CONFIG_SETUP) $(KRB5_RUN_ENV) ./t_kdb -tcvr

clean::
	$(RM) t_kdb t_kdb.o

