|  | 
 | # | 
 | # this makefile gets recursed through by various bits of the build | 
 | # so we need to only setup some things when invoked from outside | 
 | # this directory. | 
 | # | 
 | # davidm@snapgear.com | 
 | # | 
 | include $(COMMON_BASE_MK) | 
 |  | 
 | NAME := libssl | 
 | SRC_DIR := openssl-1.1.1o | 
 | INSTALL_DIR := $(LIB_DIR)/$(NAME)/install | 
 |  | 
 | export ac_cv_lbl_unaligned_fail=yes | 
 | export ac_cv_func_mmap_fixed_mapped=yes | 
 | export ac_cv_func_memcmp_working=yes | 
 | export ac_cv_have_decl_malloc=yes | 
 | export gl_cv_func_malloc_0_nonnull=yes | 
 | export ac_cv_func_malloc_0_nonnull=yes | 
 | export ac_cv_func_calloc_0_nonnull=yes | 
 | export ac_cv_func_realloc_0_nonnull=yes | 
 | export lt_cv_sys_lib_search_path_spec="" | 
 | export ac_cv_c_bigendian=no | 
 | export CROSS_COMPILE=$(CROSS_ROOT)/usr/bin/$(CROSS_COMPILE_PREFIX) | 
 | export CC=gcc | 
 | export GCC=gcc | 
 | export CPP=cpp | 
 | export AS=as | 
 | export LD=ld | 
 | export NM=nm | 
 | export CXX=g++ | 
 | export AR=ar | 
 | export RANLIB=ranlib | 
 | export READELF=readelf | 
 | export STRIP=strip | 
 | export OBJCOPY=objcopy | 
 | export OBJDUMP=objdump | 
 |  | 
 | export CPPFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | 
 | export CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 | 
 | export CXXFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 | 
 |  | 
 | CONFIG_OPTS := linux-armv4 | 
 | CONFIG_OPTS += --prefix=$(INSTALL_DIR) | 
 | CONFIG_OPTS += --openssldir=$(INSTALL_DIR)/etc/ssl | 
 |  | 
 | CONFIG_OPTS += no-shared | 
 | ifeq ($(CONFIG_LIBSSL_SHARE_LIB), y) | 
 | CONFIG_OPTS += shared | 
 | endif | 
 | #CONFIG_OPTS += -latomic | 
 | CONFIG_OPTS += threads | 
 | CONFIG_OPTS += no-rc5 | 
 | CONFIG_OPTS += enable-camellia | 
 | CONFIG_OPTS += enable-mdc2 | 
 | CONFIG_OPTS += no-tests | 
 | CONFIG_OPTS += no-fuzz-libfuzzer | 
 | CONFIG_OPTS += no-fuzz-afl | 
 | CONFIG_OPTS += no-rc5 | 
 | CONFIG_OPTS += no-rc2 | 
 | CONFIG_OPTS += no-rc4 | 
 | CONFIG_OPTS += no-md2 | 
 | ifneq ($(CONFIG_WIFI_MODULE), aic8800) | 
 | CONFIG_OPTS += no-md4 | 
 | CONFIG_OPTS += no-des | 
 | endif | 
 | CONFIG_OPTS += no-mdc2 | 
 | CONFIG_OPTS += no-blake2 | 
 | CONFIG_OPTS += no-idea | 
 | CONFIG_OPTS += no-seed | 
 |  | 
 | CONFIG_OPTS += no-rmd160 | 
 | CONFIG_OPTS += no-whirlpool | 
 | CONFIG_OPTS += no-ssl | 
 | CONFIG_OPTS += no-ssl2 | 
 | CONFIG_OPTS += no-weak-ssl-ciphers | 
 | CONFIG_OPTS += no-psk | 
 | CONFIG_OPTS += no-cast | 
 | CONFIG_OPTS += no-unit-test | 
 | CONFIG_OPTS += no-crypto-mdebug-backtrace | 
 | CONFIG_OPTS += no-crypto-mdebug | 
 | CONFIG_OPTS += no-autoerrinit | 
 | CONFIG_OPTS += no-dynamic-engine | 
 | CONFIG_OPTS += no-comp | 
 | CONFIG_OPTS += zlib-dynamic | 
 | CONFIG_OPTS += no-async | 
 | CONFIG_OPTS += no-dso | 
 | CONFIG_OPTS += --with-rand-seed=devrandom | 
 |  | 
 | all: $(SRC_DIR)/Makefile | 
 | 	make -C $(SRC_DIR) | 
 | 	make -C $(SRC_DIR) install | 
 |  | 
 | $(SRC_DIR)/Makefile: | 
 | 	cd $(SRC_DIR) && ./Configure $(CONFIG_OPTS) | 
 |  | 
 | clean: | 
 | 	-make -C $(SRC_DIR) distclean | 
 | 	-rm -rf $(INSTALL_DIR) | 
 |  | 
 | romfs: | 
 | ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes) | 
 | 	$(ROMFSINST) $(INSTALL_DIR)/bin/openssl /bin/openssl | 
 | endif | 
 | 	cd $(INSTALL_DIR)/lib; \ | 
 | 	for i in *.so*; do \ | 
 | 		if [ -L $$i ]; then \ | 
 | 			$(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \ | 
 | 		elif [ -f $$i ]; then \ | 
 | 			$(ROMFSINST) /lib/$$i; \ | 
 | 		fi; \ | 
 | 	done | 
 |  | 
 | populate_sdk: | 
 | 	cp -afvp $(INSTALL_DIR)/include/*  $(CROSS_COMPILE_SYSROOT)/usr/include/ | 
 | 	cp -afvp $(INSTALL_DIR)/lib/*  $(CROSS_COMPILE_SYSROOT)/usr/lib/ | 
 | 	cp -afvp $(INSTALL_DIR)/bin/*  $(CROSS_COMPILE_SYSROOT)/usr/bin/ |