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 'SCTP_PROCESS_LEVEL_LOCKS', | 10 'SCTP_PROCESS_LEVEL_LOCKS', |
11 'SCTP_SIMPLE_ALLOCATOR', | 11 'SCTP_SIMPLE_ALLOCATOR', |
12 '__Userspace__', | 12 '__Userspace__', |
13 # 'SCTP_DEBUG', # Uncomment for SCTP debugging. | 13 # 'SCTP_DEBUG', # Uncomment for SCTP debugging. |
14 ], | 14 ], |
15 'include_dirs': [ | 15 'include_dirs': [ |
16 'overrides/usrsctplib', | |
17 'overrides/usrsctplib/netinet', | |
18 'usrsctplib/', | 16 'usrsctplib/', |
19 'usrsctplib/netinet', | 17 'usrsctplib/netinet', |
20 'usrsctplib/netinet6', | |
21 ], | 18 ], |
22 'direct_dependent_settings': { | 19 'direct_dependent_settings': { |
23 'include_dirs': [ | 20 'include_dirs': [ |
24 'overrides/usrsctplib', | |
25 'overrides/usrsctplib/netinet', | |
26 'usrsctplib/', | 21 'usrsctplib/', |
27 'usrsctplib/netinet', | 22 'usrsctplib/netinet', |
28 'usrsctplib/netinet6', | |
29 ], | 23 ], |
30 }, | 24 }, |
31 'conditions': [ | 25 'conditions': [ |
32 ['use_openssl==1', { | 26 ['use_openssl==1', { |
33 'defines': [ | 27 'defines': [ |
34 'SSL_USE_OPENSSL', | 28 'SCTP_USE_OPENSSL_SHA1', |
35 ], | 29 ], |
36 'dependencies': [ | 30 'dependencies': [ |
37 '<(DEPTH)/third_party/openssl/openssl.gyp:openssl', | 31 '<(DEPTH)/third_party/openssl/openssl.gyp:openssl', |
38 ], | 32 ], |
39 'sources': [ | |
40 'overrides/usrsctplib/netinet/sctp_openssl_sha1.h', | |
41 ], | |
42 }, | 33 }, |
43 { # else use_openssl==0, use NSS. | 34 { # else use_openssl==0, use NSS. |
44 'defines' : [ | 35 'defines' : [ |
45 'SSL_USE_NSS', | |
46 'SCTP_USE_NSS_SHA1', | 36 'SCTP_USE_NSS_SHA1', |
47 ], | 37 ], |
48 'sources': [ | |
49 'overrides/usrsctplib/netinet/sctp_nss_sha1.c', | |
50 'overrides/usrsctplib/netinet/sctp_nss_sha1.h', | |
51 ], | |
52 'conditions': [ | 38 'conditions': [ |
53 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"',
{ | 39 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"',
{ |
54 'dependencies': [ # The system.gyp:ssl dependency includes nss | 40 'dependencies': [ # The system.gyp:ssl dependency includes nss |
55 '<(DEPTH)/build/linux/system.gyp:ssl', | 41 '<(DEPTH)/build/linux/system.gyp:ssl', |
56 ], | 42 ], |
57 }], | 43 }], |
58 ['OS == "mac" or OS == "ios" or OS == "win"', { | 44 ['OS == "mac" or OS == "ios" or OS == "win"', { |
59 'dependencies': [ | 45 'dependencies': [ |
60 '<(DEPTH)/third_party/nss/nss.gyp:nspr', | 46 '<(DEPTH)/third_party/nss/nss.gyp:nspr', |
61 '<(DEPTH)/third_party/nss/nss.gyp:nss', | 47 '<(DEPTH)/third_party/nss/nss.gyp:nss', |
62 ], | 48 ], |
63 }], | 49 }], |
64 ], | 50 ], |
65 }], | 51 }], |
66 ], | 52 ], |
67 }, | 53 }, |
68 'targets': [ | 54 'targets': [ |
69 { | 55 { |
70 'target_name': 'usrsctplib', | 56 'target_name': 'usrsctplib', |
71 'type': 'static_library', | 57 'type': 'static_library', |
72 'sources': [ | 58 'sources': [ |
73 'overrides/usrsctplib/netinet/sctp_auth.h', | |
74 'overrides/usrsctplib/netinet/sctp_os.h', | |
75 'overrides/usrsctplib/netinet/sctp_os_userspace.h', | |
76 'overrides/usrsctplib/netinet/sctp_sha1.h', | |
77 'usrsctplib/usrsctp.h', | |
78 'usrsctplib/user_atomic.h', | |
79 'usrsctplib/user_environment.c', | |
80 'usrsctplib/user_environment.h', | |
81 'usrsctplib/user_inpcb.h', | |
82 'usrsctplib/user_ip6_var.h', | |
83 'usrsctplib/user_ip_icmp.h', | |
84 'usrsctplib/user_mbuf.c', | |
85 'usrsctplib/user_mbuf.h', | |
86 'usrsctplib/user_queue.h', | |
87 'usrsctplib/user_recv_thread.c', | |
88 'usrsctplib/user_recv_thread.h', | |
89 'usrsctplib/user_route.h', | |
90 'usrsctplib/user_sctp_timer_iterate.c', | |
91 'usrsctplib/user_socket.c', | |
92 'usrsctplib/user_socketvar.h', | |
93 'usrsctplib/user_uma.h', | |
94 'usrsctplib/netinet/sctp_asconf.c', | 59 'usrsctplib/netinet/sctp_asconf.c', |
95 'usrsctplib/netinet/sctp_asconf.h', | 60 'usrsctplib/netinet/sctp_asconf.h', |
96 'usrsctplib/netinet/sctp_auth.c', | 61 'usrsctplib/netinet/sctp_auth.c', |
| 62 'usrsctplib/netinet/sctp_auth.h', |
97 'usrsctplib/netinet/sctp_bsd_addr.c', | 63 'usrsctplib/netinet/sctp_bsd_addr.c', |
98 'usrsctplib/netinet/sctp_bsd_addr.h', | 64 'usrsctplib/netinet/sctp_bsd_addr.h', |
99 'usrsctplib/netinet/sctp_callout.c', | 65 'usrsctplib/netinet/sctp_callout.c', |
100 'usrsctplib/netinet/sctp_callout.h', | 66 'usrsctplib/netinet/sctp_callout.h', |
101 'usrsctplib/netinet/sctp_cc_functions.c', | 67 'usrsctplib/netinet/sctp_cc_functions.c', |
102 'usrsctplib/netinet/sctp_constants.h', | 68 'usrsctplib/netinet/sctp_constants.h', |
103 'usrsctplib/netinet/sctp_crc32.c', | 69 'usrsctplib/netinet/sctp_crc32.c', |
104 'usrsctplib/netinet/sctp_crc32.h', | 70 'usrsctplib/netinet/sctp_crc32.h', |
105 'usrsctplib/netinet/sctp_header.h', | 71 'usrsctplib/netinet/sctp_header.h', |
106 'usrsctplib/netinet/sctp_indata.c', | 72 'usrsctplib/netinet/sctp_indata.c', |
107 'usrsctplib/netinet/sctp_indata.h', | 73 'usrsctplib/netinet/sctp_indata.h', |
108 'usrsctplib/netinet/sctp_input.c', | 74 'usrsctplib/netinet/sctp_input.c', |
109 'usrsctplib/netinet/sctp_input.h', | 75 'usrsctplib/netinet/sctp_input.h', |
110 'usrsctplib/netinet/sctp_lock_userspace.h', | 76 'usrsctplib/netinet/sctp_lock_userspace.h', |
| 77 'usrsctplib/netinet/sctp_os.h', |
| 78 'usrsctplib/netinet/sctp_os_userspace.h', |
111 'usrsctplib/netinet/sctp_output.c', | 79 'usrsctplib/netinet/sctp_output.c', |
112 'usrsctplib/netinet/sctp_output.h', | 80 'usrsctplib/netinet/sctp_output.h', |
113 'usrsctplib/netinet/sctp_pcb.c', | 81 'usrsctplib/netinet/sctp_pcb.c', |
114 'usrsctplib/netinet/sctp_pcb.h', | 82 'usrsctplib/netinet/sctp_pcb.h', |
115 'usrsctplib/netinet/sctp_peeloff.c', | 83 'usrsctplib/netinet/sctp_peeloff.c', |
116 'usrsctplib/netinet/sctp_peeloff.h', | 84 'usrsctplib/netinet/sctp_peeloff.h', |
| 85 'usrsctplib/netinet/sctp_sha1.c', |
| 86 'usrsctplib/netinet/sctp_sha1.h', |
117 'usrsctplib/netinet/sctp_ss_functions.c', | 87 'usrsctplib/netinet/sctp_ss_functions.c', |
118 'usrsctplib/netinet/sctp_structs.h', | 88 'usrsctplib/netinet/sctp_structs.h', |
119 'usrsctplib/netinet/sctp_sysctl.c', | 89 'usrsctplib/netinet/sctp_sysctl.c', |
120 'usrsctplib/netinet/sctp_sysctl.h', | 90 'usrsctplib/netinet/sctp_sysctl.h', |
121 'usrsctplib/netinet/sctp_timer.c', | 91 'usrsctplib/netinet/sctp_timer.c', |
122 'usrsctplib/netinet/sctp_timer.h', | 92 'usrsctplib/netinet/sctp_timer.h', |
123 'usrsctplib/netinet/sctp_uio.h', | 93 'usrsctplib/netinet/sctp_uio.h', |
124 'usrsctplib/netinet/sctp_userspace.c', | 94 'usrsctplib/netinet/sctp_userspace.c', |
125 'usrsctplib/netinet/sctp_usrreq.c', | 95 'usrsctplib/netinet/sctp_usrreq.c', |
| 96 'usrsctplib/netinet/sctp_var.h', |
126 'usrsctplib/netinet/sctputil.c', | 97 'usrsctplib/netinet/sctputil.c', |
127 'usrsctplib/netinet/sctputil.h', | 98 'usrsctplib/netinet/sctputil.h', |
128 'usrsctplib/netinet/sctp_var.h', | 99 'usrsctplib/user_atomic.h', |
| 100 'usrsctplib/user_environment.c', |
| 101 'usrsctplib/user_environment.h', |
| 102 'usrsctplib/user_inpcb.h', |
| 103 'usrsctplib/user_ip6_var.h', |
| 104 'usrsctplib/user_ip_icmp.h', |
| 105 'usrsctplib/user_mbuf.c', |
| 106 'usrsctplib/user_mbuf.h', |
| 107 'usrsctplib/user_queue.h', |
| 108 'usrsctplib/user_recv_thread.c', |
| 109 'usrsctplib/user_recv_thread.h', |
| 110 'usrsctplib/user_route.h', |
| 111 'usrsctplib/user_sctp_timer_iterate.c', |
| 112 'usrsctplib/user_socket.c', |
| 113 'usrsctplib/user_socketvar.h', |
| 114 'usrsctplib/user_uma.h', |
| 115 'usrsctplib/usrsctp.h', |
129 ], # sources | 116 ], # sources |
130 'conditions': [ | 117 'conditions': [ |
131 ['OS=="linux"', { | 118 ['OS=="linux"', { |
132 'defines': [ | 119 'defines': [ |
133 '__Userspace_os_Linux', | 120 '__Userspace_os_Linux', |
134 ], | 121 ], |
135 'cflags!': [ '-Werror', '-Wall' ], | 122 'cflags!': [ '-Werror', '-Wall' ], |
136 'cflags': [ '-w' ], | 123 'cflags': [ '-w' ], |
137 }], | 124 }], |
138 ['OS=="mac"', { | 125 ['OS=="mac"', { |
139 'defines': [ | 126 'defines': [ |
140 'HAVE_SA_LEN', | 127 'HAVE_SA_LEN', |
141 'HAVE_SCONN_LEN', | 128 'HAVE_SCONN_LEN', |
142 '__APPLE_USE_RFC_2292', | 129 '__APPLE_USE_RFC_2292', |
143 '__Userspace_os_Darwin', | 130 '__Userspace_os_Darwin', |
144 ], | 131 ], |
145 # TODO(ldixon): explore why gyp cflags here does not get picked up. | 132 # usrsctp requires that __APPLE__ is undefined for compilation (for |
| 133 # historical reasons). There is a plan to change this, and when it |
| 134 # happens and we re-roll DEPS for usrsctp, we can remove the manual |
| 135 # undefining of __APPLE__. |
146 'xcode_settings': { | 136 'xcode_settings': { |
147 'OTHER_CFLAGS!': [ '-Werror', '-Wall' ], | 137 'OTHER_CFLAGS!': [ '-Werror', '-Wall' ], |
148 'OTHER_CFLAGS': [ '-w' ], | 138 'OTHER_CFLAGS': [ '-U__APPLE__', '-w' ], |
149 }, | 139 }, |
150 }], | 140 }], |
151 ['OS=="win"', { | 141 ['OS=="win"', { |
152 'defines': [ | 142 'defines': [ |
153 '__Userspace_os_Windows', | 143 '__Userspace_os_Windows', |
| 144 # Manually setting WINVER and _WIN32_WINNT is needed because Chrome |
| 145 # sets WINVER to a newer version of windows. But compiling usrsctp |
| 146 # this way would is incompatible with windows XP. |
| 147 'WINVER=0x0502', |
| 148 '_WIN32_WINNT=0x0502', |
154 ], | 149 ], |
155 'cflags!': [ '/W3', '/WX' ], | 150 'cflags!': [ '/W3', '/WX' ], |
156 'cflags': [ '/w' ], | 151 'cflags': [ '/w' ], |
157 # TODO(ldixon) : Remove this disabling of warnings by pushing a | 152 # TODO(ldixon) : Remove this disabling of warnings by pushing a |
158 # fix upstream to usrsctp | 153 # fix upstream to usrsctp |
159 'msvs_disabled_warnings': [ 4700, 4013, 4018, 4133, 4267 ], | 154 'msvs_disabled_warnings': [ 4700, 4013, 4018, 4133, 4267 ], |
160 }, { # OS != "win", | 155 }, { # OS != "win", |
161 'defines': [ | 156 'defines': [ |
162 'NON_WINDOWS_DEFINE', | 157 'NON_WINDOWS_DEFINE', |
163 ], | 158 ], |
164 }], | 159 }], |
165 ], # conditions | 160 ], # conditions |
166 }, # target usrsctp | 161 }, # target usrsctp |
167 ], # targets | 162 ], # targets |
168 } | 163 } |
OLD | NEW |