blob: 5b1f0a4e234348d401f84280a3935e8ac022230c [file] [log] [blame] [edit]
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Common variables.
libwebsocketsSrcFiles = [
"lib/core-net/adopt.c",
"lib/core-net/client.c",
"lib/core-net/close.c",
"lib/core-net/connect.c",
"lib/core-net/dummy-callback.c",
"lib/core-net/network.c",
"lib/core-net/output.c",
"lib/core-net/pollfd.c",
"lib/core-net/sequencer.c",
"lib/core-net/server.c",
"lib/core-net/service.c",
"lib/core-net/sorted-usec-list.c",
"lib/core-net/state.c",
"lib/core-net/stats.c",
"lib/core-net/vhost.c",
"lib/core-net/wsi-timeout.c",
"lib/core-net/wsi.c",
"lib/core/alloc.c",
"lib/core/buflist.c",
"lib/core/context.c",
"lib/core/libwebsockets.c",
"lib/core/logs.c",
"lib/core/lws_dll2.c",
"lib/core/vfs.c",
"lib/event-libs/poll/poll.c",
"lib/misc/base64-decode.c",
"lib/misc/dir.c",
"lib/misc/lejp.c",
"lib/misc/lws-ring.c",
"lib/misc/lwsac/cached-file.c",
"lib/misc/lwsac/lwsac.c",
"lib/misc/sha-1.c",
"lib/plat/unix/unix-caps.c",
"lib/plat/unix/unix-fds.c",
"lib/plat/unix/unix-file.c",
"lib/plat/unix/unix-init.c",
"lib/plat/unix/unix-misc.c",
"lib/plat/unix/unix-pipe.c",
"lib/plat/unix/unix-service.c",
"lib/plat/unix/unix-sockets.c",
"lib/roles/h1/ops-h1.c",
"lib/roles/h2/hpack.c",
"lib/roles/h2/http2.c",
"lib/roles/h2/ops-h2.c",
"lib/roles/http/client/client-handshake.c",
"lib/roles/http/client/client-http.c",
"lib/roles/http/header.c",
"lib/roles/http/parsers.c",
"lib/roles/http/server/lejp-conf.c",
"lib/roles/http/server/lws-spa.c",
"lib/roles/http/server/server.c",
"lib/roles/listen/ops-listen.c",
"lib/roles/pipe/ops-pipe.c",
"lib/roles/raw-file/ops-raw-file.c",
"lib/roles/raw-skt/ops-raw-skt.c",
"lib/roles/ws/client-parser-ws.c",
"lib/roles/ws/client-ws.c",
"lib/roles/ws/ops-ws.c",
"lib/roles/ws/server-ws.c",
"lib/system/system.c",
"lib/tls/openssl/openssl-client.c",
"lib/tls/openssl/openssl-server.c",
"lib/tls/openssl/openssl-ssl.c",
"lib/tls/openssl/openssl-tls.c",
"lib/tls/openssl/openssl-x509.c",
"lib/tls/tls-client.c",
"lib/tls/tls-network.c",
"lib/tls/tls-server.c",
"lib/tls/tls.c",
]
libwebsocketsIncludePath = [
"plugins",
"lib/core",
"lib/core-net",
"lib/event-libs",
"lib/abstract",
"lib/tls",
"lib/roles",
"lib/event-libs/libuv",
"lib/event-libs/poll",
"lib/event-libs/libevent",
"lib/event-libs/glib",
"lib/event-libs/libev",
"lib/jose/jwe",
"lib/jose/jws",
"lib/jose",
"lib/misc",
"lib/roles/http",
"lib/roles/http/compression",
"lib/roles/h1",
"lib/roles/h2",
"lib/roles/ws",
"lib/roles/cgi",
"lib/roles/dbus",
"lib/roles/raw-proxy",
"lib/abstract",
"lib/system/async-dns",
"lib/roles/mqtt",
"lib/plat/unix",
"lib",
]
cc_library_static {
name: "libwebsockets",
srcs: libwebsocketsSrcFiles,
local_include_dirs: libwebsocketsIncludePath,
export_include_dirs: ["include"],
static_libs: ["libcrypto", "libssl", "libcap"],
host_supported: true,
device_supported: false,
target: {
android: {
enabled: false,
},
darwin: {
enabled: false,
},
host: {
cflags: [
"-Wall",
"-Wsign-compare",
"-Wstrict-aliasing",
"-Wuninitialized",
"-Werror",
"-fvisibility=hidden",
"-Wundef",
"-Wtype-limits",
"-Wignored-qualifiers",
"-Wno-deprecated-declarations",
"-pthread",
"-Wno-error=unused-command-line-argument",
"-Wno-error=unused-parameter",
"-Wno-error=implicit-function-declaration",
],
},
},
}