configure without client
[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                                 output.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 if NO_CLIENT
15 else
16 dist_libwebsockets_la_SOURCES+= client.c \
17                                 client-parser.c \
18                                 client-handshake.c
19 endif
20
21 if USE_BUILTIN_GETIFADDRS
22 dist_libwebsockets_la_SOURCES += getifaddrs.c
23 endif
24
25 if EXT_GOOGLE_MUX
26 dist_libwebsockets_la_SOURCES += extension-x-google-mux.c extension-x-google-mux.h
27 endif
28
29 if LIBCRYPTO
30 else
31 dist_libwebsockets_la_SOURCES += md5.c sha-1.c
32 endif
33
34 libwebsockets_la_CFLAGS=-Wall -std=gnu99 -pedantic
35 libwebsockets_la_LDFLAGS=
36
37 if MINGW
38 libwebsockets_la_CFLAGS+= -w -I../win32port/win32helpers -I ../win32port/zlib/
39 libwebsockets_la_LDFLAGS+= -lm -luser32 -ladvapi32 -lkernel32 -lgcc
40 else
41 libwebsockets_la_CFLAGS+= -rdynamic -fPIC -Werror
42 libwebsockets_la_LDFLAGS+=  -version-info 1:0
43 endif
44
45 libwebsockets_la_CFLAGS+= -c \
46         -DINSTALL_DATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
47 libwebsockets_la_LDFLAGS+= -lz
48
49 all-local:
50          ../scripts/kernel-doc -html \
51                 libwebsockets.c \
52                 parsers.c \
53                 client-handshake.c \
54                 libwebsockets.h \
55                         > ../libwebsockets-api-doc.html
56