mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00

It's only workable on gcc 4.6+... and in fact it's only going to be interesting typically to the maintainer, so it's commented out in Makefile.am. Currently the worst remaining ones for x86_64 are libwebsockets.c:2250:6:_lws_log 496 static libwebsockets.c:2203:13:lwsl_emit_stderr 352 static client.c:700:1:libwebsockets_generate_client_handshake 320 static server.c:42:1:libwebsockets_decode_ssl_error 288 static server-handshake.c:31:1:handshake_0405 272 static client.c:368:1:lws_client_interpret_server_handshake 272 static libwebsockets.c:447:1:libwebsockets_get_peer_addresses 256 static daemonize.c:93:1:lws_daemonize 240 static output.c:536:5:libwebsockets_serve_http_file 224 static sha-1.c:131:1:sha1_step 192 static sha-1.c:316:1:SHA1 160 static libwebsockets.c:1604:1:libwebsocket_create_context 160 static The top two there are error assembly buffers, they could be made static but then they won't be usable from threaded user code. Reported-by: Anders Brander <anders@brander.dk> Signed-off-by: Andy Green <andy.green@linaro.org>
89 lines
2 KiB
Makefile
89 lines
2 KiB
Makefile
@applyhash@
|
|
|
|
lib_LTLIBRARIES=libwebsockets.la
|
|
include_HEADERS=libwebsockets.h
|
|
dist_libwebsockets_la_SOURCES=libwebsockets.c \
|
|
parsers.c \
|
|
handshake.c \
|
|
libwebsockets.h \
|
|
base64-decode.c \
|
|
output.c \
|
|
private-libwebsockets.h
|
|
|
|
if NO_EXTENSIONS
|
|
else
|
|
dist_libwebsockets_la_SOURCES+= extension.c \
|
|
extension-deflate-stream.c extension-deflate-stream.h \
|
|
extension-deflate-frame.c extension-deflate-frame.h
|
|
endif
|
|
|
|
if NO_DAEMONIZE
|
|
else
|
|
dist_libwebsockets_la_SOURCES+= daemonize.c
|
|
endif
|
|
|
|
if NO_CLIENT
|
|
else
|
|
dist_libwebsockets_la_SOURCES+= client.c \
|
|
client-parser.c \
|
|
client-handshake.c
|
|
endif
|
|
|
|
if NO_SERVER
|
|
else
|
|
dist_libwebsockets_la_SOURCES+= server.c \
|
|
server-handshake.c
|
|
endif
|
|
|
|
if USE_BUILTIN_GETIFADDRS
|
|
dist_libwebsockets_la_SOURCES += getifaddrs.c
|
|
endif
|
|
|
|
if LIBCRYPTO
|
|
else
|
|
dist_libwebsockets_la_SOURCES += sha-1.c
|
|
endif
|
|
|
|
libwebsockets_la_CFLAGS=-Wall -std=gnu99 -pedantic
|
|
libwebsockets_la_LDFLAGS=
|
|
|
|
# uncomment below and use cat ./lib/.libs/*.su | sort -k2g | tac
|
|
# to get a worst-first list of static stack usage if you have gcc 4.6+
|
|
#libwebsockets_la_CFLAGS+= -fstack-usage
|
|
|
|
if USE_CYASSL
|
|
libwebsockets_la_LDFLAGS+= -lcyassl
|
|
endif
|
|
|
|
if DISABLE_DEBUG
|
|
libwebsockets_la_CFLAGS+= -O4
|
|
else
|
|
libwebsockets_la_CFLAGS+= -O0 -g
|
|
endif
|
|
|
|
if MINGW
|
|
libwebsockets_la_CFLAGS+= -w -I../win32port/win32helpers -I ../win32port/zlib/
|
|
libwebsockets_la_LDFLAGS+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc
|
|
else
|
|
libwebsockets_la_CFLAGS+= -rdynamic -fPIC -Werror
|
|
# notice http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html has rules for how to bump this
|
|
libwebsockets_la_LDFLAGS+= -version-info 3:0:0
|
|
endif
|
|
|
|
libwebsockets_la_CFLAGS+= -c \
|
|
-DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
|
|
if NO_EXTENSIONS
|
|
else
|
|
libwebsockets_la_LDFLAGS+= -lz
|
|
endif
|
|
|
|
all-local:
|
|
../scripts/kernel-doc -html \
|
|
*.c \
|
|
libwebsockets.h \
|
|
> ../libwebsockets-api-doc.html
|
|
../scripts/kernel-doc -text \
|
|
*.c \
|
|
libwebsockets.h \
|
|
> ../libwebsockets-api-doc.txt
|
|
|