thisconfigdir=./..
myfulldir=kadmin/v4server
mydir=v4server
BUILDTOP=$(REL)$(U)$(S)$(U)
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_stream.o kadm_supp.o acl_files.o kadm_err.o

all:: $(PROG)

kadm_err.c kadm_err.h: kadm_err.et

$(OBJS): kadm_err.h

$(PROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(DB_DEPLIB) $(KRB4COMPAT_DEPLIBS)
	$(CC_LINK) -o $(PROG) $(OBJS) $(KADMCLNT_LIBS) $(DB_LIB) \
		$(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}$(ADMIN_BINDIR)/$(PROG)

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