mydir=tests$(S)asn.1 BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) LDAP=@LDAP@ RUN_SETUP = @KRB5_RUN_ENV@ SRCS= $(srcdir)/krb5_encode_test.c $(srcdir)/krb5_decode_test.c \ $(srcdir)/krb5_decode_leak.c $(srcdir)/ktest.c \ $(srcdir)/ktest_equal.c $(srcdir)/utility.c \ $(srcdir)/trval.c $(srcdir)/t_trval.c all:: krb5_encode_test krb5_decode_test krb5_decode_leak t_trval LOCALINCLUDES = -I$(srcdir)/../../lib/krb5/asn.1 ENCOBJS = krb5_encode_test.o ktest.o ktest_equal.o utility.o trval.o krb5_encode_test: $(ENCOBJS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o krb5_encode_test $(ENCOBJS) $(KRB5_BASE_LIBS) DECOBJS = krb5_decode_test.o ktest.o ktest_equal.o utility.o krb5_decode_test: $(DECOBJS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o krb5_decode_test $(DECOBJS) $(KRB5_BASE_LIBS) LEAKOBJS = krb5_decode_leak.o ktest.o ktest_equal.o utility.o krb5_decode_leak: $(LEAKOBJS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o krb5_decode_leak $(LEAKOBJS) $(KRB5_BASE_LIBS) t_trval: t_trval.o $(CC) -o t_trval $(ALL_CFLAGS) t_trval.o check:: check-encode check-encode-trval check-decode check-leak # Does not actually test for leaks unless using valgrind or a similar # tool, but does exercise a bunch of code. check-leak: krb5_decode_leak KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \ export KRB5_CONFIG ;\ $(RUN_SETUP) $(VALGRIND) ./krb5_decode_leak check-decode: krb5_decode_test KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \ export KRB5_CONFIG ;\ $(RUN_SETUP) $(VALGRIND) ./krb5_decode_test expected_encode.out: reference_encode.out ldap_encode.out if test "$(LDAP)" = yes; then \ cat $(srcdir)/reference_encode.out $(srcdir)/ldap_encode.out > expected_encode.out; \ else \ cat $(srcdir)/reference_encode.out > expected_encode.out; \ fi expected_trval.out: trval_reference.out ldap_trval.out if test "$(LDAP)" = yes; then \ cat $(srcdir)/trval_reference.out $(srcdir)/ldap_trval.out > expected_trval.out; \ else \ cat $(srcdir)/trval_reference.out > expected_trval.out; \ fi check-encode: krb5_encode_test expected_encode.out KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \ export KRB5_CONFIG ;\ $(RUN_SETUP) $(VALGRIND) ./krb5_encode_test > test.out cmp test.out expected_encode.out check-encode-trval: krb5_encode_test expected_trval.out KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \ export KRB5_CONFIG ;\ $(RUN_SETUP) $(VALGRIND) ./krb5_encode_test -t > trval.out cmp trval.out expected_trval.out install:: clean:: rm -f *~ *.o krb5_encode_test krb5_decode_test krb5_decode_leak test.out trval t_trval expected_encode.out expected_trval.out trval.out ################ Dependencies ################ krb5_decode_test.o: ktest.h utility.h ktest_equal.h debug.h krb5_encode_test.o: utility.h ktest.h debug.h trval.o: trval.c ktest.o: ktest.h utility.h ktest_equal.o: ktest_equal.h #utility.o: utility.h #utility.h: krbasn1.h asn1buf.h ##############################################