2 # Copyright (C) 1998-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.kernel,v 1.17 2002/03/22 03:06:48 henry Exp $
18 include $(ROOTDIR)/freeswan/Makefile.inc
19 include $(ROOTDIR)/freeswan/Makefile.ver
24 TOPDIR := /usr/src/linux
27 L_TARGET := libkernel.a
29 obj-y := addrtoa.o datatot.o goodmask.o \
30 pfkey_v2_build.o pfkey_v2_debug.o pfkey_v2_ext_bits.o pfkey_v2_parse.o \
31 prng.o rangetoa.o satoa.o \
32 subnetof.o subnettoa.o ultoa.o version.o
34 HDRS=freeswan.h internal.h
37 EXTRA_CFLAGS += -I. -I.. $(KLIPSCOMPILE)
39 ifeq ($(CONFIG_IPSEC_DEBUG),y)
44 #EXTRA_CFLAGS += -Wconversion
45 #EXTRA_CFLAGS += -Wmissing-prototypes
46 EXTRA_CFLAGS += -Wpointer-arith
47 #EXTRA_CFLAGS += -Wcast-qual
48 #EXTRA_CFLAGS += -Wmissing-declarations
49 EXTRA_CFLAGS += -Wstrict-prototypes
50 #EXTRA_CFLAGS += -pedantic
52 #EXTRA_CFLAGS += -Wwrite-strings
53 #EXTRA_CFLAGS += -Wbad-function-cast
55 active-objs := $(sort $(obj-y) $(obj-m))
58 MIX_OBJS := $(filter $(export-objs), $(active-objs))
60 include $(TOPDIR)/Rules.make
64 # build version.c using version number from Makefile.ver
65 version.c: version.in.c
66 sed '/"/s/xxx/$(IPSECVERSION)/' $< >$@
69 rm -f $(L_TARGET) *.o try* core *.core version.c
70 ( cd des && $(MAKE) clean )