OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 { | 4 { |
5 'variables': { | 5 'variables': { |
6 'libsctp_target_type%': 'static_library', | 6 'libsctp_target_type%': 'static_library', |
7 }, | 7 }, |
8 'target_defaults': { | 8 'target_defaults': { |
9 'defines': [ | 9 'defines': [ |
10 'INET', | |
11 'SCTP_PROCESS_LEVEL_LOCKS', | 10 'SCTP_PROCESS_LEVEL_LOCKS', |
12 'SCTP_SIMPLE_ALLOCATOR', | 11 'SCTP_SIMPLE_ALLOCATOR', |
13 '__Userspace__', | 12 '__Userspace__', |
14 # 'SCTP_DEBUG', # Uncomment for SCTP debugging. | 13 # 'SCTP_DEBUG', # Uncomment for SCTP debugging. |
15 ], | 14 ], |
16 'include_dirs': [ | 15 'include_dirs': [ |
17 'overrides/usrsctplib', | 16 'overrides/usrsctplib', |
18 'overrides/usrsctplib/netinet', | 17 'overrides/usrsctplib/netinet', |
19 'usrsctplib/', | 18 'usrsctplib/', |
20 'usrsctplib/netinet', | 19 'usrsctplib/netinet', |
21 'usrsctplib/netinet6', | 20 'usrsctplib/netinet6', |
22 ], | 21 ], |
23 'direct_dependent_settings': { | 22 'direct_dependent_settings': { |
24 'include_dirs': [ | 23 'include_dirs': [ |
25 'overrides/usrsctplib', | 24 'overrides/usrsctplib', |
26 'overrides/usrsctplib/netinet', | 25 'overrides/usrsctplib/netinet', |
27 'usrsctplib/', | 26 'usrsctplib/', |
28 'usrsctplib/netinet', | 27 'usrsctplib/netinet', |
29 'usrsctplib/netinet6', | 28 'usrsctplib/netinet6', |
30 ], | 29 ], |
31 }, | 30 }, |
32 'conditions': [ | 31 'conditions': [ |
33 ['use_openssl==1', { | 32 ['use_openssl==1', { |
34 'defines': [ | 33 'defines': [ |
35 'SCTP_USE_OPENSSL_SHA1', | 34 'SSL_USE_OPENSSL', |
36 ], | 35 ], |
37 'dependencies': [ | 36 'dependencies': [ |
38 '../../third_party/openssl/openssl.gyp:openssl', | 37 '<(DEPTH)/third_party/openssl/openssl.gyp:openssl', |
| 38 ], |
| 39 'sources': [ |
| 40 'overrides/usrsctplib/netinet/sctp_openssl_sha1.h', |
39 ], | 41 ], |
40 }, | 42 }, |
41 { # else use_openssl==0, use NSS. | 43 { # else use_openssl==0, use NSS. |
42 'defines' : [ | 44 'defines' : [ |
| 45 'SSL_USE_NSS', |
43 'SCTP_USE_NSS_SHA1', | 46 'SCTP_USE_NSS_SHA1', |
44 ], | 47 ], |
| 48 'sources': [ |
| 49 'overrides/usrsctplib/netinet/sctp_nss_sha1.c', |
| 50 'overrides/usrsctplib/netinet/sctp_nss_sha1.h', |
| 51 ], |
45 'conditions': [ | 52 'conditions': [ |
46 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"',
{ | 53 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"',
{ |
47 'dependencies': [ | 54 'dependencies': [ # The system.gyp:ssl dependency includes nss |
48 '<(DEPTH)/build/linux/system.gyp:ssl', | 55 '<(DEPTH)/build/linux/system.gyp:ssl', |
49 ], | 56 ], |
50 }], | 57 }], |
51 ['OS == "mac" or OS == "ios" or OS == "win"', { | 58 ['OS == "mac" or OS == "ios" or OS == "win"', { |
52 'dependencies': [ | 59 'dependencies': [ |
53 '<(DEPTH)/third_party/nss/nss.gyp:nspr', | 60 '<(DEPTH)/third_party/nss/nss.gyp:nspr', |
54 '<(DEPTH)/third_party/nss/nss.gyp:nss', | 61 '<(DEPTH)/third_party/nss/nss.gyp:nss', |
55 ], | 62 ], |
56 }], | 63 }], |
57 ], | 64 ], |
58 }], | 65 }], |
59 ], | 66 ], |
60 }, | 67 }, |
61 'targets': [ | 68 'targets': [ |
62 { | 69 { |
63 'target_name': 'usrsctplib', | 70 'target_name': 'usrsctplib', |
64 'type': 'static_library', | 71 'type': 'static_library', |
65 'sources': [ | 72 'sources': [ |
66 'overrides/usrsctplib/netinet/sctp_auth.h', | 73 'overrides/usrsctplib/netinet/sctp_auth.h', |
67 'overrides/usrsctplib/netinet/sctp_os.h', | 74 'overrides/usrsctplib/netinet/sctp_os.h', |
68 'overrides/usrsctplib/netinet/sctp_os_userspace.h', | 75 'overrides/usrsctplib/netinet/sctp_os_userspace.h', |
69 'overrides/usrsctplib/netinet/sctp_nss_sha1.c', | 76 'overrides/usrsctplib/netinet/sctp_sha1.h', |
70 'overrides/usrsctplib/netinet/sctp_nss_sha1.h', | |
71 | |
72 'usrsctplib/usrsctp.h', | 77 'usrsctplib/usrsctp.h', |
73 'usrsctplib/user_atomic.h', | 78 'usrsctplib/user_atomic.h', |
74 'usrsctplib/user_environment.c', | 79 'usrsctplib/user_environment.c', |
75 'usrsctplib/user_environment.h', | 80 'usrsctplib/user_environment.h', |
76 'usrsctplib/user_inpcb.h', | 81 'usrsctplib/user_inpcb.h', |
77 'usrsctplib/user_ip6_var.h', | 82 'usrsctplib/user_ip6_var.h', |
78 'usrsctplib/user_ip_icmp.h', | 83 'usrsctplib/user_ip_icmp.h', |
79 'usrsctplib/user_mbuf.c', | 84 'usrsctplib/user_mbuf.c', |
80 'usrsctplib/user_mbuf.h', | 85 'usrsctplib/user_mbuf.h', |
81 'usrsctplib/user_queue.h', | 86 'usrsctplib/user_queue.h', |
82 'usrsctplib/user_recv_thread.c', | 87 'usrsctplib/user_recv_thread.c', |
83 'usrsctplib/user_recv_thread.h', | 88 'usrsctplib/user_recv_thread.h', |
84 'usrsctplib/user_route.h', | 89 'usrsctplib/user_route.h', |
85 'usrsctplib/user_sctp_timer_iterate.c', | 90 'usrsctplib/user_sctp_timer_iterate.c', |
86 'usrsctplib/user_socket.c', | 91 'usrsctplib/user_socket.c', |
87 'usrsctplib/user_socketvar.h', | 92 'usrsctplib/user_socketvar.h', |
88 'usrsctplib/user_uma.h', | 93 'usrsctplib/user_uma.h', |
89 'usrsctplib/netinet/sctp_asconf.c', | 94 'usrsctplib/netinet/sctp_asconf.c', |
90 'usrsctplib/netinet/sctp_asconf.h', | 95 'usrsctplib/netinet/sctp_asconf.h', |
91 'usrsctplib/netinet/sctp_auth.c', | 96 'usrsctplib/netinet/sctp_auth.c', |
92 'usrsctplib/netinet/sctp_bsd_addr.c', | 97 'usrsctplib/netinet/sctp_bsd_addr.c', |
93 'usrsctplib/netinet/sctp_bsd_addr.h', | 98 'usrsctplib/netinet/sctp_bsd_addr.h', |
94 'usrsctplib/netinet/sctp_callout.c', | 99 'usrsctplib/netinet/sctp_callout.c', |
95 'usrsctplib/netinet/sctp_callout.h', | 100 'usrsctplib/netinet/sctp_callout.h', |
96 'usrsctplib/netinet/sctp_cc_functions.c', | 101 'usrsctplib/netinet/sctp_cc_functions.c', |
97 'usrsctplib/netinet/sctp_constants.h', | 102 'usrsctplib/netinet/sctp_constants.h', |
98 'usrsctplib/netinet/sctp_crc32.c', | 103 'usrsctplib/netinet/sctp_crc32.c', |
99 'usrsctplib/netinet/sctp_crc32.h', | 104 'usrsctplib/netinet/sctp_crc32.h', |
100 'usrsctplib/netinet/sctp_hashdriver.h', | |
101 'usrsctplib/netinet/sctp_hashdriver.c', | |
102 'usrsctplib/netinet/sctp_header.h', | 105 'usrsctplib/netinet/sctp_header.h', |
103 'usrsctplib/netinet/sctp_indata.c', | 106 'usrsctplib/netinet/sctp_indata.c', |
104 'usrsctplib/netinet/sctp_indata.h', | 107 'usrsctplib/netinet/sctp_indata.h', |
105 'usrsctplib/netinet/sctp_input.c', | 108 'usrsctplib/netinet/sctp_input.c', |
106 'usrsctplib/netinet/sctp_input.h', | 109 'usrsctplib/netinet/sctp_input.h', |
107 'usrsctplib/netinet/sctp_lock_userspace.h', | 110 'usrsctplib/netinet/sctp_lock_userspace.h', |
108 'usrsctplib/netinet/sctp_output.c', | 111 'usrsctplib/netinet/sctp_output.c', |
109 'usrsctplib/netinet/sctp_output.h', | 112 'usrsctplib/netinet/sctp_output.h', |
110 'usrsctplib/netinet/sctp_pcb.c', | 113 'usrsctplib/netinet/sctp_pcb.c', |
111 'usrsctplib/netinet/sctp_pcb.h', | 114 'usrsctplib/netinet/sctp_pcb.h', |
112 'usrsctplib/netinet/sctp_peeloff.c', | 115 'usrsctplib/netinet/sctp_peeloff.c', |
113 'usrsctplib/netinet/sctp_peeloff.h', | 116 'usrsctplib/netinet/sctp_peeloff.h', |
114 'usrsctplib/netinet/sctp_ss_functions.c', | 117 'usrsctplib/netinet/sctp_ss_functions.c', |
115 'usrsctplib/netinet/sctp_structs.h', | 118 'usrsctplib/netinet/sctp_structs.h', |
116 'usrsctplib/netinet/sctp_sysctl.c', | 119 'usrsctplib/netinet/sctp_sysctl.c', |
117 'usrsctplib/netinet/sctp_sysctl.h', | 120 'usrsctplib/netinet/sctp_sysctl.h', |
118 'usrsctplib/netinet/sctp_timer.c', | 121 'usrsctplib/netinet/sctp_timer.c', |
119 'usrsctplib/netinet/sctp_timer.h', | 122 'usrsctplib/netinet/sctp_timer.h', |
120 'usrsctplib/netinet/sctp_uio.h', | 123 'usrsctplib/netinet/sctp_uio.h', |
121 'usrsctplib/netinet/sctp_userspace.c', | 124 'usrsctplib/netinet/sctp_userspace.c', |
122 'usrsctplib/netinet/sctp_usrreq.c', | 125 'usrsctplib/netinet/sctp_usrreq.c', |
123 'usrsctplib/netinet/sctputil.c', | 126 'usrsctplib/netinet/sctputil.c', |
124 'usrsctplib/netinet/sctputil.h', | 127 'usrsctplib/netinet/sctputil.h', |
125 'usrsctplib/netinet/sctp_var.h', | 128 'usrsctplib/netinet/sctp_var.h', |
126 'usrsctplib/netinet6/sctp6_usrreq.c', | |
127 'usrsctplib/netinet6/sctp6_var.h', | |
128 ], # sources | 129 ], # sources |
129 'conditions': [ | 130 'conditions': [ |
130 ['use_openssl==1', { | |
131 'sources!': [ | |
132 'overrides/usrsctplib/netinet/sctp_nss_sha1.c', | |
133 'overrides/usrsctplib/netinet/sctp_nss_sha1.h', | |
134 ], | |
135 'sources': [ | |
136 'overrides/usrsctplib/netinet/sctp_openssl_sha1.h', | |
137 ], | |
138 }], | |
139 ['OS=="linux"', { | 131 ['OS=="linux"', { |
140 'defines': [ | 132 'defines': [ |
141 'HAVE_INET_ADDR', | |
142 'HAVE_SOCKET', | |
143 '__Userspace_os_Linux', | 133 '__Userspace_os_Linux', |
144 ], | 134 ], |
145 'cflags!': [ '-Werror', '-Wall' ], | 135 'cflags!': [ '-Werror', '-Wall' ], |
146 'cflags': [ '-w' ], | 136 'cflags': [ '-w' ], |
147 }], | 137 }], |
148 ['OS=="mac"', { | 138 ['OS=="mac"', { |
149 'defines': [ | 139 'defines': [ |
150 'HAVE_INET_ADDR', | |
151 'HAVE_SA_LEN', | 140 'HAVE_SA_LEN', |
152 'HAVE_SCONN_LEN', | 141 'HAVE_SCONN_LEN', |
153 'HAVE_SIN6_LEN', | |
154 'HAVE_SIN_LEN', | |
155 'HAVE_SOCKET', | |
156 'INET6', | |
157 '__APPLE_USE_RFC_2292', | 142 '__APPLE_USE_RFC_2292', |
158 '__Userspace_os_Darwin', | 143 '__Userspace_os_Darwin', |
159 ], | 144 ], |
160 # TODO(ldixon): explore why gyp cflags here does not get picked up. | 145 # TODO(ldixon): explore why gyp cflags here does not get picked up. |
161 'xcode_settings': { | 146 'xcode_settings': { |
162 'OTHER_CFLAGS!': [ '-Werror', '-Wall' ], | 147 'OTHER_CFLAGS!': [ '-Werror', '-Wall' ], |
163 'OTHER_CFLAGS': [ '-w' ], | 148 'OTHER_CFLAGS': [ '-w' ], |
164 }, | 149 }, |
165 }], | 150 }], |
166 ['OS=="win"', { | 151 ['OS=="win"', { |
167 'defines': [ | 152 'defines': [ |
168 'INET6', | |
169 '__Userspace_os_Windows', | 153 '__Userspace_os_Windows', |
170 ], | 154 ], |
171 'cflags!': [ '/W3', '/WX' ], | 155 'cflags!': [ '/W3', '/WX' ], |
172 'cflags': [ '/w' ], | 156 'cflags': [ '/w' ], |
173 # TODO(ldixon) : Remove this disable. | 157 # TODO(ldixon) : Remove this disabling of warnings by pushing a |
| 158 # fix upstream to usrsctp |
174 'msvs_disabled_warnings': [ 4700, 4013, 4018, 4133, 4267 ], | 159 'msvs_disabled_warnings': [ 4700, 4013, 4018, 4133, 4267 ], |
175 }, { # OS != "win", | 160 }, { # OS != "win", |
176 'defines': [ | 161 'defines': [ |
177 'NON_WINDOWS_DEFINE', | 162 'NON_WINDOWS_DEFINE', |
178 ], | 163 ], |
179 }], | 164 }], |
180 ], # conditions | 165 ], # conditions |
181 }, # target usrsctp | 166 }, # target usrsctp |
182 ], # targets | 167 ], # targets |
183 } | 168 } |
OLD | NEW |