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
PRE_CPPFLAGS = -I.. -I$(top_srcdir)
PRE_LDFLAGS = -L..
12

13
14
15
16
OPENSSL_LIBFLAGS = @OPENSSL_LIBFLAGS@
TARGETS = nettle-benchmark @RSA_EXAMPLES@
SOURCES = nettle-benchmark.c nettle-openssl.c \
	io.c getopt.c getopt1.c \
17
	rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
18
19
20
21

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

DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) run-tests setup-env teardown-env \
22
	io.h rsa-session.h getopt.h
23
24
25
26

all: $(TARGETS)

.c.$(OBJEXT):
27
	$(COMPILE) -c $<
28
.o$(EXEEXT):
29
	$(LINK) $^ -lnettle $(LIBS) -o $@
30
31

nettle-benchmark: nettle-benchmark.o nettle-openssl.o ../libnettle.a
32
	$(LINK) $^ -lnettle $(LIBS) $(OPENSSL_LIBFLAGS) -o $@
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

$(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 $@

66
install uninstall:
67
68
69
	true

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

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

distclean: clean
	-rm -f Makefile
77
78

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