Browse code

tls_wolfssl: move git submodule to misc/external/wolfssl

- GH #3164

S-P Chan authored on 04/07/2022 11:28:54
Showing 4 changed files
... ...
@@ -2,5 +2,5 @@
2 2
 	path = pkg/docker
3 3
 	url = https://github.com/kamailio/kamailio-ci.git
4 4
 [submodule "src/modules/tls_wolfssl/lib/wolfssl"]
5
-	path = src/modules/tls_wolfssl/lib/wolfssl
5
+	path = misc/external/wolfssl/wolfssl
6 6
 	url = https://github.com/wolfSSL/wolfssl.git
7 7
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+build/
0 2
similarity index 100%
1 3
rename from src/modules/tls_wolfssl/lib/wolfssl
2 4
rename to misc/external/wolfssl/wolfssl
... ...
@@ -8,15 +8,17 @@ include ../../Makefile.defs
8 8
 auto_gen=
9 9
 NAME=tls_wolfssl.so
10 10
 
11
-LIBS += lib/lib/libwolfssl.a
12
-INCLUDES += -I./lib/include/
11
+WOLFSSL_PREFIX = ../../../misc/external/wolfssl/build
12
+WOLFSSL_SRC = ../../../misc/external/wolfssl/wolfssl
13 13
 
14
+LIBS += $(WOLFSSL_PREFIX)/lib/libwolfssl.a
15
+INCLUDES += -I$(WOLFSSL_PREFIX)/include/
14 16
 
15 17
 include ../../Makefile.modules
16
-$(objs): lib/include/wolfssl/options.h
18
+$(objs): $(WOLFSSL_PREFIX)/include/wolfssl/options.h
17 19
 
18
-lib/include/wolfssl/options.h lib/lib/libwolfssl.a:
19
-	@cd ./lib/wolfssl; \
20
+$(WOLFSSL_PREFIX)/include/wolfssl/options.h $(WOLFSSL_PREFIX)/lib/libwolfssl.a:
21
+	@cd $(WOLFSSL_SRC); \
20 22
 	if [ ! -f "configure" ]; then \
21 23
 		./autogen.sh; \
22 24
 	fi; \
... ...
@@ -24,16 +26,16 @@ lib/include/wolfssl/options.h lib/lib/libwolfssl.a:
24 26
 		env -u DEFS -u CFLAGS -u LDFLAGS -u LIBS EXTRA_CFLAGS="-g -fPIC -Wno-error=array-bounds -Wno-error=stringop-overflow" ./configure \
25 27
 		--enable-all --enable-pkcs11 --enable-static --enable-aligndata=no \
26 28
 		--disable-shared --disable-examples \
27
-		--prefix=$(CURDIR)/lib \
28
-		--exec-prefix=$(CURDIR)/lib; \
29
+		--prefix=$(CURDIR)/$(WOLFSSL_PREFIX) \
30
+		--exec-prefix=$(CURDIR)/$(WOLFSSL_PREFIX); \
29 31
 	fi;
30
-	@$(MAKE) -C ./lib/wolfssl install
32
+	@$(MAKE) -C $(WOLFSSL_SRC) install
31 33
 
32
-$(NAME): lib/lib/libwolfssl.a
34
+$(NAME): $(WOLFSSL_PREFIX)/lib/libwolfssl.a
33 35
 
34 36
 clean-wolfssl:
35
-	@rm -rf ./lib/{bin,include,share,lib}; \
36
-	(cd ./lib/wolfssl; make distclean) || /bin/true
37
+	@rm -rf $(WOLFSSL_PREFIX)/{bin,include,share,lib}; \
38
+	(cd $(WOLFSSL_SRC); make distclean) || /bin/true
37 39
 
38 40
 clean-module:
39 41
 	@rm -f *.o *.so