blob: 541e69697f1c153007a73e48239f83c9761e21d7 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
2include $(COMMON_BASE_MK)
3
4NAME := libwolfssl
5SRC_DIR := wolfssl-4.8.1-stable
6INSTALL_DIR := $(LIB_DIR)/$(NAME)/install
7
8CONFIG_OPTS := --host=arm-linux --build=x86_64-unknown-linux-gnu --target=arm-linux
9CONFIG_OPTS += --prefix=$(INSTALL_DIR)
10CONFIG_OPTS += --disable-shared --enable-static
11CONFIG_OPTS += --disable-nls
12CONFIG_OPTS += --enable-reproducible-build
13CONFIG_OPTS += --enable-lighty
14CONFIG_OPTS += --enable-opensslall
15CONFIG_OPTS += --enable-opensslextra
16CONFIG_OPTS += --enable-sni
17CONFIG_OPTS += --enable-stunnel
18CONFIG_OPTS += --disable-crypttests
19CONFIG_OPTS += --disable-examples
20CONFIG_OPTS += --disable-jobserver
21CONFIG_OPTS += --enable-ipv6
22CONFIG_OPTS += --enable-aesccm
23CONFIG_OPTS += --enable-certgen
24CONFIG_OPTS += --enable-chacha
25CONFIG_OPTS += --enable-poly1305
26CONFIG_OPTS += --enable-dh
27CONFIG_OPTS += --enable-arc4
28CONFIG_OPTS += --enable-tlsv10
29CONFIG_OPTS += --enable-tls13
30CONFIG_OPTS += --enable-session-ticket
31CONFIG_OPTS += --disable-dtls
32CONFIG_OPTS += --disable-curve25519
33CONFIG_OPTS += --disable-afalg
34CONFIG_OPTS += --enable-devcrypto=no
35CONFIG_OPTS += --enable-ocsp
36CONFIG_OPTS += --enable-ocspstapling
37CONFIG_OPTS += --enable-ocspstapling2
38CONFIG_OPTS += --enable-wpas
39CONFIG_OPTS += --enable-fortress
40CONFIG_OPTS += --enable-fastmath
41CONFIG_OPTS += --disable-sslv3
42CONFIG_OPTS += --disable-armasm
43
44
45all: $(SRC_DIR)/Makefile
46 make -C $(SRC_DIR)
47 make -C $(SRC_DIR) install
48
49$(SRC_DIR)/Makefile:
50 cd $(SRC_DIR) && ./autogen.sh
51 cd $(SRC_DIR) && ./configure C_EXTRA_FLAGS="-g1" $(CONFIG_OPTS)
52
53clean:
54 -make -C $(SRC_DIR) distclean
55 -rm -rf $(INSTALL_DIR)
56
57romfs:
58 cd $(INSTALL_DIR)/lib; \
59 for i in *.so*; do \
60 if [ -L $$i ]; then \
61 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
62 elif [ -f $$i ]; then \
63 $(ROMFSINST) /lib/$$i; \
64 fi; \
65 done
66