2013-02-01 10:50:15 +08:00
|
|
|
@applyhash@
|
|
|
|
|
2010-11-08 17:04:09 +00:00
|
|
|
lib_LTLIBRARIES=libwebsockets.la
|
|
|
|
include_HEADERS=libwebsockets.h
|
2010-11-08 20:20:42 +00:00
|
|
|
dist_libwebsockets_la_SOURCES=libwebsockets.c \
|
|
|
|
parsers.c \
|
2013-01-18 11:43:21 +08:00
|
|
|
handshake.c \
|
2010-11-08 20:20:42 +00:00
|
|
|
libwebsockets.h \
|
2011-01-18 15:39:02 +00:00
|
|
|
base64-decode.c \
|
2013-01-16 11:47:40 +08:00
|
|
|
output.c \
|
2010-11-08 20:20:42 +00:00
|
|
|
private-libwebsockets.h
|
2012-10-19 11:21:55 +02:00
|
|
|
|
2013-01-20 17:08:31 +08:00
|
|
|
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
|
|
|
|
|
2013-01-17 10:05:39 +08:00
|
|
|
if NO_DAEMONIZE
|
|
|
|
else
|
|
|
|
dist_libwebsockets_la_SOURCES+= daemonize.c
|
|
|
|
endif
|
|
|
|
|
2013-01-16 11:47:40 +08:00
|
|
|
if NO_CLIENT
|
|
|
|
else
|
|
|
|
dist_libwebsockets_la_SOURCES+= client.c \
|
|
|
|
client-parser.c \
|
|
|
|
client-handshake.c
|
|
|
|
endif
|
|
|
|
|
2013-01-18 11:43:21 +08:00
|
|
|
if NO_SERVER
|
|
|
|
else
|
|
|
|
dist_libwebsockets_la_SOURCES+= server.c \
|
|
|
|
server-handshake.c
|
|
|
|
endif
|
|
|
|
|
2013-01-12 20:39:47 +08:00
|
|
|
if USE_BUILTIN_GETIFADDRS
|
|
|
|
dist_libwebsockets_la_SOURCES += getifaddrs.c
|
|
|
|
endif
|
2012-10-19 11:21:55 +02:00
|
|
|
|
2011-01-23 17:47:08 +00:00
|
|
|
if LIBCRYPTO
|
|
|
|
else
|
2013-01-21 09:53:35 +08:00
|
|
|
dist_libwebsockets_la_SOURCES += sha-1.c
|
2011-01-23 17:47:08 +00:00
|
|
|
endif
|
|
|
|
|
2013-02-13 09:08:43 +08:00
|
|
|
libwebsockets_la_CFLAGS=-Wall -std=gnu99 -pedantic
|
2012-10-06 15:17:01 +08:00
|
|
|
libwebsockets_la_LDFLAGS=
|
2012-04-12 10:11:29 +08:00
|
|
|
|
2013-02-13 09:08:43 +08:00
|
|
|
# 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
|
|
|
|
|
2013-02-06 15:43:00 +09:00
|
|
|
if USE_CYASSL
|
|
|
|
libwebsockets_la_LDFLAGS+= -lcyassl
|
|
|
|
endif
|
|
|
|
|
2013-01-21 12:19:30 +08:00
|
|
|
if DISABLE_DEBUG
|
|
|
|
libwebsockets_la_CFLAGS+= -O4
|
|
|
|
else
|
2013-02-11 09:31:43 +08:00
|
|
|
libwebsockets_la_CFLAGS+= -O0 -g
|
2013-01-21 12:19:30 +08:00
|
|
|
endif
|
|
|
|
|
2012-04-12 10:11:29 +08:00
|
|
|
if MINGW
|
2012-04-12 11:11:10 +08:00
|
|
|
libwebsockets_la_CFLAGS+= -w -I../win32port/win32helpers -I ../win32port/zlib/
|
2012-04-12 13:26:49 +08:00
|
|
|
libwebsockets_la_LDFLAGS+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc
|
2012-04-12 10:11:29 +08:00
|
|
|
else
|
|
|
|
libwebsockets_la_CFLAGS+= -rdynamic -fPIC -Werror
|
2013-01-31 10:12:52 +08:00
|
|
|
# notice http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html has rules for how to bump this
|
2013-02-12 10:36:39 +08:00
|
|
|
libwebsockets_la_LDFLAGS+= -version-info 3:0:0
|
2012-04-12 10:11:29 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
libwebsockets_la_CFLAGS+= -c \
|
2012-04-12 11:06:05 +08:00
|
|
|
-DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
|
2013-01-20 18:26:20 +08:00
|
|
|
if NO_EXTENSIONS
|
|
|
|
else
|
2012-04-12 10:11:29 +08:00
|
|
|
libwebsockets_la_LDFLAGS+= -lz
|
2013-01-20 18:26:20 +08:00
|
|
|
endif
|
2010-11-08 17:04:09 +00:00
|
|
|
|
2010-11-08 17:28:21 +00:00
|
|
|
all-local:
|
|
|
|
../scripts/kernel-doc -html \
|
2013-01-22 12:40:35 +08:00
|
|
|
*.c \
|
2010-11-12 10:44:16 +00:00
|
|
|
libwebsockets.h \
|
2010-11-08 20:20:42 +00:00
|
|
|
> ../libwebsockets-api-doc.html
|
2013-02-07 16:19:52 +02:00
|
|
|
../scripts/kernel-doc -text \
|
|
|
|
*.c \
|
|
|
|
libwebsockets.h \
|
|
|
|
> ../libwebsockets-api-doc.txt
|
2010-11-08 17:28:21 +00:00
|
|
|
|