lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME := libwolfssl |
| 5 | SRC_DIR := wolfssl-4.8.1-stable |
| 6 | INSTALL_DIR := $(LIB_DIR)/$(NAME)/install |
| 7 | |
| 8 | CONFIG_OPTS := --host=arm-linux --build=x86_64-unknown-linux-gnu --target=arm-linux |
| 9 | CONFIG_OPTS += --prefix=$(INSTALL_DIR) |
| 10 | CONFIG_OPTS += --disable-shared --enable-static |
| 11 | CONFIG_OPTS += --disable-nls |
| 12 | CONFIG_OPTS += --enable-reproducible-build |
| 13 | CONFIG_OPTS += --enable-lighty |
| 14 | CONFIG_OPTS += --enable-opensslall |
| 15 | CONFIG_OPTS += --enable-opensslextra |
| 16 | CONFIG_OPTS += --enable-sni |
| 17 | CONFIG_OPTS += --enable-stunnel |
| 18 | CONFIG_OPTS += --disable-crypttests |
| 19 | CONFIG_OPTS += --disable-examples |
| 20 | CONFIG_OPTS += --disable-jobserver |
| 21 | CONFIG_OPTS += --enable-ipv6 |
| 22 | CONFIG_OPTS += --enable-aesccm |
| 23 | CONFIG_OPTS += --enable-certgen |
| 24 | CONFIG_OPTS += --enable-chacha |
| 25 | CONFIG_OPTS += --enable-poly1305 |
| 26 | CONFIG_OPTS += --enable-dh |
| 27 | CONFIG_OPTS += --enable-arc4 |
| 28 | CONFIG_OPTS += --enable-tlsv10 |
| 29 | CONFIG_OPTS += --enable-tls13 |
| 30 | CONFIG_OPTS += --enable-session-ticket |
| 31 | CONFIG_OPTS += --disable-dtls |
| 32 | CONFIG_OPTS += --disable-curve25519 |
| 33 | CONFIG_OPTS += --disable-afalg |
| 34 | CONFIG_OPTS += --enable-devcrypto=no |
| 35 | CONFIG_OPTS += --enable-ocsp |
| 36 | CONFIG_OPTS += --enable-ocspstapling |
| 37 | CONFIG_OPTS += --enable-ocspstapling2 |
| 38 | CONFIG_OPTS += --enable-wpas |
| 39 | CONFIG_OPTS += --enable-fortress |
| 40 | CONFIG_OPTS += --enable-fastmath |
| 41 | CONFIG_OPTS += --disable-sslv3 |
| 42 | CONFIG_OPTS += --disable-armasm |
| 43 | |
| 44 | |
| 45 | all: $(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 | |
| 53 | clean: |
| 54 | -make -C $(SRC_DIR) distclean |
| 55 | -rm -rf $(INSTALL_DIR) |
| 56 | |
| 57 | romfs: |
| 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 | |