| 1 |
# |
| 2 |
# WARNING: do not run this directly, it should be run by the main Makefile |
| 3 |
|
| 4 |
include ../../Makefile.defs |
| 5 |
auto_gen= |
| 6 |
NAME=outbound.so |
| 7 |
|
| 8 |
ifeq ($(CROSS_COMPILE),) |
| 9 |
BUILDER = $(shell which pkg-config) |
| 10 |
endif |
| 11 |
|
| 12 |
ifneq ($(BUILDER),) |
| 13 |
SSL_BUILDER=$(shell \ |
| 14 |
if pkg-config --exists libssl; then \ |
| 15 |
echo 'pkg-config libssl'; \ |
| 16 |
fi) |
| 17 |
|
| 18 |
CRYPTO_BUILDER=$(shell \ |
| 19 |
if pkg-config --exists libcrypto; then \ |
| 20 |
echo 'pkg-config libcrypto'; \ |
| 21 |
fi) |
| 22 |
endif |
| 23 |
|
| 24 |
ifneq ($(BUILDER),) |
| 25 |
|
| 26 |
ifneq ($(SSL_BUILDER),) |
| 27 |
DEFS += $(shell $(SSL_BUILDER) --cflags) |
| 28 |
LIBS += $(shell $(SSL_BUILDER) --libs) |
| 29 |
endif |
| 30 |
ifneq ($(CRYPTO_BUILDER),) |
| 31 |
DEFS += $(shell $(CRYPTO_BUILDER) --cflags) |
| 32 |
LIBS += $(shell $(CRYPTO_BUILDER) --libs) |
| 33 |
endif |
| 34 |
|
| 35 |
else |
| 36 |
DEFS += -I$(LOCALBASE)/ssl/include |
| 37 |
LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \ |
| 38 |
-L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \ |
| 39 |
-lssl -lcrypto |
| 40 |
# NOTE: depending on the way in which libssl was compiled you might |
| 41 |
# have to add -lz -lkrb5 (zlib and kerberos5). |
| 42 |
# E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5" |
| 43 |
endif |
| 44 |
|
| 45 |
LIBS+= $(TLS_EXTRA_LIBS) |
| 46 |
|
| 47 |
# Static linking, if you'd like to use TLS and OUTBOUND at the same time |
| 48 |
# |
| 49 |
#LIBS+= /usr/lib/libcurl.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lkrb5 -lidn -lz -lgssapi_krb5 -lrt |
| 50 |
|
| 51 |
include ../../Makefile.modules |