1 # Makefile for the KLIPS interface utilities
2 # Copyright (C) 1998, 1999 Henry Spencer.
3 # Copyright (C) 1999, 2000, 2001 Richard Guy Briggs
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2 of the License, or (at your
8 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # RCSID $Id: Makefile,v 1.28 2002/01/30 00:17:05 mcr Exp $
18 include ../../Makefile.inc
23 CFLAGS=$(USERCOMPILE) -I../net/ipsec -I../../lib
25 CFLAGS+= $(USERCOMPILE)
27 #CFLAGS+= -Wconversion
28 #CFLAGS+= -Wmissing-prototypes
29 CFLAGS+= -Wpointer-arith
31 #CFLAGS+= -Wmissing-declarations
32 CFLAGS+= -Wstrict-prototypes
35 #CFLAGS+= -Wwrite-strings
36 CFLAGS+= -Wbad-function-cast
38 ALL=spi eroute spigrp tncfg klipsdebug pf_key
39 MANDIR8=$(MANTREE)/man8
40 MANDIR5=$(MANTREE)/man5
41 FREESWANLIB=../../lib/libfreeswan.a
50 mkdir -p $(BINDIR) $(MANDIR8) $(MANDIR5)
51 $(INSTALL) $(ALL) $(BINDIR)
52 for f in $(addsuffix .8, $(ALL)) ; do \
53 $(INSTALL) $$f $(MANDIR8)/ipsec_$$f || exit 1 ; done
54 for f in $(addsuffix .5, $(ALL) version pf_key) ; do \
55 $(INSTALL) $$f $(MANDIR5)/ipsec_$$f || exit 1 ; done
57 constants.o : ../../pluto/constants.c ../../pluto/constants.h
58 $(CC) $(CFLAGS) -c -o $@ $<
60 alg_info.o : ../../pluto/alg_info.c ../../pluto/alg_info.h
61 $(CC) $(CFLAGS) -DNO_PLUTO -c -o $@ $<
63 kernel_alg.o : ../../pluto/kernel_alg.c ../../pluto/kernel_alg.h
64 $(CC) $(CFLAGS) -DNO_PLUTO -c -o $@ $<
66 spi: spi.o constants.o alg_info.o kernel_alg.o
67 $(CC) $(DFLAGS) -o $@ $^ $(FREESWANLIB)
70 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
73 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
76 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
79 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
81 klipsdebug: klipsdebug.o
82 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
99 # Revision 1.28 2002/01/30 00:17:05 mcr
100 # replace -O2 with $(USERCOMPILE) in CFLAGS to match other Makefiles.
102 # Revision 1.27 2002/01/17 04:38:45 rgb
103 # Take compile options from top level Makefile.inc
104 # Change the "programs" target to depend on the "all" target.
106 # Revision 1.26 2001/12/05 07:21:19 rgb
107 # Make sure KLIPS utils get compiled first time through.
109 # Revision 1.25 2001/11/27 16:27:07 mcr
110 # added new "checkprograms" target to deal with programs that
111 # are required for "make check", but that may not be ready to
112 # build for every user due to external dependancies.
114 # Revision 1.24 2001/11/27 05:08:17 rgb
115 # Remove temporary version.o dependancy.
117 # Revision 1.23 2001/11/26 09:24:28 rgb
118 # Added version.o to klipsdebug.
120 # Revision 1.22 2001/11/23 07:23:14 mcr
121 # pulled up klips2 Makefile and pf_key code.
123 # Revision 1.21 2001/10/30 17:42:01 mcr
124 # make all destination dirs used for installation.
126 # Revision 1.20 2001/10/24 14:41:42 henry
129 # Revision 1.17.4.3 2001/10/18 00:13:30 mcr
130 # fix Makefile to reflect name of program is "pf_key" not "pfkey"
132 # Revision 1.17.4.2 2001/10/17 23:25:37 mcr
133 # added "pk_key" program to dump raw kernel pf messages.
134 # (program is still skeletal)
136 # Revision 1.17.4.1 2001/10/01 03:53:08 mcr
137 # changes for UML build (main branch)
139 # Revision 1.17.2.1 2001/09/25 01:31:55 mcr
140 # added usage of $(DESTDIR)
141 # added setting of FREESWANLIB.
143 # Revision 1.17 2001/06/14 19:35:13 rgb
144 # Update copyright date.
146 # Revision 1.16 2000/06/30 06:20:25 rgb
147 # Add version.5 and pf_key.5 to the list of manpages to be installed.
149 # Revision 1.15 2000/06/28 05:51:23 rgb
150 # Install section 5 manpages.
152 # Revision 1.14 2000/01/21 09:44:29 rgb
153 # Added compiler switches to be a lot more fussy.
155 # Revision 1.13 1999/04/11 00:12:07 henry
158 # Revision 1.12 1999/04/06 04:54:37 rgb
159 # Fix/Add RCSID Id: and Log: bits to make PHMDs happy. This includes
162 # Revision 1.11 1999/04/03 05:39:06 henry
163 # install -d doesn't do what I thought
165 # Revision 1.10 1999/04/03 05:23:23 henry
168 # Revision 1.9 1998/11/12 21:11:21 rgb
169 # Change default binary install directory from /usr/local/sbin to
170 # /usr/local/lib/ipsec.
172 # Revision 1.8 1998/11/07 05:38:54 henry
173 # changes for manpage ipsec_ prefix
175 # Revision 1.7 1998/07/28 00:08:07 rgb
178 # Revision 1.6 1998/06/11 05:40:52 rgb
179 # Install manpages when binaries are installed.
181 # Revision 1.5 1998/05/12 02:28:07 rgb
182 # Utils can now be compiled before kernel install/config.
184 # Revision 1.4 1998/05/06 03:35:40 rgb
185 # Changed make install from an 'mv' to a 'cp'.
187 # Revision 1.3 1998/04/23 21:09:16 rgb
188 # Added a userspace util to change kernelspace debug switches.
190 # Revision 1.2 1998/04/14 14:07:01 rgb
191 # Permanently remove setsa.c and addrt.c from the distribution and fix the
194 # Revision 1.1.1.1 1998/04/08 05:35:09 henry
195 # RGB's ipsec-0.8pre2.tar.gz ipsec-0.8
197 # Revision 0.5 1997/06/03 04:31:55 ji
198 # Added esp 3des-md5-96.
199 # Added transport mode configuration utility.
201 # Revision 0.4 1997/01/15 01:38:21 ji
202 # Changed to include setsa.c
204 # Revision 0.3 1996/11/20 14:51:32 ji
205 # Fixed problems with #include paths.
206 # Changed (incorrect) references to ipsp into ipsec.