thisconfigdir=./../..
myfulldir=kadmin/testing/util
mydir=testing/util
BUILDTOP=$(REL)..$(S)..$(S)..
LOCALINCLUDES = $(TCL_INCLUDES)
# Force Tcl headers to use stdarg.h, because krb5 does too, and if
# Tcl uses varargs.h it'll just mess things up.
DEFINES= -DHAS_STDARG

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

SRCS	=	$(srcdir)/tcl_ovsec_kadm.c $(srcdir)/tcl_kadm5.c $(srcdir)/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) $(TCL_MAYBE_RPATH) \
		$(KADMSRV_LIBS) $(KRB5_BASE_LIBS) $(TCL_LIBS)

$(CLNTPROG): $(OBJS) $(KADMCLNT_DEPLIBS) $(KRB5_BASE_DEPLIBS)
	$(CC_LINK) -o $(CLNTPROG) $(OBJS) $(TCL_MAYBE_RPATH) \
		$(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)
# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
$(OUTPRE)tcl_ovsec_kadm.$(OBJEXT): tcl_ovsec_kadm.c \
  $(BUILDTOP)/include/kadm5/admin.h $(BUILDTOP)/include/gssrpc/rpc.h \
  $(BUILDTOP)/include/gssrpc/types.h $(BUILDTOP)/include/gssrpc/rename.h \
  $(BUILDTOP)/include/gssrpc/xdr.h $(BUILDTOP)/include/gssrpc/auth.h \
  $(BUILDTOP)/include/gssrpc/clnt.h $(BUILDTOP)/include/gssrpc/rpc_msg.h \
  $(BUILDTOP)/include/gssrpc/auth_unix.h $(BUILDTOP)/include/gssrpc/auth_gss.h \
  $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssrpc/svc_auth.h \
  $(BUILDTOP)/include/gssrpc/svc.h $(BUILDTOP)/include/krb5.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-int.h $(BUILDTOP)/include/krb5/osconf.h \
  $(BUILDTOP)/include/krb5/autoconf.h $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h $(BUILDTOP)/include/profile.h \
  $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
  $(SRCTOP)/include/krb5/kdb.h $(BUILDTOP)/include/kadm5/kadm_err.h \
  $(BUILDTOP)/include/kadm5/adb_err.h $(BUILDTOP)/include/kadm5/chpass_util_strings.h \
  tcl_kadm5.h
$(OUTPRE)tcl_kadm5.$(OBJEXT): tcl_kadm5.c $(BUILDTOP)/include/kadm5/admin.h \
  $(BUILDTOP)/include/gssrpc/rpc.h $(BUILDTOP)/include/gssrpc/types.h \
  $(BUILDTOP)/include/gssrpc/rename.h $(BUILDTOP)/include/gssrpc/xdr.h \
  $(BUILDTOP)/include/gssrpc/auth.h $(BUILDTOP)/include/gssrpc/clnt.h \
  $(BUILDTOP)/include/gssrpc/rpc_msg.h $(BUILDTOP)/include/gssrpc/auth_unix.h \
  $(BUILDTOP)/include/gssrpc/auth_gss.h $(BUILDTOP)/include/gssapi/gssapi.h \
  $(BUILDTOP)/include/gssrpc/svc_auth.h $(BUILDTOP)/include/gssrpc/svc.h \
  $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-int.h \
  $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h \
  $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  $(BUILDTOP)/include/profile.h $(SRCTOP)/include/port-sockets.h \
  $(SRCTOP)/include/socket-utils.h $(SRCTOP)/include/krb5/kdb.h \
  $(BUILDTOP)/include/kadm5/kadm_err.h $(BUILDTOP)/include/kadm5/adb_err.h \
  $(BUILDTOP)/include/kadm5/chpass_util_strings.h tcl_kadm5.h
$(OUTPRE)test.$(OBJEXT): test.c tcl_kadm5.h

