src/modules/tls_wolfssl/Makefile
7c1326aa
 #
 # TLS module makefile
 #
 #
 # WARNING: do not run this directly, it should be run by the main Makefile
 
 include ../../Makefile.defs
 auto_gen=
 NAME=tls_wolfssl.so
 
38d2a6a1
 LIBS += lib/lib/libwolfssl.a
c170cc81
 INCLUDES += -I./lib/include/
7c1326aa
 
 
 include ../../Makefile.modules
c170cc81
 $(objs): lib/include/wolfssl/options.h
38d2a6a1
 
c170cc81
 lib/include/wolfssl/options.h lib/lib/libwolfssl.a:
38d2a6a1
 	@cd ./lib/wolfssl; \
 	if [ ! -f "configure" ]; then \
 		./autogen.sh; \
 	fi; \
 	if [ ! -f "Makefile" ]; then \
d695c9cc
 		env -u DEFS -u CFLAGS -u LDFLAGS -u LIBS EXTRA_CFLAGS="-g -fPIC -Wno-error=array-bounds -Wno-error=stringop-overflow" ./configure \
38d2a6a1
 		--enable-all --enable-pkcs11 --enable-static --enable-aligndata=no \
d695c9cc
 		--disable-shared --disable-examples \
c170cc81
 		--prefix=$(CURDIR)/lib \
 		--exec-prefix=$(CURDIR)/lib; \
38d2a6a1
 	fi;
 	@$(MAKE) -C ./lib/wolfssl install
 
 $(NAME): lib/lib/libwolfssl.a
 
 clean-wolfssl:
 	@rm -rf ./lib/{bin,include,share,lib}; \
c170cc81
 	(cd ./lib/wolfssl; make distclean) || /bin/true
38d2a6a1
 
 clean-module:
 	@rm -f *.o *.so
 
 clean-all: clean-wolfssl clean-module
d695c9cc
 
38d2a6a1
 .PHONY: clean-wolfssl clean-module clean-all
c170cc81
 
 # debugging for dependency on lib/wolfssl
 $(warning sources = $(sources), auto_gen = $(auto_gen), objs = $(objs))