]> git.ipfire.org Git - people/ms/strongswan.git/blame - testing/scripts/recipes/012_wolfssl.mk
testing: Build wolfSSL from the Git repository
[people/ms/strongswan.git] / testing / scripts / recipes / 012_wolfssl.mk
CommitLineData
de5ca402
AS
1#!/usr/bin/make
2
3PKG = wolfssl
19611b1d
TB
4SRC = https://github.com/wolfSSL/$(PKG).git
5REV = 0caf3ba456f1 # v4.7.1r + SHA-3 fix
de5ca402
AS
6
7NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN)
8
9CFLAGS = \
10 -DWOLFSSL_PUBLIC_MP \
11 -DWOLFSSL_DES_ECB \
12 -DHAVE_AES_ECB \
13 -DHAVE_ECC_BRAINPOOL \
19611b1d 14 -DWOLFSSL_MIN_AUTH_TAG_SZ=8
de5ca402
AS
15
16CONFIG_OPTS = \
17 --disable-crypttests \
18 --disable-examples \
19 --enable-silent-rules \
20 --enable-aesccm \
21 --enable-aesctr \
19611b1d 22 --enable-camellia \
de5ca402 23 --enable-curve25519 \
de5ca402 24 --enable-curve448 \
19611b1d
TB
25 --enable-des3 \
26 --enable-ecccustcurves \
27 --enable-ed25519 \
de5ca402 28 --enable-ed448 \
19611b1d
TB
29 --enable-keygen \
30 --enable-md4 \
de5ca402 31 --enable-rsapss \
de5ca402 32 --enable-sha3 \
19611b1d 33 --enable-shake256
de5ca402
AS
34
35all: install
36
19611b1d
TB
37.$(PKG)-cloned:
38 [ -d $(PKG) ] || git clone $(SRC) $(PKG)
de5ca402
AS
39 @touch $@
40
19611b1d
TB
41.$(PKG)-checkout-$(REV): .$(PKG)-cloned
42 cd $(PKG) && git fetch && git checkout $(REV)
43 @rm -f .$(PKG)-checkout-* && touch $@
44
45.$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
46 cd $(PKG) && ./autogen.sh && ./configure C_FLAGS="$(CFLAGS)" $(CONFIG_OPTS) && make -j $(NUM_CPUS)
de5ca402
AS
47 @rm -f .$(PKG)-built-* && touch $@
48
49install: .$(PKG)-built-$(REV)
19611b1d 50 cd $(PKG) && make install && ldconfig