src/modules/websocket/Makefile
48ba7477
 #
0e86b73a
 #
48ba7477
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
 auto_gen=
 NAME=websocket.so
 
f2dc27ce
 EMBEDDED_UTF8_DECODE ?= 0
 
d18997cd
 ifeq ($(CROSS_COMPILE),)
 SSL_BUILDER=$(shell \
 	if pkg-config --exists libssl; then \
 		echo 'pkg-config libssl'; \
 	fi)
e0f7a0c6
 
 ifneq ($(SSL_BUILDER),)
432c1e3b
 SSL_BUILDER+=$(shell \
 	if pkg-config --exists libcrypto; then \
 		echo 'libcrypto'; \
 	fi)
 endif
e0f7a0c6
 
d18997cd
 endif
 
 ifneq ($(SSL_BUILDER),)
 	DEFS += $(shell $(SSL_BUILDER) --cflags)
 	LIBS += $(shell $(SSL_BUILDER) --libs)
48ba7477
 else
d18997cd
 	DEFS += -I$(LOCALBASE)/ssl/include
 	LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \
 			-L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \
 			-lssl -lcrypto
 	# NOTE: depending on the way in which libssl was compiled you might
 	#       have to add -lz -lkrb5   (zlib and kerberos5).
 	#       E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
48ba7477
 endif
d18997cd
 
f2dc27ce
 LIBS+= $(TLS_EXTRA_LIBS)
 
 ifeq ($(EMBEDDED_UTF8_DECODE),0)
 	LIBS+= -lunistring
 else
 	DEFS += -DEMBEDDED_UTF8_DECODE
 endif
d18997cd
 
 # Static linking, if you'd like to use TLS and WEBSOCKET at the same time
 #
 #LIBS+= /usr/lib/libcurl.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lkrb5 -lidn -lz -lgssapi_krb5 -lrt
48ba7477
 
 include ../../Makefile.modules