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