~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to debian/openswan-modules-source-build/modules/openswan/Makefile.inc

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# FreeS/WAN pathnames and other master configuration
2
 
# Copyright (C) 2001, 2002  Henry Spencer.
3
 
4
 
# This program is free software; you can redistribute it and/or modify it
5
 
# under the terms of the GNU General Public License as published by the
6
 
# Free Software Foundation; either version 2 of the License, or (at your
7
 
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
8
 
9
 
# This program is distributed in the hope that it will be useful, but
10
 
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11
 
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
 
# for more details.
13
 
#
14
 
# RCSID $Id: Makefile.inc,v 1.68.2.5 2004/06/17 00:55:44 ken Exp $
15
 
 
16
 
 
17
 
 
18
 
# Variables in this file with names starting with INC_ are not for use
19
 
# by Makefiles which include it; they are subject to change without warning.
20
 
#
21
 
# "Final" and "finally" refer to where the files will end up on the
22
 
# running IPsec system, as opposed to where they get installed by our
23
 
# Makefiles.  (The two are different for cross-compiles and the like,
24
 
# where our Makefiles are not the end of the installation process.)
25
 
# Paths with FINAL in their names are the only ones that the installed
26
 
# software itself depends on.  (Very few things should know about the
27
 
# FINAL paths; think twice and consult Henry before making something new
28
 
# depend on them.)  All other paths are install targets.
29
 
# See also DESTDIR, below.
30
 
 
31
 
 
32
 
 
33
 
### boilerplate, do not change
34
 
SHELL=/bin/sh
35
 
 
36
 
### paths within the source tree
37
 
 
38
 
KLIPSINC=${FREESWANSRCDIR}/linux/include
39
 
KLIPSSRC=${FREESWANSRCDIR}/linux/net/ipsec
40
 
 
41
 
LIBFREESWANDIR=${FREESWANSRCDIR}/linux/lib/libfreeswan
42
 
FREESWANLIB=${FREESWANSRCDIR}/lib/libfreeswan/libfreeswan.a
43
 
 
44
 
LWRESDIR=${FREESWANSRCDIR}/lib/liblwres
45
 
LWRESLIB=${LWRESDIR}/liblwres.a
46
 
 
47
 
LIBDESSRCDIR=${FREESWANSRCDIR}/linux/crypto/ciphers/des
48
 
LIBDESLITE=${FREESWANSRCDIR}/lib/libdes/libdes.a
49
 
 
50
 
LIBPOLICYDIR=${FREESWANSRCDIR}/linux/lib/libipsecpolicy
51
 
POLICYLIB=${FREESWANSRCDIR}/lib/libipsecpolicy/libipsecpolicy.a
52
 
 
53
 
.PHONY: programs checkprograms clean
54
 
 
55
 
### install pathnames
56
 
 
57
 
# DESTDIR can be used to supply a prefix to all install targets.
58
 
# (Note that "final" pathnames, signifying where files will eventually
59
 
# reside rather than where install puts them, are exempt from this.)
60
 
# The prefixing is done in this file, so as to have central control over
61
 
# it; DESTDIR itself should never appear in any other Makefile.
62
 
DESTDIR?=
63
 
 
64
 
# "local" part of tree, used in building other pathnames
65
 
INC_USRLOCAL=/usr/local
66
 
 
67
 
# PUBDIR is where the "ipsec" command goes; beware, many things define PATH
68
 
# settings which are assumed to include it (or at least, to include *some*
69
 
# copy of the "ipsec" command).
70
 
PUBDIR=$(DESTDIR)$(INC_USRLOCAL)/sbin
71
 
 
72
 
# BINDIR is where sub-commands get put, FINALBINDIR is where the "ipsec"
73
 
# command will look for them when it is run. Also called LIBEXECDIR.
74
 
FINALLIBEXECDIR=$(INC_USRLOCAL)/libexec/ipsec
75
 
LIBEXECDIR=$(DESTDIR)$(FINALBINDIR)
76
 
 
77
 
FINALBINDIR=${FINALLIBEXECDIR}
78
 
BINDIR=${LIBEXECDIR}
79
 
 
80
 
 
81
 
# SBINDIR is where the user interface command goes.
82
 
FINALSBINDIR=$(INC_USRLOCAL)/sbin
83
 
SBINDIR=$(DESTDIR)$(FINALSBINDIR)
84
 
 
85
 
# libdir is where utility files go
86
 
FINALLIBDIR=$(INC_USRLOCAL)/lib/ipsec
87
 
LIBDIR=$(DESTDIR)$(FINALLIBDIR)
88
 
 
89
 
 
90
 
# where the appropriate manpage tree is located
91
 
# location within INC_USRLOCAL
92
 
INC_MANDIR=man
93
 
# the full pathname
94
 
MANTREE=$(DESTDIR)$(INC_USRLOCAL)/$(INC_MANDIR)
95
 
# all relevant subdirectories of MANTREE
96
 
MANPLACES=man3 man5 man8
97
 
 
98
 
# where configuration files go
99
 
FINALCONFFILE?=/etc/ipsec.conf
100
 
CONFFILE=$(DESTDIR)$(FINALCONFFILE)
101
 
 
102
 
FINALCONFDIR?=/etc
103
 
CONFDIR=$(DESTDIR)$(FINALCONFDIR)
104
 
 
105
 
FINALCONFDDIR?=${FINALCONFDIR}/ipsec.d
106
 
CONFDDIR=$(DESTDIR)$(FINALCONFDDIR)
107
 
 
108
 
# sample configuration files go into
109
 
INC_DOCDIR?=share/doc
110
 
FINALEXAMPLECONFDIR=${INC_USRLOCAL}/${INC_DOCDIR}/freeswan
111
 
EXAMPLECONFDIR=${DESTDIR}${FINALEXAMPLECONFDIR}
112
 
 
113
 
FINALDOCDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/freeswan
114
 
DOCDIR=${DESTDIR}${FINALDOCDIR}
115
 
 
116
 
# where per-conn pluto logs go
117
 
VARDIR?=/var
118
 
FINALLOGDIR?=${VARDIR}/log
119
 
LOGDIR?=${DESTDIR}${FINALLOGDIR}
120
 
 
121
 
 
122
 
# An attempt is made to automatically figure out where boot/shutdown scripts 
123
 
# will finally go:  the first directory in INC_RCDIRS which exists gets them.
124
 
# If none of those exists (or INC_RCDIRS is empty), INC_RCDEFAULT gets them.
125
 
# With a non-null DESTDIR, INC_RCDEFAULT will be used unless one of the
126
 
# INC_RCDIRS directories has been pre-created under DESTDIR.
127
 
INC_RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d
128
 
INC_RCDEFAULT=/etc/rc.d/init.d
129
 
 
130
 
# RCDIR is where boot/shutdown scripts go; FINALRCDIR is where they think
131
 
# will finally be (so utils/Makefile can create a symlink in BINDIR to the
132
 
# place where the boot/shutdown script will finally be, rather than the
133
 
# place where it is installed).
134
 
FINALRCDIR=$(shell for d in $(INC_RCDIRS) ; \
135
 
                do if test -d $(DESTDIR)/$$d ; \
136
 
                then echo $$d ; exit 0 ; \
137
 
                fi ; done ; echo $(INC_RCDEFAULT) )
138
 
RCDIR=$(DESTDIR)$(FINALRCDIR)
139
 
 
140
 
 
141
 
 
142
 
### kernel pathnames
143
 
 
144
 
# Kernel location:  where patches are inserted, where kernel builds are done.
145
 
 
146
 
# this is a hack using the wildcard to look for existence of a file/dir
147
 
ifneq ($(wildcard /usr/src/linux-2.4),)
148
 
KERNELSRC?=/usr/src/linux-2.4
149
 
else
150
 
KERNELSRC?=/usr/src/linux
151
 
endif
152
 
 
153
 
 
154
 
# where kernel configuration outputs are located
155
 
KCFILE=$(KERNELSRC)/.config
156
 
ACFILE=$(KERNELSRC)/include/linux/autoconf.h
157
 
VERFILE=$(KERNELSRC)/include/linux/version.h
158
 
 
159
 
 
160
 
 
161
 
### misc installation stuff
162
 
 
163
 
# what program to use when installing things
164
 
INSTALL=install
165
 
 
166
 
# flags to the install program, for programs, manpages, and config files
167
 
# -b has install make backups (n.b., unlinks original), --suffix controls
168
 
# how backup names are composed.
169
 
# Note that the install procedures will never overwrite an existing config
170
 
# file, which is why -b is not specified for them.
171
 
INSTBINFLAGS=-b --suffix=.old
172
 
INSTMANFLAGS=
173
 
INSTCONFFLAGS=
174
 
 
175
 
 
176
 
### misc configuration, included here in hopes that other files will not
177
 
### have to be changed for common customizations.
178
 
 
179
 
# extra compile flags, for userland and kernel stuff, e.g. -g for debug info
180
 
# (caution, this stuff is still being sorted out, will change in future)
181
 
USERCOMPILE?=-g -O3
182
 
KLIPSCOMPILE=-O3
183
 
 
184
 
# command used to link/copy KLIPS into kernel source tree
185
 
# There are good reasons why this is "ln -s"; only people like distribution
186
 
# builders should ever change it.
187
 
KLIPSLINK=ln -s -f
188
 
 
189
 
# extra options for use in kernel build
190
 
KERNMAKEOPTS=
191
 
 
192
 
# kernel Makefile targets to be done before build
193
 
# Can be overridden if you are *sure* your kernel doesn't need them.  (2.2.xx
194
 
# and later reportedly do not.)
195
 
KERNDEP=dep
196
 
KERNCLEAN=clean
197
 
 
198
 
# kernel make name:  zImage for 2.0.xx, bzImage for 2.2.xx and later, and
199
 
# boot on non-x86s (what ever happened to standards?)
200
 
INC_B=$(shell test -d $(DIRIN22) && echo b)
201
 
KERNEL=$(shell if expr " `uname -m`" : ' i.86' >/dev/null ; \
202
 
        then echo $(INC_B)zImage ; \
203
 
        else echo boot ; \
204
 
        fi)
205
 
 
206
 
#
207
 
# default number of bits for ipsec newhostkey
208
 
#
209
 
RSAKEYBITS:=2192
210
 
 
211
 
# temporary directory to be used when building RPMs, and where to put the
212
 
# resulting RPM tree
213
 
RPMKERNDIR := $(shell echo `pwd`/tmp.rpmkernel)
214
 
RPMTMPDIR := $(shell echo `pwd`/tmp.rpmbuild)
215
 
RPMDEST := $(shell echo `pwd`/rpms)
216
 
 
217
 
# Newer versions of RPM do not permit building of packages with the "rpm" 
218
 
# command. For RedHat systems with older version of RPM, use:
219
 
# RPMBUILD=rpm
220
 
# instead.
221
 
RPMBUILD=rpmbuild
222
 
 
223
 
### paths to resources on the host system
224
 
#
225
 
# Set this to a RedHat kernel-sources RPM. This normally extracts into
226
 
# /usr/src/linux-2.4, but you might have extracted it elsewhere with
227
 
# rpm2cpio.
228
 
#
229
 
RH_KERNELSRC?=/usr/src/linux-2.4
230
 
 
231
 
#RH_KERNELSRC=/c2/kernel/rh/linux-2.4.9-13
232
 
 
233
 
 
234
 
## build environment variations
235
 
##
236
 
 
237
 
# set this to a place where you have installed a bind9.3 
238
 
# snapshot (20021115 or better). A bind 9.2, particularly a RedHat
239
 
# installed one in RH 7.2, won't work - you wind up depending upon
240
 
# openssl.
241
 
 
242
 
BIND9STATICLIBDIR?=/usr/local/lib
243
 
 
244
 
# if you install elsewere, you may need to point the include files to it.
245
 
#BIND9STATICLIBDIR?=/sandel/lib
246
 
#BIND9INCDIR?=/sandel/include
247
 
 
248
 
# FreeSWAN 3.x will require bind9. 
249
 
USE_LWRES?=false
250
 
 
251
 
# whether or not to use iproute2 based commands.
252
 
#
253
 
USE_IPROUTE2?=true
254
 
 
255
 
# what kind of firewalling to use:
256
 
#  2.0  - ipfwadm
257
 
#  2.2  - ipchains
258
 
#  2.4  - iptables
259
 
#  2.6  - iptables
260
 
IPSEC_FIREWALLTYPE=iptables
261
 
 
262
 
# whether or not to include ipsec policy code into pluto.
263
 
# false for now, since it is still experimental.
264
 
USE_IPSECPOLICY?=false
265
 
 
266
 
# include IKEPING in the distribution
267
 
USE_IKEPING?=true
268
 
 
269
 
# include support for KEY RR 
270
 
# this will become false in late 2003.
271
 
USE_KEYRR?=true
272
 
 
273
 
# include support for KERNEL 2.5/2.6 IPsec in pluto
274
 
USE_KERNEL26?=true
275
 
 
276
 
# do we have pthreads available?  Ususally yes, but on some embedded
277
 
# systems, we don't.
278
 
HAVE_THREADS?=true
279
 
 
280
 
# include XAUTH authentication system.
281
 
# off by default, since XAUTH is tricky, and you can get into security trouble
282
 
USE_XAUTH?=false
283
 
 
284
 
# when doing XAUTH, include PAM support as well, requires threads.
285
 
USE_XAUTHPAM?=false
286
 
 
287
 
# whether to support NAT traversal (in pluto!)
288
 
USE_NAT_TRAVERSAL?=true
289
 
 
290
 
# where to support NAT-T in transport mode (needed for Win2K NAT-T Interop)
291
 
USE_NAT_TRAVERSAL_TRANSPORT_MODE?=true
292
 
 
293
 
# should opportunistic encryption be turned on by default?
294
 
USE_OE?=no
295
 
ifeq ($(USE_OE),no)
296
 
# warning: examples subdirectory is statically defined here
297
 
OE_FLAG=\#Disable Opportunistic Encryption\\ninclude ${FINALCONFDDIR}/examples/no_oe.conf
298
 
else
299
 
endif
300
 
 
301
 
# set this to space where a linked/configured tree can be created by 
302
 
# preprhkern4module. Only needed if you are going to be created RPMs
303
 
# outside of a distribution (as the FS team does for RedHat).
304
 
#RH_KERNELSRC_POOL=/c2/freeswan/rh_kern
305
 
 
306
 
# the following is a list of symbols which will be used to construct
307
 
# the module goo to identify which module goes with each kernel.
308
 
MODULE_GOO_LIST=irq_stat netif_rx register_sysctl_table send_sig
309
 
MODULE_GOO_LIST+=kmalloc __kfree_skb __ip_select_ident alloc_skb
310
 
MODULE_GOO_LIST+=icmp_send ip_fragment sock_register 
311
 
 
312
 
MODULE_DEF_INCLUDE=${FREESWANSRCDIR}/packaging/linus/config-all.h
313
 
MODULE_DEFCONFIG?=${KLIPSSRC}/defconfig
314
 
 
315
 
MODULE_FLAGS:=KLIPSMODULE=true TOPDIR=${KERNELSRC} -f ${MODULE_DEFCONFIG}
316
 
 
317
 
# supply kernel-configuration ARCH defaults
318
 
ifeq ($(ARCH),)
319
 
ARCH := $(shell uname -m)
320
 
endif
321
 
# always sanitize $(ARCH)
322
 
ARCH := $(shell echo $(ARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
323
 
 
324
 
# export everything so that scripts can use them.
325
 
export LIBFREESWANDIR FREESWANSRCDIR FREESWANLIB
326
 
 
327
 
-include ${FREESWANSRCDIR}/Makefile.ver
328
 
 
329
 
# for emacs
330
 
#
331
 
# Local Variables: ;;;
332
 
# mode: makefile ;;;
333
 
# End Variables: ;;;
334
 
#