From f0dc76db35866d126e259bfbc13ce88da09ef67f Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 4 Oct 2000 00:21:17 +0000 Subject: [PATCH] a test build tree for racoon IKE daemon. you need KAME tree to compile this (point the top by ${KAMEROOT} in Makefile.inc). XXX maybe too big for /sbin...869K with certificate support, and 574K without certificate support (i386, stripped, static-link) --- sbin/racoon/Makefile | 5 ++++ sbin/racoon/Makefile.inc | 12 +++++++++ sbin/racoon/libpfkey/Makefile | 26 ++++++++++++++++++++ sbin/racoon/racoon/Makefile | 46 +++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 sbin/racoon/Makefile create mode 100644 sbin/racoon/Makefile.inc create mode 100644 sbin/racoon/libpfkey/Makefile create mode 100644 sbin/racoon/racoon/Makefile diff --git a/sbin/racoon/Makefile b/sbin/racoon/Makefile new file mode 100644 index 000000000000..d2b2ad406bcd --- /dev/null +++ b/sbin/racoon/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2000/10/04 00:21:17 itojun Exp $ + +SUBDIR+=libpfkey racoon + +.include diff --git a/sbin/racoon/Makefile.inc b/sbin/racoon/Makefile.inc new file mode 100644 index 000000000000..0167f1b1324a --- /dev/null +++ b/sbin/racoon/Makefile.inc @@ -0,0 +1,12 @@ +# $NetBSD: Makefile.inc,v 1.1 2000/10/04 00:21:18 itojun Exp $ + +# point top of your KAME tree by ${KAMEROOT} +#KAMEROOT= /home/itojun/k +#LIBPFKEYSRCDIR= ${KAMEROOT}/kame/kame/kame/libipsec +#RACOONSRCDIR= ${KAMEROOT}/kame/kame/kame/racoon +#TCPDUMPSRCDIR= ${KAMEROOT}/kame/kame/kame/tcpdump + +# this may or may not work. +##TCPDUMPSRCDIR= ${.CURDIR}/../../../usr.sbin/tcpdump + +.include "../Makefile.inc" diff --git a/sbin/racoon/libpfkey/Makefile b/sbin/racoon/libpfkey/Makefile new file mode 100644 index 000000000000..1f2d6c0fd795 --- /dev/null +++ b/sbin/racoon/libpfkey/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2000/10/04 00:21:21 itojun Exp $ + +LIB= pfkey +CFLAGS+=-g -Wall -Werror +CPPFLAGS+=-DIPSEC_DEBUG -DIPSEC -DINET6 -I. -DYY_NO_UNPUT -I${LIBPFKEYSRCDIR} + +SRCS= pfkey.c pfkey_dump.c ipsec_strerror.c +SRCS+= key_debug.c +#YPREFIX=__libyy +#LPREFIX=__libyy +#YHEADER=1 + +#MAN= ipsec_set_policy.3 ipsec_strerror.3 +#MLINKS+=ipsec_set_policy.3 ipsec_get_policylen.3 \ +# ipsec_set_policy.3 ipsec_dump_policy.3 + +MKPIC=no +MKPROFILE=no +MKLINT=no + +# don't install it into public place! +libinstall:: + +.include + +.PATH: ${LIBPFKEYSRCDIR} ${.CURDIR}/../../../sys/netkey diff --git a/sbin/racoon/racoon/Makefile b/sbin/racoon/racoon/Makefile new file mode 100644 index 000000000000..0761658820bd --- /dev/null +++ b/sbin/racoon/racoon/Makefile @@ -0,0 +1,46 @@ +# $NetBSD: Makefile,v 1.1 2000/10/04 00:21:22 itojun Exp $ + +PROG= racoon +SRCS= main.c session.c isakmp.c handler.c \ + isakmp_ident.c isakmp_agg.c isakmp_base.c \ + isakmp_quick.c isakmp_inf.c isakmp_newg.c \ + pfkey.c admin.c ipsec_doi.c oakley.c grabmyaddr.c \ + policy.c localconf.c remoteconf.c crypto_openssl.c algorithm.c \ + cfparse.c cftoken.c strnames.c \ + vmbuf.c plog.c logger.c schedule.c str2val.c misc.c sockmisc.c \ + proposal.c sainfo.c vendorid.c safefile.c + +MAN= racoon.8 racoon.conf.5 + +# debugging code with print-isakmp.c +SRCS+= print-isakmp.c +CPPFLAGS+=-I${TCPDUMPSRCDIR} -I${TCPDUMPSRCDIR}/lbl -DHAVE_PRINT_ISAKMP_C=1 + +# for debugging malloc/free +#.if exists(/usr/pkg/lib/libefence.a) || exists(/usr/pkg/lib/libefence.so) +#LDADD+=-L/usr/pkg/lib -lefence +#.endif + +LIBPFKEYDIR!= cd ${.CURDIR}/../libpfkey; make print-objdir +LDADD+= -L${LIBPFKEYDIR} -lpfkey +DPADD+= ${LIBPFKEYDIR}/libpfkey.a +LDADD+= -lipsec -ly -ll -lcrypto +DPADD+= ${LIBIPSEC} ${LIBY} ${LIBL} ${LIBCRYPTO} + +WARNS=0 + +#CFLAGS+=-g +OPTFLAG+=-DHAVE_PFKEYV2 -DYIPS_DEBUG +CPPFLAGS+=-DINET6 -DHAVE_FUNCTION_MACRO=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBL=1 -DHAVE_LIBY=1 -DENABLE_IPV6=1 -DADVAPI=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_VARARGS_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 $(OPTFLAG) -DIPSEC -I${RACOONSRCDIR} -I. -Dss_family=__ss_family -Dss_len=__ss_len -DSYSCONFDIR=\"$(ETCDIR)\" +CPPFLAGS+=-DHAVE_OPENSSL_OPENSSLV_H=1 +CPPFLAGS+=-DYY_NO_UNPUT +CPPFLAGS+=-I${LIBPFKEYSRCDIR} +YFLAGS+=-d + +# Certificate support +CPPFLAGS+=-DHAVE_SIGNING_C=1 -DHAVE_OPENSSL_PEM_H=1 -DHAVE_OPENSSL_X509_H=1 + +.include + +.PATH: ${RACOONSRCDIR} ${TCPDUMPSRCDIR} +CLEANFILES+= y.tab.h cfparse.c cftoken.c