thisconfigdir=./../..
myfulldir=kadmin/testing/util
mydir=testing/util
BUILDTOP=$(REL)$(U)$(S)$(U)$(S)$(U)
LOCALINCLUDES = $(TCL_INCLUDES)

PROG_LIBPATH=-L$(TOPLIBD) $(TCL_LIBPATH)
PROG_RPATH=$(KRB5_LIBDIR)$(TCL_RPATH)

SRCS	=	tcl_ovsec_kadm.c tcl_kadm5.c test.c
OBJS	=	tcl_ovsec_kadm.o tcl_kadm5.o test.o

CLNTPROG=	ovsec_kadm_clnt_tcl
SRVPROG	=	ovsec_kadm_srv_tcl

DO_ALL=@DO_ALL@

all:: all-$(DO_ALL)

all-::
	@echo "+++"
	@echo "+++ WARNING: Tcl not available.  The kadm5 tests will not be run."
	@echo "+++"

all-tcl:: $(CLNTPROG) $(SRVPROG)

$(SRVPROG): $(OBJS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $(SRVPROG) $(OBJS) \
		$(KADMSRV_LIBS) $(KRB5_BASE_LIBS) $(TCL_LIBS)

$(CLNTPROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $(CLNTPROG) $(OBJS) \
		$(KADMCLNT_LIBS) $(KRB5_BASE_LIBS) $(TCL_LIBS)

bsddb_dump: bsddb_dump.o
	$(CC_LINK) -o bsddb_dump bsddb_dump.o $(KADMSRV_LIBS)

clean:: 
	$(RM) $(CLNTPROG) $(SRVPROG)
