blob: e8c744870172986194374f988650cdc9e90a439c [file] [log] [blame]
Steve Kim6379e252020-04-08 14:45:01 -07001// Copyright (C) 2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Common variables.
16libwebsocketsSrcFiles = [
17 "lib/core-net/adopt.c",
18 "lib/core-net/client.c",
19 "lib/core-net/close.c",
20 "lib/core-net/connect.c",
21 "lib/core-net/dummy-callback.c",
22 "lib/core-net/network.c",
23 "lib/core-net/output.c",
24 "lib/core-net/pollfd.c",
25 "lib/core-net/sequencer.c",
26 "lib/core-net/server.c",
27 "lib/core-net/service.c",
28 "lib/core-net/sorted-usec-list.c",
29 "lib/core-net/state.c",
30 "lib/core-net/stats.c",
31 "lib/core-net/vhost.c",
32 "lib/core-net/wsi-timeout.c",
33 "lib/core-net/wsi.c",
34 "lib/core/alloc.c",
35 "lib/core/buflist.c",
36 "lib/core/context.c",
37 "lib/core/libwebsockets.c",
38 "lib/core/logs.c",
39 "lib/core/lws_dll2.c",
40 "lib/core/vfs.c",
41 "lib/event-libs/poll/poll.c",
42 "lib/misc/base64-decode.c",
43 "lib/misc/dir.c",
44 "lib/misc/lejp.c",
45 "lib/misc/lws-ring.c",
46 "lib/misc/lwsac/cached-file.c",
47 "lib/misc/lwsac/lwsac.c",
48 "lib/misc/sha-1.c",
49 "lib/plat/unix/unix-caps.c",
50 "lib/plat/unix/unix-fds.c",
51 "lib/plat/unix/unix-file.c",
52 "lib/plat/unix/unix-init.c",
53 "lib/plat/unix/unix-misc.c",
54 "lib/plat/unix/unix-pipe.c",
55 "lib/plat/unix/unix-service.c",
56 "lib/plat/unix/unix-sockets.c",
57 "lib/roles/h1/ops-h1.c",
58 "lib/roles/h2/hpack.c",
59 "lib/roles/h2/http2.c",
60 "lib/roles/h2/ops-h2.c",
61 "lib/roles/http/client/client-handshake.c",
62 "lib/roles/http/client/client-http.c",
63 "lib/roles/http/header.c",
64 "lib/roles/http/parsers.c",
65 "lib/roles/http/server/lejp-conf.c",
66 "lib/roles/http/server/lws-spa.c",
67 "lib/roles/http/server/server.c",
68 "lib/roles/listen/ops-listen.c",
69 "lib/roles/pipe/ops-pipe.c",
70 "lib/roles/raw-file/ops-raw-file.c",
71 "lib/roles/raw-skt/ops-raw-skt.c",
72 "lib/roles/ws/client-parser-ws.c",
73 "lib/roles/ws/client-ws.c",
74 "lib/roles/ws/ops-ws.c",
75 "lib/roles/ws/server-ws.c",
76 "lib/system/system.c",
77 "lib/tls/openssl/openssl-client.c",
78 "lib/tls/openssl/openssl-server.c",
79 "lib/tls/openssl/openssl-ssl.c",
80 "lib/tls/openssl/openssl-tls.c",
81 "lib/tls/openssl/openssl-x509.c",
82 "lib/tls/tls-client.c",
83 "lib/tls/tls-network.c",
84 "lib/tls/tls-server.c",
85 "lib/tls/tls.c",
86]
87
88libwebsocketsIncludePath = [
89 "plugins",
90 "lib/core",
91 "lib/core-net",
92 "lib/event-libs",
93 "lib/abstract",
94 "lib/tls",
95 "lib/roles",
96 "lib/event-libs/libuv",
97 "lib/event-libs/poll",
98 "lib/event-libs/libevent",
99 "lib/event-libs/glib",
100 "lib/event-libs/libev",
101 "lib/jose/jwe",
102 "lib/jose/jws",
103 "lib/jose",
104 "lib/misc",
105 "lib/roles/http",
106 "lib/roles/http/compression",
107 "lib/roles/h1",
108 "lib/roles/h2",
109 "lib/roles/ws",
110 "lib/roles/cgi",
111 "lib/roles/dbus",
112 "lib/roles/raw-proxy",
113 "lib/abstract",
114 "lib/system/async-dns",
115 "lib/roles/mqtt",
116 "lib/plat/unix",
117 "lib",
118]
119
120cc_library_static {
121 name: "libwebsockets",
122 srcs: libwebsocketsSrcFiles,
123 local_include_dirs: libwebsocketsIncludePath,
124 export_include_dirs: ["include"],
Yifan Hongf2392002021-04-07 16:23:03 -0700125 static_libs: [
126 "libssl",
127 "libcap",
128 ],
Steve Kim6379e252020-04-08 14:45:01 -0700129 host_supported: true,
Steve Kim6379e252020-04-08 14:45:01 -0700130 target: {
Steve Kim6379e252020-04-08 14:45:01 -0700131 darwin: {
132 enabled: false,
133 },
Yifan Hongf2392002021-04-07 16:23:03 -0700134 android: {
135 shared_libs: [
136 "libcrypto",
137 ],
138 cflags: [
139 "-Wno-unused-parameter",
140 "-Wno-missing-field-initializers",
141 ],
142 },
Steve Kim6379e252020-04-08 14:45:01 -0700143 host: {
Yifan Hongf2392002021-04-07 16:23:03 -0700144 static_libs: [
145 "libcrypto",
146 ],
Steve Kim6379e252020-04-08 14:45:01 -0700147 cflags: [
148 "-Wall",
149 "-Wsign-compare",
150 "-Wstrict-aliasing",
151 "-Wuninitialized",
152 "-Werror",
153 "-fvisibility=hidden",
154 "-Wundef",
155 "-Wtype-limits",
156 "-Wignored-qualifiers",
157 "-Wno-deprecated-declarations",
158 "-pthread",
Colin Crossa2b87612020-11-10 15:01:03 -0800159 "-Wno-unused-command-line-argument",
160 "-Wno-unused-parameter",
161 "-Wno-implicit-function-declaration",
Steve Kim6379e252020-04-08 14:45:01 -0700162 ],
163 },
164 },
165}