summaryrefslogtreecommitdiff
path: root/linux/net/ipsec/alg/Makefile.alg_serpent
blob: 1a2383a6a91a8d6da7c351d476fdff6dd16ecddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
MOD_SERPENT := ipsec_serpent.o

ALG_MODULES += $(MOD_SERPENT)
ALG_SUBDIRS += libserpent

obj-$(CONFIG_IPSEC_ALG_SERPENT) += $(MOD_SERPENT)
static_init-func-$(CONFIG_IPSEC_ALG_SERPENT)+= ipsec_serpent_init
alg_obj-$(CONFIG_IPSEC_ALG_SERPENT) += ipsec_alg_serpent.o

SERPENT_OBJS=ipsec_alg_serpent.o libserpent/libserpent.a
$(MOD_SERPENT) : libserpent $(SERPENT_OBJS)
	$(LD) -r $(SERPENT_OBJS) -o $@

libserpent : $(LIBCRYPTO)/libserpent 
	test -d $@ || mkdir $@ ;exit 0
	test -d $@/asm || mkdir $@/asm;exit 0
	cd $@ && ln -sf $?/Makefile $?/*.[chS] .

libserpent/libserpent.a:
	( cd libserpent && \
		$(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) $(EXTRA_CFLAGS)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' libserpent.a ;)