murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 1 | %YAML 1.2 |
| 2 | --- | |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 3 | # GRPC Node gyp file |
| 4 | # This currently builds the Node extension and dependencies |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 5 | # This file has been automatically generated from a template file. |
| 6 | # Please look at the templates directory instead. |
| 7 | # This file can be regenerated from the template by running |
| 8 | # tools/buildgen/generate_projects.sh |
| 9 | |
Craig Tiller | 6169d5f | 2016-03-31 07:46:18 -0700 | [diff] [blame] | 10 | # Copyright 2015, Google Inc. |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 11 | # All rights reserved. |
| 12 | # |
| 13 | # Redistribution and use in source and binary forms, with or without |
| 14 | # modification, are permitted provided that the following conditions are |
| 15 | # met: |
| 16 | # |
| 17 | # * Redistributions of source code must retain the above copyright |
| 18 | # notice, this list of conditions and the following disclaimer. |
| 19 | # * Redistributions in binary form must reproduce the above |
| 20 | # copyright notice, this list of conditions and the following disclaimer |
| 21 | # in the documentation and/or other materials provided with the |
| 22 | # distribution. |
| 23 | # * Neither the name of Google Inc. nor the names of its |
| 24 | # contributors may be used to endorse or promote products derived from |
| 25 | # this software without specific prior written permission. |
| 26 | # |
| 27 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 28 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 29 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 30 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 31 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 32 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 33 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 34 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 35 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 37 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 38 | |
| 39 | # Some of this file is built with the help of |
| 40 | # https://n8.io/converting-a-c-library-to-gyp/ |
| 41 | { |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 42 | 'variables': { |
murgatroid99 | 1191b72 | 2017-02-08 11:56:52 -0800 | [diff] [blame] | 43 | 'runtime%': 'node', |
murgatroid99 | ffe1a99 | 2017-03-09 10:04:11 -0800 | [diff] [blame] | 44 | # UV integration in C core is enabled by default. It can be disabled |
| 45 | # by setting this argument to anything else. |
| 46 | 'grpc_uv%': 'true', |
murgatroid99 | a99c947 | 2017-03-02 11:32:08 -0800 | [diff] [blame] | 47 | # Some Node installations use the system installation of OpenSSL, and on |
| 48 | # some systems, the system OpenSSL still does not have ALPN support. This |
| 49 | # will let users recompile gRPC to work without ALPN. |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 50 | 'grpc_alpn%': 'true', |
| 51 | # Indicates that the library should be built with gcov. |
| 52 | 'grpc_gcov%': 'false' |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 53 | }, |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 54 | 'target_defaults': { |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 55 | 'configurations': { |
| 56 | % for name, args in configs.iteritems(): |
| 57 | % if name in ['dbg', 'opt']: |
| 58 | '${{'dbg':'Debug', 'opt': 'Release'}[name]}': { |
| 59 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('DEFINES', 'defines')]: |
| 60 | % if args.get(arg, None) is not None: |
| 61 | '${prop}': [ |
| 62 | % for item in args.get(arg).split(): |
| 63 | '${item}', |
| 64 | % endfor |
| 65 | ], |
| 66 | % endif |
| 67 | % endfor |
| 68 | }, |
| 69 | % endif |
| 70 | % endfor |
| 71 | }, |
| 72 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('LDFLAGS', 'ldflags')]: |
| 73 | % if defaults['global'].get(arg, None) is not None: |
| 74 | '${prop}': [ |
| 75 | % for item in defaults['global'].get(arg).split(): |
| 76 | '${item}', |
| 77 | % endfor |
| 78 | ], |
| 79 | % endif |
| 80 | % endfor |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 81 | 'include_dirs': [ |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 82 | '.', |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 83 | 'include' |
murgatroid99 | a89d9e7 | 2015-10-13 16:03:16 -0700 | [diff] [blame] | 84 | ], |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 85 | 'defines': [ |
murgatroid99 | cb4b2b5 | 2016-10-27 11:30:50 -0700 | [diff] [blame] | 86 | 'GPR_BACKWARDS_COMPATIBILITY_MODE' |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 87 | ], |
murgatroid99 | a89d9e7 | 2015-10-13 16:03:16 -0700 | [diff] [blame] | 88 | 'conditions': [ |
murgatroid99 | 8c2946a | 2017-02-27 10:19:21 -0800 | [diff] [blame] | 89 | ['grpc_uv=="true"', { |
murgatroid99 | cb4b2b5 | 2016-10-27 11:30:50 -0700 | [diff] [blame] | 90 | 'defines': [ |
Yuchen Zeng | 3dbb7ea | 2017-01-25 16:15:17 -0800 | [diff] [blame] | 91 | 'GRPC_ARES=0', |
murgatroid99 | 6f62c0a | 2017-02-06 17:31:15 -0800 | [diff] [blame] | 92 | # Disabling this while bugs are ironed out. Uncomment this to |
| 93 | # re-enable libuv integration in C core. |
murgatroid99 | 1191b72 | 2017-02-08 11:56:52 -0800 | [diff] [blame] | 94 | 'GRPC_UV' |
murgatroid99 | cb4b2b5 | 2016-10-27 11:30:50 -0700 | [diff] [blame] | 95 | ] |
| 96 | }], |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 97 | ['grpc_gcov=="true"', { |
| 98 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('DEFINES', 'defines'), ('LDFLAGS', 'ldflags')]: |
| 99 | % if configs['gcov'].get(arg, None) is not None: |
| 100 | '${prop}': [ |
| 101 | % for item in configs['gcov'].get(arg).split(): |
| 102 | '${item}', |
| 103 | % endfor |
| 104 | ], |
| 105 | % endif |
| 106 | % endfor |
| 107 | }], |
murgatroid99 | e8ec16d | 2017-01-13 11:00:53 -0800 | [diff] [blame] | 108 | ['OS!="win" and runtime=="electron"', { |
Michael Lumish | 88162f8 | 2017-01-12 17:37:58 -0800 | [diff] [blame] | 109 | "defines": [ |
| 110 | 'OPENSSL_NO_THREADS' |
| 111 | ] |
| 112 | }], |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 113 | # This is the condition for using boringssl |
| 114 | ['OS=="win" or runtime=="electron"', { |
| 115 | "include_dirs": [ |
| 116 | "third_party/boringssl/include" |
| 117 | ], |
| 118 | "defines": [ |
Michael Lumish | 88162f8 | 2017-01-12 17:37:58 -0800 | [diff] [blame] | 119 | 'OPENSSL_NO_ASM' |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 120 | ] |
| 121 | }, { |
murgatroid99 | a99c947 | 2017-03-02 11:32:08 -0800 | [diff] [blame] | 122 | 'conditions': [ |
| 123 | ['grpc_alpn=="true"', { |
| 124 | 'defines': [ |
| 125 | 'TSI_OPENSSL_ALPN_SUPPORT=1' |
| 126 | ], |
| 127 | }, { |
| 128 | 'defines': [ |
| 129 | 'TSI_OPENSSL_ALPN_SUPPORT=0' |
| 130 | ], |
| 131 | }] |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 132 | ], |
| 133 | 'include_dirs': [ |
| 134 | '<(node_root_dir)/deps/openssl/openssl/include', |
| 135 | ], |
| 136 | 'conditions': [ |
| 137 | ["target_arch=='ia32'", { |
| 138 | "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ] |
| 139 | }], |
| 140 | ["target_arch=='x64'", { |
| 141 | "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ] |
| 142 | }], |
| 143 | ["target_arch=='arm'", { |
| 144 | "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ] |
| 145 | }] |
| 146 | ] |
| 147 | }], |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 148 | ['OS == "win"', { |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 149 | "include_dirs": [ |
Yuchen Zeng | b48000c | 2016-08-09 22:44:23 -0700 | [diff] [blame] | 150 | "third_party/zlib", |
Yuchen Zeng | 6694bb0 | 2017-01-23 17:09:51 -0800 | [diff] [blame] | 151 | "third_party/cares/cares" |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 152 | ], |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 153 | "defines": [ |
| 154 | '_WIN32_WINNT=0x0600', |
| 155 | 'WIN32_LEAN_AND_MEAN', |
| 156 | '_HAS_EXCEPTIONS=0', |
| 157 | 'UNICODE', |
| 158 | '_UNICODE', |
| 159 | 'NOMINMAX', |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 160 | ], |
| 161 | "msvs_settings": { |
| 162 | 'VCCLCompilerTool': { |
| 163 | 'RuntimeLibrary': 1, # static debug |
| 164 | } |
| 165 | }, |
| 166 | "libraries": [ |
| 167 | "ws2_32" |
| 168 | ] |
| 169 | }, { # OS != "win" |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 170 | 'include_dirs': [ |
Yuchen Zeng | b48000c | 2016-08-09 22:44:23 -0700 | [diff] [blame] | 171 | '<(node_root_dir)/deps/zlib', |
Michael Lumish | 68dff87 | 2017-04-03 11:16:41 -0700 | [diff] [blame] | 172 | '<(node_root_dir)/deps/cares/include' |
murgatroid99 | a89d9e7 | 2015-10-13 16:03:16 -0700 | [diff] [blame] | 173 | ] |
murgatroid99 | afe4698 | 2015-10-23 10:17:26 -0700 | [diff] [blame] | 174 | }] |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 175 | ] |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 176 | }, |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 177 | 'conditions': [ |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 178 | ['OS=="win" or runtime=="electron"', { |
| 179 | 'targets': [ |
| 180 | % for module in node_modules: |
| 181 | % for lib in libs: |
| 182 | % if lib.name in module.transitive_deps and lib.name == 'boringssl': |
| 183 | { |
| 184 | 'cflags': [ |
| 185 | '-std=c99', |
| 186 | '-Wall', |
| 187 | '-Werror' |
| 188 | ], |
| 189 | 'target_name': '${lib.name}', |
| 190 | 'product_prefix': 'lib', |
| 191 | 'type': 'static_library', |
| 192 | 'dependencies': [ |
| 193 | % for dep in getattr(lib, 'deps', []): |
| 194 | '${dep}', |
| 195 | % endfor |
| 196 | ], |
| 197 | 'sources': [ |
| 198 | % for source in lib.src: |
| 199 | '${source}', |
| 200 | % endfor |
| 201 | ] |
| 202 | }, |
| 203 | % endif |
| 204 | % endfor |
| 205 | % endfor |
| 206 | ] |
| 207 | }], |
murgatroid99 | f25f505 | 2017-04-13 17:22:32 -0700 | [diff] [blame] | 208 | ['OS == "win" and runtime!="electron"', { |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 209 | 'targets': [ |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 210 | { |
| 211 | # IMPORTANT WINDOWS BUILD INFORMATION |
| 212 | # This library does not build on Windows without modifying the Node |
| 213 | # development packages that node-gyp downloads in order to build. |
| 214 | # Due to https://github.com/nodejs/node/issues/4932, the headers for |
| 215 | # BoringSSL conflict with the OpenSSL headers included by default |
| 216 | # when including the Node headers. The remedy for this is to remove |
| 217 | # the OpenSSL headers, from the downloaded Node development package, |
| 218 | # which is typically located in `.node-gyp` in your home directory. |
murgatroid99 | f25f505 | 2017-04-13 17:22:32 -0700 | [diff] [blame] | 219 | # |
| 220 | # This is not true of Electron, which does not have OpenSSL headers. |
murgatroid99 | 8e4103e | 2016-01-28 14:53:33 -0800 | [diff] [blame] | 221 | 'target_name': 'WINDOWS_BUILD_WARNING', |
murgatroid99 | 025f110 | 2017-04-10 13:07:37 -0700 | [diff] [blame] | 222 | 'rules': [ |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 223 | { |
murgatroid99 | 025f110 | 2017-04-10 13:07:37 -0700 | [diff] [blame] | 224 | 'rule_name': 'WINDOWS_BUILD_WARNING', |
| 225 | 'extension': 'S', |
murgatroid99 | 8e4103e | 2016-01-28 14:53:33 -0800 | [diff] [blame] | 226 | 'inputs': [ |
| 227 | 'package.json' |
| 228 | ], |
| 229 | 'outputs': [ |
| 230 | 'ignore_this_part' |
| 231 | ], |
| 232 | 'action': ['echo', 'IMPORTANT: Due to https://github.com/nodejs/node/issues/4932, to build this library on Windows, you must first remove <(node_root_dir)/include/node/openssl/'] |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 233 | } |
| 234 | ] |
| 235 | }, |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 236 | # Only want to compile zlib under Windows |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 237 | % for module in node_modules: |
| 238 | % for lib in libs: |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 239 | % if lib.name in module.transitive_deps and lib.name == 'z': |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 240 | { |
| 241 | 'cflags': [ |
| 242 | '-std=c99', |
| 243 | '-Wall', |
| 244 | '-Werror' |
| 245 | ], |
| 246 | 'target_name': '${lib.name}', |
| 247 | 'product_prefix': 'lib', |
| 248 | 'type': 'static_library', |
| 249 | 'dependencies': [ |
| 250 | % for dep in getattr(lib, 'deps', []): |
| 251 | '${dep}', |
| 252 | % endfor |
| 253 | ], |
| 254 | 'sources': [ |
| 255 | % for source in lib.src: |
| 256 | '${source}', |
| 257 | % endfor |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 258 | ] |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 259 | }, |
| 260 | % endif |
| 261 | % endfor |
| 262 | % endfor |
| 263 | ] |
| 264 | }] |
| 265 | ], |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 266 | 'targets': [ |
Yuchen Zeng | 502d644 | 2016-08-22 17:36:24 -0700 | [diff] [blame] | 267 | <% |
| 268 | for lib in libs: |
| 269 | if 'grpc' in lib.transitive_deps or lib.name == 'grpc': |
| 270 | lib.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') |
| 271 | for module in node_modules: |
| 272 | module.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') |
| 273 | %> |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 274 | % for module in node_modules: |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 275 | % for lib in libs: |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 276 | % if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'): |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 277 | { |
murgatroid99 | 3abed31 | 2016-01-07 17:16:46 -0800 | [diff] [blame] | 278 | 'cflags': [ |
| 279 | '-std=c99', |
| 280 | '-Wall', |
| 281 | '-Werror' |
| 282 | ], |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 283 | 'target_name': '${lib.name}', |
| 284 | 'product_prefix': 'lib', |
| 285 | 'type': 'static_library', |
| 286 | 'dependencies': [ |
| 287 | % for dep in getattr(lib, 'deps', []): |
| 288 | '${dep}', |
| 289 | % endfor |
| 290 | ], |
| 291 | 'sources': [ |
| 292 | % for source in lib.src: |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 293 | '${source}', |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 294 | % endfor |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 295 | ], |
murgatroid99 | 6ffdb94 | 2015-10-22 16:10:05 -0700 | [diff] [blame] | 296 | "conditions": [ |
| 297 | ['OS == "mac"', { |
| 298 | 'xcode_settings': { |
murgatroid99 | 22c448b | 2015-10-23 10:25:30 -0700 | [diff] [blame] | 299 | 'MACOSX_DEPLOYMENT_TARGET': '10.9' |
murgatroid99 | 6ffdb94 | 2015-10-22 16:10:05 -0700 | [diff] [blame] | 300 | } |
| 301 | }] |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 302 | ] |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 303 | }, |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 304 | % endif |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 305 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 306 | { |
| 307 | 'include_dirs': [ |
| 308 | "<!(node -e \"require('nan')\")" |
| 309 | ], |
| 310 | 'cflags': [ |
murgatroid99 | 3abed31 | 2016-01-07 17:16:46 -0800 | [diff] [blame] | 311 | '-std=c++11', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 312 | '-pthread', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 313 | '-zdefs', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 314 | '-Wno-error=deprecated-declarations' |
| 315 | ], |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 316 | "conditions": [ |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 317 | ['OS=="win" or runtime=="electron"', { |
| 318 | 'dependencies': [ |
| 319 | % for dep in getattr(module, 'deps', []): |
| 320 | % if dep == 'boringssl': |
| 321 | "${dep}", |
| 322 | % endif |
| 323 | % endfor |
| 324 | ] |
| 325 | }], |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 326 | ['OS=="mac"', { |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 327 | 'xcode_settings': { |
| 328 | 'MACOSX_DEPLOYMENT_TARGET': '10.9', |
| 329 | 'OTHER_CFLAGS': [ |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 330 | '-stdlib=libc++', |
| 331 | '-std=c++11' |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 332 | ] |
| 333 | } |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 334 | }], |
| 335 | ['OS=="win"', { |
| 336 | 'dependencies': [ |
| 337 | % for dep in getattr(module, 'deps', []): |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 338 | % if dep == 'z': |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 339 | "${dep}", |
| 340 | % endif |
| 341 | % endfor |
| 342 | ] |
Craig Tiller | 4bef7ce | 2016-02-02 08:38:43 -0800 | [diff] [blame] | 343 | }], |
| 344 | ['OS=="linux"', { |
| 345 | 'ldflags': [ |
| 346 | '-Wl,-wrap,memcpy' |
| 347 | ] |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 348 | }] |
| 349 | ], |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 350 | "target_name": "${module.name}", |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 351 | "sources": [ |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 352 | % for source in module.src: |
| 353 | "${source}", |
| 354 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 355 | ], |
| 356 | "dependencies": [ |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 357 | % for dep in getattr(module, 'deps', []): |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 358 | % if dep not in ('boringssl', 'z'): |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 359 | "${dep}", |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 360 | % endif |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 361 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 362 | ] |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 363 | }, |
| 364 | % endfor |
murgatroid99 | e190f35 | 2016-01-20 13:52:08 -0800 | [diff] [blame] | 365 | { |
| 366 | "target_name": "action_after_build", |
| 367 | "type": "none", |
| 368 | "dependencies": [ "<(module_name)" ], |
| 369 | "copies": [ |
| 370 | { |
| 371 | "files": [ "<(PRODUCT_DIR)/<(module_name).node"], |
| 372 | "destination": "<(module_path)" |
| 373 | } |
| 374 | ] |
| 375 | } |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 376 | ] |
| 377 | } |