-
Notifications
You must be signed in to change notification settings - Fork 565
/
Makefile
36 lines (30 loc) · 978 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
include ../../Makefile.defs
auto_gen=
NAME=tls_wolfssl.so
LIBS=-L./lib/lib/ -lwolfssl -lm
DEFS+=-I./lib/include/
DEPS+=lib/lib/libwolfssl.a
_makefile_path := $(lastword $(MAKEFILE_LIST))
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 \
env -u DEFS -u CFLAGS -u LDFLAGS -u LIBS ./configure \
--enable-all --disable-fpecc \
--enable-writedup --enable-tlsv10 --disable-shared --enable-static \
--prefix=$(MOD_DIR)/lib \
--exec-prefix=$(MOD_DIR)/lib C_EXTRA_FLAGS="-fPIC"; \
fi;
@$(MAKE) -C ./lib/wolfssl install
clean: clean-wolfssl-lib
.PHONY: clean-wolfssl-lib
clean-wolfssl-lib:
@if [ -f ./lib/wolfssl/Makefile ]; then \
$(MAKE) -C ./lib/wolfssl clean; \
fi;
@rm -rf ./lib/bin ./lib/include ./lib/lib ./lib/share \
./lib/wolfssl/Makefile ./lib/wolfssl/configure