mydir=lib$(S)kdb
BUILDTOP=$(REL)..$(S)..
RUN_SETUP = @KRB5_RUN_ENV@
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)
CFLAGS=@CFLAGS@ -DKDB5_USE_LIB_KDB_DB2
LOCALINCLUDES= -I.
DEFS=

# Keep LIBMAJOR in sync with KRB5_KDB_API_VERSION in include/kdb.h.
LIBBASE=kdb5
LIBMAJOR=7
LIBMINOR=0
LIBINITFUNC=kdb_init_lock_list
LIBFINIFUNC=kdb_fini_lock_list
RELDIR=kdb
# Depends on libk5crypto and libkrb5

SHLIB_EXPDEPS = \
	$(TOPLIBD)/libk5crypto$(SHLIBEXT) \
	$(TOPLIBD)/libgssrpc$(SHLIBEXT) \
	$(TOPLIBD)/libkrb5$(SHLIBEXT)
SHLIB_EXPLIBS=-lgssrpc -lkrb5 -lk5crypto -lcom_err $(SUPPORT_LIB) $(DL_LIB) $(LIBS)
SHLIB_DIRS=-L$(TOPLIBD)
SHLIB_RDIRS=$(KRB5_LIBDIR)

adb_err.$(OBJEXT): adb_err.c
adb_err.c adb_err.h: $(srcdir)/adb_err.et

SRCS= \
	$(srcdir)/kdb5.c \
	$(srcdir)/encrypt_key.c \
	$(srcdir)/decrypt_key.c \
	$(srcdir)/kdb_default.c \
	$(srcdir)/kdb_cpw.c \
	adb_err.c \
	$(srcdir)/iprop_xdr.c \
	$(srcdir)/kdb_convert.c \
	$(srcdir)/kdb_log.c \
	$(srcdir)/keytab.c

STOBJLISTS=OBJS.ST
STLIBOBJS= \
	kdb5.o \
	encrypt_key.o \
	decrypt_key.o \
	kdb_default.o \
	kdb_cpw.o \
	adb_err.o \
	iprop_xdr.o \
	kdb_convert.o \
	kdb_log.o \
	keytab.o

all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-liblinks clean-libs clean-libobjs
	$(RM) adb_err.c adb_err.h t_stringattr.o t_stringattr

check-pytests:: t_stringattr
	$(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS)

generate-files-mac: darwin.exports

depend:: adb_err.h

t_stringattr: t_stringattr.o $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $@ t_stringattr.o $(KDB5_LIBS) $(KADM_COMM_LIBS) \
		$(KRB5_BASE_LIBS)

@lib_frag@
@libobj_frag@

