Makefile.in 2.26 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
INCLUDES = -I.. -I$(top_srcdir)

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
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 \
	     cbc-test.c hmac-test.c bignum-test.c \
	     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))
TS_SH = sexp-conv-test symbols-test
TS_ALL = $(TARGETS) $(TS_SH)

SOURCES = $(TS_SOURCES) testutils.c

DISTFILES = $(SOURCES) Makefile.in $(TS_SH) run-tests rfc1750.txt testutils.h

all: $(TARGETS)

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

.o$(EXEEXT):
	$(LINK) $< testutils.o $(LIBS) -L.. -lnettle -o $@
# .c$(EXEEXT):
# 	$(COMPILE) -I..
# 	$(CC) $(CFLAGS) $(LDFLAGS) $*.o testutils.o -L.. -lnettle $(LIBS) -o $@

$(TARGETS) : testutils.$(OBJEXT) ../libnettle.a

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


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

../config.make: $(top_srcdir)/config.make.in ../config.status
	cd .. && $(SHELL) ./config.status config.make

../config.status: $(top_srcdir)/configure
	cd .. && $(SHELL) ./config.status --recheck

../configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
	cd $(top_srcdir) && $(AUTOCONF)

# # FIXME: To we really need all this in all subdirs?
# ../config.h: ../stamp-h1
# 	@cd .. $(MAKE) stamp-h1;
# 
# ../stamp-h1: $(top_srcdir)/config.h.in ../config.status
# 	cd .. && $(MAKE) stamp-h1
# 
# $(top_srcdir)/config.h.in: $(top_srcdir)/configure.ac
# 	cd $(top_srcdir) && $(AUTOHEADER)
# 	rm -f ../stamp-h1
# 	touch $@

install:
	true

distdir: $(DISTFILES)
82
	cp $^ $(distdir)
83 84

clean:
85 86 87 88
	-rm -f $(TARGETS) *.o *.d test.in test1.out test2.out

distclean: clean
	-rm -f Makefile
89 90

-include $(SOURCES:.c=.$(OBJEXT).d)