1# Id: Makefile.am,v 1.23 2005/07/01 08:57:50 manubsd Exp
2
3sbin_PROGRAMS = racoon racoonctl plainrsa-gen
4noinst_PROGRAMS = eaytest
5include_racoon_HEADERS = racoonctl.h var.h vmbuf.h misc.h gcmalloc.h admin.h \
6	schedule.h sockmisc.h vmbuf.h isakmp_var.h isakmp.h isakmp_xauth.h \
7	isakmp_cfg.h isakmp_unity.h ipsec_doi.h evt.h
8lib_LTLIBRARIES = libracoon.la
9
10adminsockdir=${localstatedir}/racoon
11
12BUILT_SOURCES = cfparse.h prsa_par.h
13INCLUDES = -I${srcdir}/../libipsec
14AM_CFLAGS = -D_GNU_SOURCE @GLIBC_BUGS@ -DSYSCONFDIR=\"${sysconfdir}\" \
15	-DADMINPORTDIR=\"${adminsockdir}\"
16AM_LDFLAGS = @EXTRA_CRYPTO@ -lcrypto
17AM_YFLAGS = -d ${$*_YFLAGS}
18AM_LFLAGS = ${$*_LFLAGS}
19
20prsa_par_YFLAGS = -p prsa
21prsa_tok_LFLAGS = -Pprsa -olex.yy.c
22
23MISSING_ALGOS = \
24	missing/crypto/sha2/sha2.c \
25	missing/crypto/rijndael/rijndael-api-fst.c \
26	missing/crypto/rijndael/rijndael-alg-fst.c
27
28racoon_SOURCES = \
29	main.c session.c isakmp.c handler.c \
30	isakmp_ident.c isakmp_agg.c isakmp_base.c \
31	isakmp_quick.c isakmp_inf.c isakmp_newg.c \
32	gssapi.c dnssec.c getcertsbyname.c privsep.c \
33	pfkey.c admin.c evt.c ipsec_doi.c oakley.c grabmyaddr.c vendorid.c \
34	policy.c localconf.c remoteconf.c crypto_openssl.c algorithm.c \
35	proposal.c sainfo.c strnames.c \
36	plog.c logger.c schedule.c str2val.c \
37	safefile.c backupsa.c genlist.c rsalist.c \
38	cftoken.l cfparse.y prsa_tok.l prsa_par.y
39EXTRA_racoon_SOURCES = isakmp_xauth.c isakmp_cfg.c isakmp_unity.c throttle.c \
40	isakmp_frag.c nattraversal.c security.c $(MISSING_ALGOS)
41racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(LEXLIB) \
42	 $(SECCTX_OBJS) vmbuf.o sockmisc.o misc.o ../libipsec/libipsec.la
43racoon_DEPENDENCIES = \
44	$(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(SECCTX_OBJS) \
45	vmbuf.o sockmisc.o misc.o
46
47racoonctl_SOURCES = racoonctl.c str2val.c
48racoonctl_LDADD = libracoon.la ../libipsec/libipsec.la
49
50libracoon_la_SOURCES = kmpstat.c vmbuf.c sockmisc.c misc.c
51
52plainrsa_gen_SOURCES = plainrsa-gen.c plog.c \
53	crypto_openssl.c logger.c
54EXTRA_plainrsa_gen_SOURCES = $(MISSING_ALGOS)
55plainrsa_gen_LDADD = $(CRYPTOBJS) vmbuf.o misc.o
56plainrsa_gen_DEPENDENCIES = $(CRYPTOBJS) vmbuf.o misc.o
57
58eaytest_SOURCES = eaytest.c plog.c logger.c
59EXTRA_eaytest_SOURCES = missing/crypto/sha2/sha2.c
60eaytest_LDADD =	crypto_openssl_test.o vmbuf.o str2val.o misc_noplog.o \
61	$(CRYPTOBJS)
62eaytest_DEPENDENCIES = crypto_openssl_test.o vmbuf.o str2val.o \
63	misc_noplog.o $(CRYPTOBJS)
64
65noinst_HEADERS = \
66	admin.h           dnssec.h      isakmp_base.h   oakley.h      session.h \
67	admin_var.h       dump.h        isakmp_ident.h  pfkey.h       sockmisc.h \
68	algorithm.h       gcmalloc.h    isakmp_inf.h    plog.h        str2val.h \
69	backupsa.h        gnuc.h        isakmp_newg.h   policy.h      strnames.h \
70	grabmyaddr.h      isakmp_quick.h  proposal.h    var.h         evt.h \
71	gssapi.h          isakmp_var.h	vendorid.h      nattraversal.h\
72	crypto_openssl.h  handler.h     localconf.h     remoteconf.h  vmbuf.h \
73	debug.h           ipsec_doi.h   logger.h        safefile.h \
74	debugrm.h         isakmp.h      misc.h          sainfo.h \
75	dhgroup.h         isakmp_agg.h  netdb_dnssec.h  schedule.h \
76	isakmp_cfg.h      isakmp_xauth.h isakmp_unity.h isakmp_frag.h \
77	throttle.h	  privsep.h \
78	cfparse_proto.h	  cftoken_proto.h genlist.h     rsalist.h \
79	missing/crypto/sha2/sha2.h missing/crypto/rijndael/rijndael_local.h \
80	missing/crypto/rijndael/rijndael-api-fst.h \
81	missing/crypto/rijndael/rijndael-alg-fst.h \
82	missing/crypto/rijndael/rijndael.h
83
84man5_MANS = racoon.conf.5
85man8_MANS = racoon.8 racoonctl.8 plainrsa-gen.8
86
87EXTRA_DIST = \
88   ${man5_MANS} ${man8_MANS} \
89   missing/crypto/rijndael/boxes-fst.dat \
90   doc/FAQ doc/README.certificate doc/README.gssapi doc/README.plainrsa \
91   contrib/sp.pl stats.pl \
92   samples/psk.txt.sample  samples/racoon.conf.sample \
93   samples/psk.txt.in samples/racoon.conf.in \
94   samples/racoon.conf.sample-gssapi samples/racoon.conf.sample-natt \
95   samples/racoon.conf.sample-inherit samples/racoon.conf.sample-plainrsa \
96   samples/roadwarrior/README \
97   samples/roadwarrior/client/phase1-down.sh \
98   samples/roadwarrior/client/phase1-up.sh \
99   samples/roadwarrior/client/racoon.conf \
100   samples/roadwarrior/server/racoon.conf \
101   samples/roadwarrior/server/racoon.conf-radius
102
103TESTS = eaytest
104
105install-exec-local:
106	${mkinstalldirs} $(DESTDIR)${adminsockdir}
107
108# special object rules
109crypto_openssl_test.o: crypto_openssl.c
110	$(COMPILE) -DEAYDEBUG -o crypto_openssl_test.o -c $(srcdir)/crypto_openssl.c
111
112misc_noplog.o: misc.c
113	$(COMPILE) -DNOUSE_PLOG -o misc_noplog.o -c $(srcdir)/misc.c
114
115# missing/*.c
116strdup.o:	$(srcdir)/missing/strdup.c
117	$(COMPILE) -c $(srcdir)/missing/$*.c
118getaddrinfo.o:	$(srcdir)/missing/getaddrinfo.c
119	$(COMPILE) -c $(srcdir)/missing/$*.c
120getnameinfo.o:	$(srcdir)/missing/getnameinfo.c
121	$(COMPILE) -c $(srcdir)/missing/$*.c
122rijndael-api-fst.o: $(srcdir)/missing/crypto/rijndael/rijndael-api-fst.c
123	$(COMPILE) -c $(srcdir)/missing/crypto/rijndael/$*.c
124rijndael-alg-fst.o: $(srcdir)/missing/crypto/rijndael/rijndael-alg-fst.c
125	$(COMPILE) -c $(srcdir)/missing/crypto/rijndael/$*.c
126sha2.o: $(srcdir)/missing/crypto/sha2/sha2.c
127	$(COMPILE) -c $(srcdir)/missing/crypto/sha2/$*.c
128