1
# I really am not happy about using symlinks to make this work.
3
# I think that there should be a better way to do this.
4
# see module26.sh in packaging/makefiles
9
$(error You Must set OPENSWANSRCDIR)
12
include ${OPENSWANSRCDIR}/Makefile.inc
14
KLIPS_TOP := ${OPENSWANSRCDIR}/linux
16
# include file with .h-style macros that would otherwise be created by
17
# config. Must occur before other includes.
18
ifneq ($(strip $(MODULE_DEF_INCLUDE)),)
19
EXTRA_CFLAGS += -include ${MODULE_DEF_INCLUDE}
22
EXTRA_CFLAGS += -I${KLIPS_TOP}/include
24
# build version.c using version number from Makefile.ver
25
${BUILDDIR}/version.c: ${KLIPSSRC}/version.in.c ${OPENSWANSRCDIR}/Makefile.ver
26
sed '/"/s/xxx/$(IPSECVERSION)/' ${KLIPSSRC}/version.in.c >$@
28
${BUILDDIR}/%.c : ${KLIPSSRC}/%.c
31
${BUILDDIR}/%.h : ${KLIPSSRC}/%.h
34
${BUILDDIR}/%.c : ${KLIPSSRC}/des/%.c
37
${BUILDDIR}/%.S : ${KLIPSSRC}/des/%.S
40
${BUILDDIR}/%.c : ${KLIPSSRC}/aes/%.c
43
${BUILDDIR}/%.c : ${KLIPSSRC}/alg/%.c
46
.PRECIOUS: ${BUILDDIR}/%.c ${BUILDDIR}/%.h
48
# I'm not fixing this in a better way, because we should use the
50
${BUILDDIR}/deflate.c: ${BUILDDIR}/deflate.h
51
${BUILDDIR}/infblock.c: ${BUILDDIR}/infblock.h ${BUILDDIR}/inftrees.h
52
${BUILDDIR}/infblock.c: ${BUILDDIR}/infcodes.h ${BUILDDIR}/infutil.h
53
${BUILDDIR}/infcodes.c: ${BUILDDIR}/inffast.h
54
${BUILDDIR}/inftrees.c: ${BUILDDIR}/inffixed.h
55
${BUILDDIR}/trees.c: ${BUILDDIR}/trees.h
57
include ${OPENSWANSRCDIR}/packaging/makefiles/module.defs
58
include ${KLIPSSRC}/Makefile.fs2_6
60
ipsec-obj-$(CONFIG_KLIPS_AH)+= ipsec_ah.o
61
ipsec-obj-$(CONFIG_KLIPS_ESP)+= ipsec_esp.o
62
ipsec-obj-$(CONFIG_KLIPS_IPCOMP)+= ipsec_ipcomp.o
63
ipsec-obj-$(CONFIG_KLIPS_AUTH_HMAC_MD5) += ipsec_md5c.o
64
ipsec-obj-$(CONFIG_KLIPS_AUTH_HMAC_SHA1) += ipsec_sha1.o
66
# AH, if you really think you need it.
67
ipsec-obj-$(CONFIG_KLIPS_AH) += ipsec_ah.o
69
ipsec-obj-$(CONFIG_KLIPS_ALG) += ipsec_alg.o
71
#ipsec-obj-$(CONFIG_KLIPS_ENC_3DES) += des/
72
#ipsec-obj-$(CONFIG_KLIPS_ENC_AES) += aes/
74
ipsec-obj-$(CONFIG_KLIPS_ENC_CRYPTOAPI) += ipsec_alg_cryptoapi.o
78
ipsec-objs := ${base-klips-objs} ${base-ipcomp-objs} ${ipsec-obj-m} ${ipsec-obj-y}
80
# XXX and it seems that recursing into subdirs is a PITA for out-of-kernel
81
# module builds. At least, it never occurs for me.
82
aes-obj-${CONFIG_KLIPS_ENC_AES} += aes/ipsec_alg_aes.o
83
aes-obj-${CONFIG_KLIPS_ENC_AES} += aes/aes_xcbc_mac.o
84
aes-obj-${CONFIG_KLIPS_ENC_AES} += aes/aes_cbc.o
86
ifeq ($(strip ${SUBARCH}),)
90
ifeq (${SUBARCH},i386)
91
aes-obj-${CONFIG_KLIPS_ENC_AES} += aes/aes-i586.o
93
aes-obj-${CONFIG_KLIPS_ENC_AES} += aes/aes.o
96
des-obj-$(CONFIG_KLIPS_ENC_3DES) += cbc_enc.o
97
des-obj-$(CONFIG_KLIPS_ENC_3DES) += ecb_enc.o
98
des-obj-$(CONFIG_KLIPS_ENC_3DES) += set_key.o
100
ifeq ($(strip ${SUBARCH}),)
104
# XXX and I still can't get the assembler to get invoked at the right time.
105
ifeq (${SUBARCH},i386)
106
des-obj-$(CONFIG_KLIPS_ENC_3DES) += dx86unix.o
108
des-obj-$(CONFIG_KLIPS_ENC_3DES) += des_enc.o
111
ipsec-objs += ${des-obj-m} ${aes-obj-m}