-
Notifications
You must be signed in to change notification settings - Fork 582
/
Makefile.openssl
43 lines (37 loc) · 1.04 KB
/
Makefile.openssl
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
37
38
39
40
41
42
43
#
# WARNING: do not run this directly, it should be included by other Makefiles
# Needed to build with openssl 3.x
DEFS += -Wno-deprecated-declarations
# normalize USE_ONLY_CRYPTO value
ifeq ($(USE_ONLY_CRYPTO),)
USE_ONLY_CRYPTO=false
endif
ifeq ($(CROSS_COMPILE),)
ifeq ($(USE_ONLY_CRYPTO),false)
SSL_BUILDER=$(shell \
if pkg-config --exists libssl libcrypto; then \
echo 'pkg-config libssl libcrypto'; \
fi)
else
SSL_BUILDER=$(shell \
if pkg-config --exists libcrypto; then \
echo 'pkg-config libcrypto'; \
fi)
endif
endif
ifneq ($(SSL_BUILDER),)
DEFS += $(shell $(SSL_BUILDER) --cflags)
LIBS += $(shell $(SSL_BUILDER) --libs)
else
DEFS += -I$(LOCALBASE)/ssl/include \
-I$(LOCALBASE)/include
LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \
-L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \
-lcrypto
ifeq ($(USE_ONLY_CRYPTO),false)
LIBS += -lssl
endif
endif
# enable this flag to increase performance by not serializing openssl
# connect/accept/read/write operations, at the cost of possible crashes
#DEFS+= -DNO_SSL_GLOBAL_LOCK