xref: /openbsd/sbin/isakmpd/Makefile (revision 891d7ab6)
1#	$OpenBSD: Makefile,v 1.82 2010/10/15 10:18:42 jsg Exp $
2#	$EOM: Makefile,v 1.78 2000/10/15 21:33:42 niklas Exp $
3
4#
5# Copyright (c) 1998, 1999, 2000, 2001 Niklas Hallqvist.  All rights reserved.
6# Copyright (c) 2000, 2001 H�kan Olsson.  All rights reserved.
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions
10# are met:
11# 1. Redistributions of source code must retain the above copyright
12#    notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright
14#    notice, this list of conditions and the following disclaimer in the
15#    documentation and/or other materials provided with the distribution.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29#
30# This code was written under funding by Ericsson Radio Systems.
31#
32
33.PATH:		${.CURDIR}/sysdep/openbsd
34
35PROG=		isakmpd
36SRCS=		app.c attribute.c cert.c connection.c constants.c conf.c \
37		cookie.c crypto.c dh.c doi.c exchange.c exchange_num.c \
38		field.c hash.c if.c ike_auth.c ike_main_mode.c \
39		ike_phase_1.c ike_quick_mode.c init.c ipsec.c ipsec_fld.c \
40		ipsec_num.c isakmpd.c isakmp_doi.c isakmp_fld.c isakmp_num.c \
41		key.c libcrypto.c log.c message.c \
42		prf.c sa.c sysdep.c timer.c transport.c virtual.c udp.c \
43		ui.c util.c x509.c \
44		pf_key_v2.c policy.c ike_aggressive.c isakmp_cfg.c \
45		dpd.c monitor.c monitor_fdpass.c nat_traversal.c udp_encap.c \
46		vendor.c
47
48GENERATED=	exchange_num.h ipsec_fld.h ipsec_num.h isakmp_fld.h \
49		isakmp_num.h
50CLEANFILES=	exchange_num.c exchange_num.h ipsec_num.c ipsec_num.h \
51		isakmp_num.c isakmp_num.h ipsec_fld.c ipsec_fld.h \
52		isakmp_fld.c isakmp_fld.h
53MAN=		isakmpd.8 isakmpd.conf.5 isakmpd.policy.5
54CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes \
55		-Wmissing-declarations -I${.CURDIR} -I.
56
57# Include symbolic debugging info
58#DEBUG=		-g
59
60# If you have ElectricFence available, you can spot abuses of the heap.
61# (/usr/ports/devel/ElectricFence)
62#LDADD+=		-L/usr/local/lib -lefence
63#DPADD+=		/usr/local/lib/libefence.a
64
65# If you like to use Boehm's garbage collector (/usr/ports/devel/boehm-gc).
66#LDADD+=		-L/usr/local/lib -lgc
67#DPADD+=		/usr/local/lib/libgc.a
68#CFLAGS+=		-DUSE_BOEHM_GC -DGC_DEBUG
69# You can also use Boehm's garbage collector as a means to find leaks.
70#  # setenv GC_FIND_LEAK
71
72# Enable for DNSSEC use
73#CFLAGS+=	USE_DNSSEC
74#SRCS+=		dnssec.c
75#LWRESLIB=      /usr/local/lib/liblwres.a
76#DNSSEC_CFLAGS= -I/usr/local/include -DLWRES
77
78LDADD+=		${LWRESLIB} -lkeynote -lcrypto -lm
79DPADD+=		${LWRESLIB} ${LIBKEYNOTE} ${LIBCRYPTO} ${LIBM}
80
81exchange_num.c exchange_num.h: stamp_exchange_num
82
83stamp_exchange_num: genconstants.sh exchange_num.cst
84	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/exchange_num
85	@touch $@
86
87ipsec_fld.c ipsec_fld.h: stamp_ipsec_fld
88
89stamp_ipsec_fld: genfields.sh ipsec_fld.fld
90	/bin/sh ${.CURDIR}/genfields.sh ${.CURDIR}/ipsec_fld
91	@touch $@
92
93ipsec_num.c ipsec_num.h: stamp_ipsec_num
94
95stamp_ipsec_num: genconstants.sh ipsec_num.cst
96	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/ipsec_num
97	@touch $@
98
99isakmp_fld.c isakmp_fld.h: stamp_isakmp_fld
100
101stamp_isakmp_fld: genfields.sh isakmp_fld.fld
102	/bin/sh ${.CURDIR}/genfields.sh ${.CURDIR}/isakmp_fld
103	@touch $@
104
105isakmp_num.c isakmp_num.h: stamp_isakmp_num
106
107stamp_isakmp_num: genconstants.sh isakmp_num.cst
108	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/isakmp_num
109	@touch $@
110
111${PROG} beforedepend: ${GENERATED}
112
113CLEANFILES += stamp_exchange_num stamp_ipsec_fld \
114	stamp_ipsec_num stamp_isakmp_fld stamp_isakmp_num
115
116.include <bsd.prog.mk>
117.include <bsd.subdir.mk>
118