mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
144 lines
4.7 KiB
Plaintext
144 lines
4.7 KiB
Plaintext
# Copyright 2014 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/toolchain/toolchain.gni")
|
|
|
|
config("usrsctp_config") {
|
|
include_dirs = [
|
|
"usrsctplib/usrsctplib",
|
|
"usrsctplib/usrsctplib/netinet",
|
|
]
|
|
}
|
|
|
|
config("usrsctp_warnings") {
|
|
if (is_clang) {
|
|
cflags = [
|
|
# atomic_init in user_atomic.h is a static function in a header.
|
|
"-Wno-unused-function",
|
|
|
|
# Use of deprecated OSAtomic* functions in user_atomic.h. This is
|
|
# what they did in configure.ac. We can remove this once
|
|
# https://github.com/sctplab/usrsctp/issues/177 is fixed.
|
|
"-Wno-deprecated-declarations",
|
|
]
|
|
}
|
|
}
|
|
|
|
static_library("usrsctp") {
|
|
sources = [
|
|
"usrsctplib/usrsctplib/netinet/sctp.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_asconf.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_asconf.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_auth.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_auth.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_bsd_addr.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_bsd_addr.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_callout.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_callout.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_cc_functions.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_constants.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_crc32.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_crc32.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_header.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_indata.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_indata.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_input.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_input.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_lock_userspace.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_os.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_os_userspace.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_output.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_output.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_pcb.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_pcb.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_peeloff.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_peeloff.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_process_lock.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_sha1.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_sha1.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_ss_functions.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_structs.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_sysctl.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_sysctl.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_timer.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_timer.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_uio.h",
|
|
"usrsctplib/usrsctplib/netinet/sctp_userspace.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_usrreq.c",
|
|
"usrsctplib/usrsctplib/netinet/sctp_var.h",
|
|
"usrsctplib/usrsctplib/netinet/sctputil.c",
|
|
"usrsctplib/usrsctplib/netinet/sctputil.h",
|
|
"usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c",
|
|
"usrsctplib/usrsctplib/netinet6/sctp6_var.h",
|
|
"usrsctplib/usrsctplib/user_atomic.h",
|
|
"usrsctplib/usrsctplib/user_environment.c",
|
|
"usrsctplib/usrsctplib/user_environment.h",
|
|
"usrsctplib/usrsctplib/user_inpcb.h",
|
|
"usrsctplib/usrsctplib/user_ip6_var.h",
|
|
"usrsctplib/usrsctplib/user_ip_icmp.h",
|
|
"usrsctplib/usrsctplib/user_malloc.h",
|
|
"usrsctplib/usrsctplib/user_mbuf.c",
|
|
"usrsctplib/usrsctplib/user_mbuf.h",
|
|
"usrsctplib/usrsctplib/user_queue.h",
|
|
"usrsctplib/usrsctplib/user_recv_thread.c",
|
|
"usrsctplib/usrsctplib/user_recv_thread.h",
|
|
"usrsctplib/usrsctplib/user_route.h",
|
|
"usrsctplib/usrsctplib/user_socket.c",
|
|
"usrsctplib/usrsctplib/user_socketvar.h",
|
|
"usrsctplib/usrsctplib/user_uma.h",
|
|
"usrsctplib/usrsctplib/usrsctp.h",
|
|
]
|
|
|
|
defines = [
|
|
"SCTP_PROCESS_LEVEL_LOCKS",
|
|
"SCTP_SIMPLE_ALLOCATOR",
|
|
"SCTP_USE_OPENSSL_SHA1",
|
|
"__Userspace__",
|
|
|
|
# "SCTP_DEBUG", # Uncomment for SCTP debugging.
|
|
]
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
configs += [
|
|
"//build/config/compiler:no_chromium_code",
|
|
|
|
# These must be after no_chromium_code for warning flags to be ordered
|
|
# correctly.
|
|
"//build/config/compiler:no_incompatible_pointer_warnings",
|
|
":usrsctp_warnings",
|
|
]
|
|
|
|
public_configs = [ ":usrsctp_config" ]
|
|
|
|
cflags = [
|
|
"-UINET",
|
|
"-UINET6",
|
|
]
|
|
|
|
if (is_linux || is_android) {
|
|
defines += [
|
|
"__Userspace_os_Linux",
|
|
"_GNU_SOURCE",
|
|
]
|
|
} else if (is_mac || is_ios) {
|
|
defines += [
|
|
"HAVE_SA_LEN",
|
|
"HAVE_SCONN_LEN",
|
|
"__APPLE_USE_RFC_2292",
|
|
"__Userspace_os_Darwin",
|
|
]
|
|
cflags += [ "-U__APPLE__" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
defines += [ "__Userspace_os_Windows" ]
|
|
} else {
|
|
defines += [ "NON_WINDOWS_DEFINE" ]
|
|
}
|
|
|
|
deps = [
|
|
"//third_party/boringssl",
|
|
]
|
|
}
|