Skip to content

Commit

Permalink
tls_wolfssl: move git submodule to misc/external/wolfssl
Browse files Browse the repository at this point in the history
  • Loading branch information
space88man committed Jul 4, 2022
1 parent 996bf4c commit 06e2363
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
path = pkg/docker
url = https://github.com/kamailio/kamailio-ci.git
[submodule "src/modules/tls_wolfssl/lib/wolfssl"]
path = src/modules/tls_wolfssl/lib/wolfssl
path = misc/external/wolfssl/wolfssl
url = https://github.com/wolfSSL/wolfssl.git
1 change: 1 addition & 0 deletions misc/external/wolfssl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
24 changes: 13 additions & 11 deletions src/modules/tls_wolfssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,34 @@ include ../../Makefile.defs
auto_gen=
NAME=tls_wolfssl.so

LIBS += lib/lib/libwolfssl.a
INCLUDES += -I./lib/include/
WOLFSSL_PREFIX = ../../../misc/external/wolfssl/build
WOLFSSL_SRC = ../../../misc/external/wolfssl/wolfssl

LIBS += $(WOLFSSL_PREFIX)/lib/libwolfssl.a
INCLUDES += -I$(WOLFSSL_PREFIX)/include/

include ../../Makefile.modules
$(objs): lib/include/wolfssl/options.h
$(objs): $(WOLFSSL_PREFIX)/include/wolfssl/options.h

lib/include/wolfssl/options.h lib/lib/libwolfssl.a:
@cd ./lib/wolfssl; \
$(WOLFSSL_PREFIX)/include/wolfssl/options.h $(WOLFSSL_PREFIX)/lib/libwolfssl.a:
@cd $(WOLFSSL_SRC); \
if [ ! -f "configure" ]; then \
./autogen.sh; \
fi; \
if [ ! -f "Makefile" ]; then \
env -u DEFS -u CFLAGS -u LDFLAGS -u LIBS EXTRA_CFLAGS="-g -fPIC -Wno-error=array-bounds -Wno-error=stringop-overflow" ./configure \
--enable-all --enable-pkcs11 --enable-static --enable-aligndata=no \
--disable-shared --disable-examples \
--prefix=$(CURDIR)/lib \
--exec-prefix=$(CURDIR)/lib; \
--prefix=$(CURDIR)/$(WOLFSSL_PREFIX) \
--exec-prefix=$(CURDIR)/$(WOLFSSL_PREFIX); \
fi;
@$(MAKE) -C ./lib/wolfssl install
@$(MAKE) -C $(WOLFSSL_SRC) install

$(NAME): lib/lib/libwolfssl.a
$(NAME): $(WOLFSSL_PREFIX)/lib/libwolfssl.a

clean-wolfssl:
@rm -rf ./lib/{bin,include,share,lib}; \
(cd ./lib/wolfssl; make distclean) || /bin/true
@rm -rf $(WOLFSSL_PREFIX)/{bin,include,share,lib}; \
(cd $(WOLFSSL_SRC); make distclean) || /bin/true

clean-module:
@rm -f *.o *.so
Expand Down

0 comments on commit 06e2363

Please sign in to comment.