Skip to content

Commit

Permalink
tls_wolfssl: refactor makefile to use dependencies
Browse files Browse the repository at this point in the history
(cherry picked from commit 3e6a0fc)
  • Loading branch information
razvancrainea committed Sep 21, 2023
1 parent 6d4de49 commit 427d1fc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/tls_wolfssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ MOD_DIR ?= $(shell realpath `dirname $(_makefile_path)`)/modules/tls_wolfssl

include ../../Makefile.modules

lib/lib/libwolfssl.a:
@cd ./lib/wolfssl; \
if [ ! -f "configure" ]; then \
./autogen.sh; \
fi; \
if [ ! -f "Makefile" ]; then \
lib/wolfssl/configure:
$(Q)cd ./lib/wolfssl && ./autogen.sh

lib/wolfssl/Makefile: lib/wolfssl/configure
$(Q)cd ./lib/wolfssl && \
env -u DEFS -u CFLAGS -u LDFLAGS -u LIBS ./configure \
--enable-all --disable-fpecc --disable-examples -disable-aligndata \
--enable-writedup --enable-tlsv10 --disable-shared --enable-static \
--disable-jni --disable-crl-monitor \
--prefix=$(MOD_DIR)/lib \
--exec-prefix=$(MOD_DIR)/lib C_EXTRA_FLAGS="-fPIC" CFLAGS="-DWOLFSSL_STATIC_RSA"; \
fi;
@$(MAKE) -C ./lib/wolfssl install

lib/lib/libwolfssl.a: lib/wolfssl/Makefile
$(Q)$(MAKE) -C ./lib/wolfssl install

clean: clean-wolfssl-lib

Expand All @@ -34,4 +34,4 @@ clean-wolfssl-lib:
$(MAKE) -C ./lib/wolfssl clean; \
fi;
@rm -rf ./lib/bin ./lib/include ./lib/lib ./lib/share \
./lib/wolfssl/Makefile ./lib/wolfssl/configure
./lib/wolfssl/Makefile ./lib/wolfssl/configure

0 comments on commit 427d1fc

Please sign in to comment.