Makefile.in 2.07 KB
Newer Older
1 2 3 4 5 6 7 8 9
@SET_MAKE@

srcdir = @srcdir@
VPATH = @srcdir@

top_srcdir = @top_srcdir@

include ../config.make

10 11
PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..
12

13 14 15 16 17 18 19 20 21 22
TS_SOURCES = aes-test.c arcfour-test.c arctwo-test.c \
	     blowfish-test.c cast128-test.c \
             base16-test.c base64-test.c \
	     des-test.c des3-test.c des-compat-test.c \
	     md2-test.c md4-test.c md5-test.c md5-compat-test.c \
	     sha1-test.c sha256-test.c \
	     serpent-test.c twofish-test.c \
	     buffer-test.c sexp-test.c sexp-format-test.c \
	     rsa2sexp-test.c sexp2rsa-test.c \
	     knuth-lfib-test.c \
23
	     cbc-test.c ctr-test.c hmac-test.c bignum-test.c \
24 25 26 27 28
	     pkcs1-test.c \
	     rsa-test.c rsa-encrypt-test.c rsa-keygen-test.c \
	     dsa-test.c dsa-keygen-test.c \
	     yarrow-test.c
TARGETS = $(TS_SOURCES:.c=$(EXEEXT))
29
TS_SH = sexp-conv-test pkcs1-conv-test symbols-test
30
TS_ALL = $(TARGETS) $(TS_SH)
31 32
EXTRA_SOURCES = sha1-huge-test.c
EXTRA_TARGETS = $(EXTRA_SOURCES:.c=$(EXEEXT))
33 34 35

SOURCES = $(TS_SOURCES) testutils.c

36 37
DISTFILES = $(SOURCES) Makefile.in $(TS_SH) run-tests teardown-env \
	rfc1750.txt testutils.h
38

39
all: $(TARGETS) $(EXTRA_TARGETS)
40

41 42 43 44 45
# BSD (and Solaris) make doesn't allow extra dependencies together one
# single-suffix rules. So in the common case of $(EXEEXT) empty, we
# need a rule -test.$(OBJEXT)-test$(EXEEXT): rather than the simpler
# .$(OBJEXT)$(EXEEXT):

Niels Möller's avatar
Niels Möller committed
46 47
.SUFFIXES: -test.c -test.$(OBJEXT) -test$(EXEEXT)

48 49 50
.c.$(OBJEXT):
	$(COMPILE) -I.. -c $< && $(DEP_PROCESS)

Niels Möller's avatar
Niels Möller committed
51 52 53 54
-test.c-test.$(OBJEXT):
	$(COMPILE) -I.. -c $< && $(DEP_PROCESS)

-test.$(OBJEXT)-test$(EXEEXT):
55
	$(LINK) $< testutils.o -lnettle $(LIBS) -o $@
56

57
$(TARGETS) $(EXTRA_TARGETS) : testutils.$(OBJEXT) ../libnettle.a
58 59 60 61 62 63 64 65 66

check: $(TS_ALL) $(srcdir)/run-tests
	LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
	  $(srcdir)/run-tests $(TS_ALL)


Makefile: $(srcdir)/Makefile.in ../config.status
	cd .. && $(SHELL) ./config.status testsuite/$@

67
install uninstall:
68 69 70
	true

distdir: $(DISTFILES)
71
	cp $? $(distdir)
72 73

clean:
74
	-rm -f $(TARGETS) *.o test.in test1.out test2.out
75 76

distclean: clean
77
	-rm -f Makefile *.d
78

79
@DEP_INCLUDE@ $(SOURCES:.c=.$(OBJEXT).d)