OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / lib / Makefile.kernel
1 # FreeS/WAN library
2 # Copyright (C) 1998-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.kernel,v 1.17 2002/03/22 03:06:48 henry Exp $
15
16
17
18 include $(ROOTDIR)/freeswan/Makefile.inc
19 include $(ROOTDIR)/freeswan/Makefile.ver
20
21
22
23 ifndef TOPDIR
24 TOPDIR  := /usr/src/linux
25 endif
26
27 L_TARGET := libkernel.a
28
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
33
34 HDRS=freeswan.h internal.h
35
36
37 EXTRA_CFLAGS += -I. -I.. $(KLIPSCOMPILE)
38
39 ifeq ($(CONFIG_IPSEC_DEBUG),y)
40 EXTRA_CFLAGS += -g
41 endif
42
43 EXTRA_CFLAGS += -Wall 
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
51 #EXTRA_CFLAGS += -W
52 #EXTRA_CFLAGS += -Wwrite-strings 
53 #EXTRA_CFLAGS += -Wbad-function-cast 
54
55 active-objs     := $(sort $(obj-y) $(obj-m))
56 L_OBJS          := $(obj-y)
57 M_OBJS          := $(obj-m)
58 MIX_OBJS        := $(filter $(export-objs), $(active-objs))
59
60 include $(TOPDIR)/Rules.make
61
62 $(obj-y):       $(HDRS)
63
64 # build version.c using version number from Makefile.ver
65 version.c:      version.in.c
66         sed '/"/s/xxx/$(IPSECVERSION)/' $< >$@
67
68 clean:
69         rm -f $(L_TARGET) *.o try* core *.core version.c
70         ( cd des && $(MAKE) clean )