6fb8d05f11ef525892c62a56fc04baccbe4f5379
[profile/ivi/libwebsockets.git] / lib / Makefile.am
1 lib_LTLIBRARIES=libwebsockets.la
2 include_HEADERS=libwebsockets.h
3 dist_libwebsockets_la_SOURCES=libwebsockets.c \
4                                 handshake.c \
5                                 parsers.c \
6                                 libwebsockets.h \
7                                 base64-decode.c \
8                                 client-handshake.c \
9                                 extension.c \
10                                 extension-deflate-stream.c extension-deflate-stream.h \
11                                 extension-deflate-frame.c extension-deflate-frame.h\
12                                 private-libwebsockets.h
13
14
15 if EXT_GOOGLE_MUX
16 dist_libwebsockets_la_SOURCES += extension-x-google-mux.c extension-x-google-mux.h
17 endif
18
19 if LIBCRYPTO
20 else
21 dist_libwebsockets_la_SOURCES += md5.c sha-1.c
22 endif
23
24 libwebsockets_la_CFLAGS=-Wall -std=gnu99 -pedantic
25 libwebsockets_la_LDFLAGS=
26
27 if MINGW
28 libwebsockets_la_CFLAGS+= -w -I../win32port/win32helpers -I ../win32port/zlib/
29 libwebsockets_la_LDFLAGS+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc
30 else
31 libwebsockets_la_CFLAGS+= -rdynamic -fPIC -Werror
32 libwebsockets_la_LDFLAGS+=  -version-info 1:0
33 endif
34
35 libwebsockets_la_CFLAGS+= -c \
36         -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
37 libwebsockets_la_LDFLAGS+= -lz
38
39 all-local:
40          ../scripts/kernel-doc -html \
41                 libwebsockets.c \
42                 parsers.c \
43                 client-handshake.c \
44                 libwebsockets.h \
45                         > ../libwebsockets-api-doc.html
46