Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / usr.sbin / racoon / Makefile
blob79b7ef86dc848e8aabff7cd96b086c97ffa04e37
1 # $NetBSD: Makefile,v 1.21 2008/04/10 15:42:06 tsutsui Exp $
3 WARNS?= 0 # XXX third-party program, many issues
5 .include <bsd.own.mk>
7 USE_FORT?= yes # network client and server
9 PROG= racoon
10 SRCS= main.c session.c isakmp.c handler.c \
11 isakmp_ident.c isakmp_agg.c isakmp_base.c \
12 isakmp_quick.c isakmp_inf.c isakmp_newg.c \
13 gssapi.c dnssec.c getcertsbyname.c privsep.c \
14 pfkey.c admin.c evt.c ipsec_doi.c oakley.c \
15 grabmyaddr.c vendorid.c policy.c localconf.c \
16 remoteconf.c crypto_openssl.c algorithm.c \
17 proposal.c sainfo.c strnames.c plog.c logger.c \
18 schedule.c str2val.c safefile.c backupsa.c \
19 genlist.c rsalist.c cftoken.l cfparse.y \
20 prsa_tok.l prsa_par.y isakmp_xauth.c isakmp_cfg.c \
21 isakmp_unity.c throttle.c isakmp_frag.c \
22 nattraversal.c vmbuf.c sockmisc.c misc.c
23 MAN= racoon.8 racoon.conf.5
25 DIST= ${NETBSDSRCDIR}/crypto/dist/ipsec-tools
26 CPPFLAGS+= -I${DIST}/src/racoon -I${DIST}/src/racoon/missing
27 CPPFLAGS+= -I${DIST}/src/libipsec
28 CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libipsec -I.
29 CPPFLAGS+= -DIPSEC_DEBUG -DHAVE_CONFIG_H
30 CPPFLAGS+= -DADMINPORTDIR=\"/var/run\"
31 CPPFLAGS+= -DSYSCONFDIR=\"/etc/racoon\"
32 CPPFLAGS+= -DSADB_X_EALG_AESCBC=SADB_X_EALG_AES
34 LDADD+= -ll -ly -lipsec -lutil
35 DPADD+= ${LIBL} ${LIBY} ${LIBCRYPTO} ${LIBUTIL}
37 YHEADER=cfparse.h
39 CPPFLAGS+=-DHAVE_LIBRADIUS
40 LDADD+=-lradius
41 DPADD+= ${LIBRADIUS}
42 .if (${USE_PAM} != "no")
43 CPPFLAGS+=-DHAVE_LIBPAM
44 LDADD+= -lpam -lutil ${PAM_STATIC_LDADD}
45 DPADD+= ${LIBPAM} ${PAM_STATIC_DPADD}
46 .endif
47 .if (${USE_KERBEROS} != "no")
48 CPPFLAGS+=-DHAVE_GSSAPI
49 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lcom_err \
50 -lroken -lasn1
51 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBCOM_ERR} \
52 ${LIBROKEN} ${LIBASN1}
53 .endif
54 .if (${MKCRYPTO_IDEA} != "no")
55 CPPFLAGS+=-DHAVE_OPENSSL_IDEA_H
56 LDADD+= -lcrypto_idea
57 LDADD+= ${LIBCRYPTO_IDEA}
58 .endif
59 .if (${MKCRYPTO_RC5} != "no")
60 CPPFLAGS+=-DHAVE_OPENSSL_RC5_H
61 LDADD+= -lcrypto_rc5
62 LDADD+= ${LIBCRYPTO_RC5}
63 .endif
64 .if (${USE_INET6} != "no")
65 CPPFLAGS+=-DINET6
66 .endif
68 LDADD+= -lcrypto -lcrypt
69 DPADD+= ${LIBIPSEC} ${LIBCRYPT}
71 .PATH: ${NETBSDSRCDIR}/lib/libipsec ${DIST}/src/racoon
73 prsa_tok.c: ${DIST}/src/racoon/prsa_tok.l
74 ${LEX} -Pprsa -o${.TARGET} ${.ALLSRC}
76 prsa_par.c: ${DIST}/src/racoon/prsa_par.y
77 ${YACC} -pprsa -d -o ${.TARGET} ${.ALLSRC}
79 .include <bsd.prog.mk>