summaryrefslogtreecommitdiff
path: root/linux/net/ipsec/alg/Makefile.alg_sha2
blob: 956a0f1a313e3125e9a97ffa0a5df667a3daf320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
MOD_SHA2 := ipsec_sha2.o

ALG_MODULES += $(MOD_SHA2)
ALG_SUBDIRS += libsha2

obj-$(CONFIG_IPSEC_ALG_SHA2) += $(MOD_SHA2)
static_init-func-$(CONFIG_IPSEC_ALG_SHA2)+= ipsec_sha2_init
alg_obj-$(CONFIG_IPSEC_ALG_SHA2) += ipsec_alg_sha2.o

SHA2_OBJS := ipsec_alg_sha2.o libsha2/libsha2.a

$(MOD_SHA2): libsha2 $(SHA2_OBJS)
	$(LD) $(EXTRA_LDFLAGS) -r $(SHA2_OBJS) -o $@

libsha2 : $(LIBCRYPTO)/libsha2 
	test -d $@ || mkdir $@ ;exit 0
	test -d $@/asm || mkdir $@/asm;exit 0
	cd $@ && ln -sf $?/Makefile $?/*.[chS] .
	
libsha2/libsha2.a:
	( cd libsha2 && \
		$(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) $(EXTRA_CFLAGS)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' libsha2.a ;)