Makefile.in 1.77 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
OPENSSL_LIBFLAGS = @OPENSSL_LIBFLAGS@
TARGETS = nettle-benchmark @RSA_EXAMPLES@
SOURCES = nettle-benchmark.c nettle-openssl.c \
	io.c getopt.c getopt1.c \
16
	rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
17 18 19 20

TS_ALL = rsa-sign-test rsa-verify-test rsa-encrypt-test

DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) run-tests setup-env teardown-env \
21
	io.h rsa-session.h getopt.h
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

all: $(TARGETS)

.c.$(OBJEXT):
	$(COMPILE) -I.. -c $<
.o$(EXEEXT):
	$(LINK) $^ $(LIBS) -L.. -lnettle -o $@

nettle-benchmark: nettle-benchmark.o nettle-openssl.o ../libnettle.a
	$(LINK) $^ $(LIBS) -L.. -lnettle $(OPENSSL_LIBFLAGS) -o $@

$(TARGETS) : io.o ../libnettle.a


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

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

../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 $@

65
install uninstall:
66 67 68
	true

distdir: $(DISTFILES)
69
	cp $^ $(distdir)
70 71

clean:
72 73 74 75
	-rm -f $(TARGETS) *.o *.d

distclean: clean
	-rm -f Makefile
76 77

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