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