1#	$OpenBSD: Makefile,v 1.90 2021/10/13 16:56:30 tb 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 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# Enable for DNSSEC use
61#CFLAGS+=	USE_DNSSEC
62#SRCS+=		dnssec.c
63#LWRESLIB=      /usr/local/lib/liblwres.a
64#DNSSEC_CFLAGS= -I/usr/local/include -DLWRES
65
66LDADD+=		${LWRESLIB} -lkeynote -lcrypto -lm
67DPADD+=		${LWRESLIB} ${LIBKEYNOTE} ${LIBCRYPTO} ${LIBM}
68
69exchange_num.c exchange_num.h: genconstants.sh exchange_num.cst
70	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/exchange_num
71
72ipsec_fld.c ipsec_fld.h: genfields.sh ipsec_fld.fld
73	/bin/sh ${.CURDIR}/genfields.sh ${.CURDIR}/ipsec_fld
74
75ipsec_num.c ipsec_num.h: genconstants.sh ipsec_num.cst
76	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/ipsec_num
77
78isakmp_fld.c isakmp_fld.h: genfields.sh isakmp_fld.fld
79	/bin/sh ${.CURDIR}/genfields.sh ${.CURDIR}/isakmp_fld
80
81isakmp_num.c isakmp_num.h: genconstants.sh isakmp_num.cst
82	/bin/sh ${.CURDIR}/genconstants.sh ${.CURDIR}/isakmp_num
83
84.PHONY: generated
85generated: ${GENERATED}
86
87BUILDFIRST = ${GENERATED}
88
89.include <bsd.prog.mk>
90
91# Don't compile isakmpd as static binary by default
92LDSTATIC=
93