1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 'libsctp_target_type%': 'static_library',
10 'SCTP_PROCESS_LEVEL_LOCKS',
11 'SCTP_SIMPLE_ALLOCATOR',
13 # 'SCTP_DEBUG', # Uncomment for SCTP debugging.
19 'direct_dependent_settings': {
28 'SCTP_USE_OPENSSL_SHA1',
31 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
34 { # else use_openssl==0, use NSS.
39 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
40 'dependencies': [ # The system.gyp:ssl dependency includes nss
41 '<(DEPTH)/build/linux/system.gyp:ssl',
44 ['OS == "mac" or OS == "ios" or OS == "win"', {
46 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
47 '<(DEPTH)/third_party/nss/nss.gyp:nss',
56 # GN version: //third_party/usrsctp
57 'target_name': 'usrsctplib',
58 'type': 'static_library',
60 # Note: sources list duplicated in GN build.
61 'usrsctplib/netinet/sctp.h',
62 'usrsctplib/netinet/sctp_asconf.c',
63 'usrsctplib/netinet/sctp_asconf.h',
64 'usrsctplib/netinet/sctp_auth.c',
65 'usrsctplib/netinet/sctp_auth.h',
66 'usrsctplib/netinet/sctp_bsd_addr.c',
67 'usrsctplib/netinet/sctp_bsd_addr.h',
68 'usrsctplib/netinet/sctp_callout.c',
69 'usrsctplib/netinet/sctp_callout.h',
70 'usrsctplib/netinet/sctp_cc_functions.c',
71 'usrsctplib/netinet/sctp_constants.h',
72 'usrsctplib/netinet/sctp_crc32.c',
73 'usrsctplib/netinet/sctp_crc32.h',
74 'usrsctplib/netinet/sctp_header.h',
75 'usrsctplib/netinet/sctp_indata.c',
76 'usrsctplib/netinet/sctp_indata.h',
77 'usrsctplib/netinet/sctp_input.c',
78 'usrsctplib/netinet/sctp_input.h',
79 'usrsctplib/netinet/sctp_lock_userspace.h',
80 'usrsctplib/netinet/sctp_os.h',
81 'usrsctplib/netinet/sctp_os_userspace.h',
82 'usrsctplib/netinet/sctp_output.c',
83 'usrsctplib/netinet/sctp_output.h',
84 'usrsctplib/netinet/sctp_pcb.c',
85 'usrsctplib/netinet/sctp_pcb.h',
86 'usrsctplib/netinet/sctp_peeloff.c',
87 'usrsctplib/netinet/sctp_peeloff.h',
88 'usrsctplib/netinet/sctp_process_lock.h',
89 'usrsctplib/netinet/sctp_sha1.c',
90 'usrsctplib/netinet/sctp_sha1.h',
91 'usrsctplib/netinet/sctp_ss_functions.c',
92 'usrsctplib/netinet/sctp_structs.h',
93 'usrsctplib/netinet/sctp_sysctl.c',
94 'usrsctplib/netinet/sctp_sysctl.h',
95 'usrsctplib/netinet/sctp_timer.c',
96 'usrsctplib/netinet/sctp_timer.h',
97 'usrsctplib/netinet/sctp_uio.h',
98 'usrsctplib/netinet/sctp_userspace.c',
99 'usrsctplib/netinet/sctp_usrreq.c',
100 'usrsctplib/netinet/sctp_var.h',
101 'usrsctplib/netinet/sctputil.c',
102 'usrsctplib/netinet/sctputil.h',
103 'usrsctplib/netinet6/sctp6_usrreq.c',
104 'usrsctplib/netinet6/sctp6_var.h',
105 'usrsctplib/user_atomic.h',
106 'usrsctplib/user_environment.c',
107 'usrsctplib/user_environment.h',
108 'usrsctplib/user_inpcb.h',
109 'usrsctplib/user_ip6_var.h',
110 'usrsctplib/user_ip_icmp.h',
111 'usrsctplib/user_malloc.h',
112 'usrsctplib/user_mbuf.c',
113 'usrsctplib/user_mbuf.h',
114 'usrsctplib/user_queue.h',
115 'usrsctplib/user_recv_thread.c',
116 'usrsctplib/user_recv_thread.h',
117 'usrsctplib/user_route.h',
118 'usrsctplib/user_socket.c',
119 'usrsctplib/user_socketvar.h',
120 'usrsctplib/user_uma.h',
121 'usrsctplib/usrsctp.h'
124 'clang_warning_flags': [
125 # atomic_init in user_atomic.h is a static function in a header.
126 '-Wno-unused-function',
130 ['OS=="linux" or OS=="android"', {
132 '__Userspace_os_Linux',
134 'cflags!': [ '-Werror', '-Wall' ],
137 ['OS=="mac" or OS=="ios"', {
141 '__APPLE_USE_RFC_2292',
142 '__Userspace_os_Darwin',
144 # usrsctp requires that __APPLE__ is undefined for compilation (for
145 # historical reasons). There is a plan to change this, and when it
146 # happens and we re-roll DEPS for usrsctp, we can remove the manual
147 # undefining of __APPLE__.
149 'OTHER_CFLAGS!': [ '-Werror', '-Wall' ],
150 'OTHER_CFLAGS': [ '-U__APPLE__', '-w' ],
155 '__Userspace_os_Windows',
156 # Manually setting WINVER and _WIN32_WINNT is needed because Chrome
157 # sets WINVER to a newer version of windows. But compiling usrsctp
158 # this way would is incompatible with windows XP.
160 '_WIN32_WINNT=0x0502',
163 # Remove Chrome's WINVER defines to avoid redefinition warnings.
165 '_WIN32_WINNT=0x0603',
167 'cflags!': [ '/W3', '/WX' ],
169 # TODO(ldixon) : Remove this disabling of warnings by pushing a
170 # fix upstream to usrsctp
171 'msvs_disabled_warnings': [ 4002, 4013, 4133, 4267, 4313, 4700 ],
174 'NON_WINDOWS_DEFINE',