1 # FreeS/WAN pathnames and other master configuration
2 # Copyright (C) 2001, 2002 Henry Spencer.
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>.
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
14 # RCSID $Id: Makefile.inc,v 1.17.2.3 2002/04/12 02:37:17 mcr Exp $
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.
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.
33 ### boilerplate, do not change
40 # DESTDIR can be used to supply a prefix to all install targets.
41 # (Note that "final" pathnames, signifying where files will eventually
42 # reside rather than where install puts them, are exempt from this.)
43 # The prefixing is done in this file, so as to have central control over
44 # it; DESTDIR itself should never appear in any other Makefile.
47 # "local" part of tree, used in building other pathnames
48 INC_USRLOCAL=/usr/local
50 # PUBDIR is where the "ipsec" command goes; beware, many things define PATH
51 # settings which are assumed to include it (or at least, to include *some*
52 # copy of the "ipsec" command).
53 PUBDIR=$(DESTDIR)$(INC_USRLOCAL)/sbin
55 # BINDIR is where commands get put, FINALBINDIR is where the "ipsec"
56 # command will look for them when it is run.
57 FINALBINDIR=$(INC_USRLOCAL)/lib/ipsec
58 BINDIR=$(DESTDIR)$(FINALBINDIR)
60 # where the appropriate manpage tree is located
61 # location within INC_USRLOCAL
64 MANTREE=$(DESTDIR)$(INC_USRLOCAL)/$(INC_MANDIR)
65 # all relevant subdirectories of MANTREE
66 MANPLACES=man3 man5 man8
68 # where configuration files go
70 CONFDIR=$(DESTDIR)$(FINALCONFDIR)
72 # An attempt is made to automatically figure out where boot/shutdown scripts
73 # will finally go: the first directory in INC_RCDIRS which exists gets them.
74 # If none of those exists (or INC_RCDIRS is empty), INC_RCDEFAULT gets them.
75 # With a non-null DESTDIR, INC_RCDEFAULT will be used unless one of the
76 # INC_RCDIRS directories has been pre-created under DESTDIR.
77 INC_RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d
78 INC_RCDEFAULT=/etc/rc.d/init.d
80 # RCDIR is where boot/shutdown scripts go; FINALRCDIR is where they think
81 # will finally be (so utils/Makefile can create a symlink in BINDIR to the
82 # place where the boot/shutdown script will finally be, rather than the
83 # place where it is installed).
84 FINALRCDIR=$(shell for d in $(INC_RCDIRS) ; \
85 do if test -d $(DESTDIR)/$$d ; \
86 then echo $$d ; exit 0 ; \
87 fi ; done ; echo $(INC_RCDEFAULT) )
88 RCDIR=$(DESTDIR)$(FINALRCDIR)
94 # Kernel location: where patches are inserted, where kernel builds are done.
95 KERNELSRC=/usr/src/linux
97 # things whose existence indicates what kernel version we have
98 DIRIN22=$(KERNELSRC)/net/netlink
99 FILIN24=$(KERNELSRC)/net/khttpd/main.c
101 # where kernel configuration outputs are located
102 KCFILE=$(KERNELSRC)/.config
103 ACFILE=$(KERNELSRC)/include/linux/autoconf.h
104 VERFILE=$(KERNELSRC)/include/linux/version.h
108 ### misc installation stuff
110 # what program to use when installing things
113 # flags to the install program, for programs, manpages, and config files
114 # -b has install make backups (n.b., unlinks original), --suffix controls
115 # how backup names are composed.
116 # Note that the install procedures will never overwrite an existing config
117 # file, which is why -b is not specified for them.
118 INSTBINFLAGS=-b --suffix=.old
124 ### misc configuration, included here in hopes that other files will not
125 ### have to be changed for common customizations.
127 # extra compile flags, for userland and kernel stuff, e.g. -g for debug info
128 # (caution, this stuff is still being sorted out, will change in future)
132 # command used to link/copy KLIPS into kernel source tree
133 # There are good reasons why this is "ln -s"; only people like distribution
134 # builders should ever change it.
137 # extra options for use in kernel build
140 # kernel Makefile targets to be done before build
141 # Can be overridden if you are *sure* your kernel doesn't need them. (2.2.xx
142 # and later reportedly do not.)
146 # kernel make name: zImage for 2.0.xx, bzImage for 2.2.xx and later, and
147 # boot on non-x86s (what ever happened to standards?)
148 INC_B=$(shell test -d $(DIRIN22) && echo b)
149 KERNEL=$(shell if expr " `uname -m`" : ' i.86' >/dev/null ; \
150 then echo $(INC_B)zImage ; \
154 # temporary directory to be used when building RPMs, and where to put the
156 RPMKERNDIR := $(shell echo `pwd`/tmp.rpmkernel)
157 RPMTMPDIR := $(shell echo `pwd`/tmp.rpmbuild)
158 RPMDEST := $(shell echo `pwd`/rpms)
161 # Set this to a RedHat kernel-sources RPM. This normally extracts into
162 # /usr/src/linux-2.4, but you might have extracted it elsewhere with
165 RH_KERNELSRC=/usr/src/linux-2.4
167 #RH_KERNELSRC=/a3/kernel_sources/linux-2.4.2
168 #RH_KERNELSRC=/a3/kernel_sources/linux-2.4.9-13
169 #RH_KERNELSRC=/c2/kernel/rh/linux-2.4.9-13