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