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 | a99c947 | 2017-03-02 11:32:08 -0800 | [diff] [blame] | 44 | # Some Node installations use the system installation of OpenSSL, and on |
| 45 | # some systems, the system OpenSSL still does not have ALPN support. This |
| 46 | # will let users recompile gRPC to work without ALPN. |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 47 | 'grpc_alpn%': 'true', |
| 48 | # Indicates that the library should be built with gcov. |
murgatroid99 | 9805833 | 2017-04-19 10:25:34 -0700 | [diff] [blame] | 49 | 'grpc_gcov%': 'false', |
| 50 | # Indicates that the library should be built with compatibility for musl |
| 51 | # libc, so that it can run on Alpine Linux. This is only necessary if not |
| 52 | # building on Alpine Linux |
| 53 | 'grpc_alpine%': 'false' |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 54 | }, |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 55 | 'target_defaults': { |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 56 | 'configurations': { |
| 57 | % for name, args in configs.iteritems(): |
| 58 | % if name in ['dbg', 'opt']: |
| 59 | '${{'dbg':'Debug', 'opt': 'Release'}[name]}': { |
| 60 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('DEFINES', 'defines')]: |
| 61 | % if args.get(arg, None) is not None: |
| 62 | '${prop}': [ |
| 63 | % for item in args.get(arg).split(): |
| 64 | '${item}', |
| 65 | % endfor |
| 66 | ], |
| 67 | % endif |
| 68 | % endfor |
| 69 | }, |
| 70 | % endif |
| 71 | % endfor |
| 72 | }, |
| 73 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('LDFLAGS', 'ldflags')]: |
| 74 | % if defaults['global'].get(arg, None) is not None: |
| 75 | '${prop}': [ |
| 76 | % for item in defaults['global'].get(arg).split(): |
| 77 | '${item}', |
| 78 | % endfor |
| 79 | ], |
| 80 | % endif |
| 81 | % endfor |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 82 | 'include_dirs': [ |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 83 | '.', |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 84 | 'include' |
murgatroid99 | a89d9e7 | 2015-10-13 16:03:16 -0700 | [diff] [blame] | 85 | ], |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 86 | 'defines': [ |
murgatroid99 | f94f64f | 2017-04-24 13:35:21 -0700 | [diff] [blame] | 87 | 'GPR_BACKWARDS_COMPATIBILITY_MODE', |
| 88 | 'GRPC_ARES=0', |
| 89 | 'GRPC_UV' |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 90 | ], |
murgatroid99 | a89d9e7 | 2015-10-13 16:03:16 -0700 | [diff] [blame] | 91 | 'conditions': [ |
murgatroid99 | fef3913 | 2017-03-23 17:45:21 -0700 | [diff] [blame] | 92 | ['grpc_gcov=="true"', { |
| 93 | % for arg, prop in [('CPPFLAGS', 'cflags'), ('DEFINES', 'defines'), ('LDFLAGS', 'ldflags')]: |
| 94 | % if configs['gcov'].get(arg, None) is not None: |
| 95 | '${prop}': [ |
| 96 | % for item in configs['gcov'].get(arg).split(): |
| 97 | '${item}', |
| 98 | % endfor |
| 99 | ], |
| 100 | % endif |
| 101 | % endfor |
| 102 | }], |
murgatroid99 | 9805833 | 2017-04-19 10:25:34 -0700 | [diff] [blame] | 103 | ['grpc_alpine=="true"', { |
| 104 | 'defines': [ |
| 105 | 'GPR_MUSL_LIBC_COMPAT' |
| 106 | ] |
| 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 | 652210a | 2017-04-19 13:46:32 -0700 | [diff] [blame] | 236 | ] |
| 237 | }], |
| 238 | ['OS == "win"', { |
| 239 | 'targets': [ |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 240 | # Only want to compile zlib under Windows |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 241 | % for module in node_modules: |
| 242 | % for lib in libs: |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 243 | % if lib.name in module.transitive_deps and lib.name == 'z': |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 244 | { |
| 245 | 'cflags': [ |
| 246 | '-std=c99', |
| 247 | '-Wall', |
| 248 | '-Werror' |
| 249 | ], |
| 250 | 'target_name': '${lib.name}', |
| 251 | 'product_prefix': 'lib', |
| 252 | 'type': 'static_library', |
| 253 | 'dependencies': [ |
| 254 | % for dep in getattr(lib, 'deps', []): |
| 255 | '${dep}', |
| 256 | % endfor |
| 257 | ], |
| 258 | 'sources': [ |
| 259 | % for source in lib.src: |
| 260 | '${source}', |
| 261 | % endfor |
murgatroid99 | af6c178 | 2016-01-28 13:14:24 -0800 | [diff] [blame] | 262 | ] |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 263 | }, |
| 264 | % endif |
| 265 | % endfor |
| 266 | % endfor |
| 267 | ] |
| 268 | }] |
| 269 | ], |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 270 | 'targets': [ |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 271 | % for module in node_modules: |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 272 | % for lib in libs: |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 273 | % 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] | 274 | { |
murgatroid99 | 3abed31 | 2016-01-07 17:16:46 -0800 | [diff] [blame] | 275 | 'cflags': [ |
| 276 | '-std=c99', |
| 277 | '-Wall', |
| 278 | '-Werror' |
| 279 | ], |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 280 | 'target_name': '${lib.name}', |
| 281 | 'product_prefix': 'lib', |
| 282 | 'type': 'static_library', |
| 283 | 'dependencies': [ |
| 284 | % for dep in getattr(lib, 'deps', []): |
| 285 | '${dep}', |
| 286 | % endfor |
| 287 | ], |
| 288 | 'sources': [ |
| 289 | % for source in lib.src: |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 290 | '${source}', |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 291 | % endfor |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 292 | ], |
murgatroid99 | 6ffdb94 | 2015-10-22 16:10:05 -0700 | [diff] [blame] | 293 | "conditions": [ |
| 294 | ['OS == "mac"', { |
| 295 | 'xcode_settings': { |
murgatroid99 | 22c448b | 2015-10-23 10:25:30 -0700 | [diff] [blame] | 296 | 'MACOSX_DEPLOYMENT_TARGET': '10.9' |
murgatroid99 | 6ffdb94 | 2015-10-22 16:10:05 -0700 | [diff] [blame] | 297 | } |
| 298 | }] |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 299 | ] |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 300 | }, |
murgatroid99 | ca9db40 | 2015-09-21 14:39:09 -0700 | [diff] [blame] | 301 | % endif |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 302 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 303 | { |
| 304 | 'include_dirs': [ |
| 305 | "<!(node -e \"require('nan')\")" |
| 306 | ], |
| 307 | 'cflags': [ |
murgatroid99 | 3abed31 | 2016-01-07 17:16:46 -0800 | [diff] [blame] | 308 | '-std=c++11', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 309 | '-pthread', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 310 | '-zdefs', |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 311 | '-Wno-error=deprecated-declarations' |
| 312 | ], |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 313 | "conditions": [ |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 314 | ['OS=="win" or runtime=="electron"', { |
| 315 | 'dependencies': [ |
| 316 | % for dep in getattr(module, 'deps', []): |
| 317 | % if dep == 'boringssl': |
| 318 | "${dep}", |
| 319 | % endif |
| 320 | % endfor |
| 321 | ] |
| 322 | }], |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 323 | ['OS=="mac"', { |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 324 | 'xcode_settings': { |
| 325 | 'MACOSX_DEPLOYMENT_TARGET': '10.9', |
| 326 | 'OTHER_CFLAGS': [ |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 327 | '-stdlib=libc++', |
| 328 | '-std=c++11' |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 329 | ] |
| 330 | } |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 331 | }], |
| 332 | ['OS=="win"', { |
| 333 | 'dependencies': [ |
| 334 | % for dep in getattr(module, 'deps', []): |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 335 | % if dep == 'z': |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 336 | "${dep}", |
| 337 | % endif |
| 338 | % endfor |
| 339 | ] |
Craig Tiller | 4bef7ce | 2016-02-02 08:38:43 -0800 | [diff] [blame] | 340 | }], |
| 341 | ['OS=="linux"', { |
| 342 | 'ldflags': [ |
| 343 | '-Wl,-wrap,memcpy' |
| 344 | ] |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 345 | }] |
| 346 | ], |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 347 | "target_name": "${module.name}", |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 348 | "sources": [ |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 349 | % for source in module.src: |
| 350 | "${source}", |
| 351 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 352 | ], |
| 353 | "dependencies": [ |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 354 | % for dep in getattr(module, 'deps', []): |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 355 | % if dep not in ('boringssl', 'z'): |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 356 | "${dep}", |
murgatroid99 | 5c56c92 | 2016-01-25 13:32:52 -0800 | [diff] [blame] | 357 | % endif |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 358 | % endfor |
murgatroid99 | fd994f1 | 2015-10-09 14:02:28 -0700 | [diff] [blame] | 359 | ] |
murgatroid99 | 879bc4f | 2015-11-05 10:35:04 -0800 | [diff] [blame] | 360 | }, |
| 361 | % endfor |
murgatroid99 | e190f35 | 2016-01-20 13:52:08 -0800 | [diff] [blame] | 362 | { |
| 363 | "target_name": "action_after_build", |
| 364 | "type": "none", |
| 365 | "dependencies": [ "<(module_name)" ], |
| 366 | "copies": [ |
| 367 | { |
| 368 | "files": [ "<(PRODUCT_DIR)/<(module_name).node"], |
| 369 | "destination": "<(module_path)" |
| 370 | } |
| 371 | ] |
| 372 | } |
murgatroid99 | 2d6d330 | 2015-09-21 13:29:40 -0700 | [diff] [blame] | 373 | ] |
| 374 | } |