thisconfigdir=./..
myfulldir=kadmin/v4server
mydir=v4server
BUILDTOP=$(REL)..$(S)..
DEFINES = -DKADM5 -DNEED_SOCKETS @HESIOD_DEFS@
PROG_LIBPATH=-L$(TOPLIBD) $(KRB4_LIBPATH)
PROG_RPATH=$(KRB5_LIBDIR)
LOCAL_SUBDIRS = unit-test

HESIOD_LIBS=@HESIOD_LIBS@

LOCALINCLUDES = $(KRB4_INCLUDES) -I. -I$(srcdir)

PROG = kadmind4
OBJS = kadm_server.o admin_server.o kadm_ser_wrap.o \
	kadm_funcs.o kadm_supp.o acl_files.o

all:: $(PROG)

$(PROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(KDB5_DEPLIBS) $(KRB4COMPAT_DEPLIBS)
	$(CC_LINK) -o $(PROG) $(OBJS) $(KADMCLNT_LIBS) $(KDB5_LIBS) \
		$(KRB4COMPAT_LIBS) $(HESIOD_LIBS)

build_pwfile: build_pwfile.o $(DB_DEPLIB) $(KRB4COMPAT_DEPLIBS)
	$(CC_LINK) -o build_pwfile build_pwfile.o $(DB_LIB) \
		$(KRB4COMPAT_LIBS) $(HESIOD_LIBS)

install::
	$(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(SERVER_BINDIR)/$(PROG)

clean::
	$(RM) $(PROG) $(OBJS) build_pwfile build_pwfile.o
	$(RM) kadm_err.h kadm_err.c
