blob: c3b766059b66cfa7f9b097ce398184243fda6316 [file] [log] [blame]
Ryan Dahl4f3c8b32011-08-04 00:01:301{
Ryan Dahlbea48272011-08-04 06:36:272 'variables': {
Ryan Dahlbca88b22012-01-07 00:20:453 'v8_use_snapshot%': 'true',
Dave Pachecocc152992012-03-28 17:26:104 'node_use_dtrace%': 'false',
Igor Zinkovsky35a14212012-06-11 23:23:175 'node_use_etw%': 'false',
Scott Blomquistf657ce62012-11-20 23:27:226 'node_use_perfctr%': 'false',
Scott Blomquist841b7f52012-12-21 08:06:217 'node_has_winsdk%': 'false',
Nathan Rajlicha84adad2012-02-23 22:32:248 'node_shared_v8%': 'false',
T.C. Hollingsworthd03b8482012-02-26 23:02:219 'node_shared_zlib%': 'false',
Stephen Gallagherbfd78b62012-10-23 13:01:2610 'node_shared_http_parser%': 'false',
Stephen Gallagher73ff6532012-10-23 14:27:1911 'node_shared_cares%': 'false',
Stephen Gallagher38809e32012-10-23 23:54:2212 'node_shared_libuv%': 'false',
Bert Belderae2ac4f2011-09-04 23:01:5313 'node_use_openssl%': 'true',
Ryan Dahlfe464a22012-06-20 20:31:4914 'node_shared_openssl%': 'false',
Timothy J Fontainee851fef2013-07-17 20:46:2515 'node_use_mdb%': 'false',
Fedor Indutnyb55c9d62014-03-26 20:30:4916 'node_v8_options%': '',
Bert Belderae2ac4f2011-09-04 23:01:5317 'library_files': [
18 'src/node.js',
19 'lib/_debugger.js',
20 'lib/_linklist.js',
21 'lib/assert.js',
22 'lib/buffer.js',
Ryan Dahl96e423a2011-10-11 20:16:3323 'lib/child_process.js',
Bert Belderae2ac4f2011-09-04 23:01:5324 'lib/console.js',
25 'lib/constants.js',
26 'lib/crypto.js',
Ryan Dahl73b4b862011-10-12 21:51:2527 'lib/cluster.js',
Ryan Dahl71cce3f2011-10-11 20:26:4128 'lib/dgram.js',
Ryan Dahl58e892d2011-10-11 20:21:3029 'lib/dns.js',
isaacs963459d2012-04-06 23:26:1830 'lib/domain.js',
Bert Belderae2ac4f2011-09-04 23:01:5331 'lib/events.js',
32 'lib/freelist.js',
33 'lib/fs.js',
34 'lib/http.js',
Timothy J Fontaine62e4f892013-04-11 21:47:1535 'lib/_http_agent.js',
Timothy J Fontaine951e0b62013-04-11 23:11:1236 'lib/_http_client.js',
Timothy J Fontainebb564892013-04-11 22:15:4137 'lib/_http_common.js',
Timothy J Fontaine5909a9c2013-04-11 22:00:4538 'lib/_http_incoming.js',
Timothy J Fontainedc9f97b2013-04-11 22:37:1439 'lib/_http_outgoing.js',
Timothy J Fontaine6717fdc2013-04-11 23:00:1940 'lib/_http_server.js',
Bert Belderae2ac4f2011-09-04 23:01:5341 'lib/https.js',
Bert Belderae2ac4f2011-09-04 23:01:5342 'lib/module.js',
Ryan Dahlbe0bb2d2011-10-11 20:07:1443 'lib/net.js',
Bert Belderae2ac4f2011-09-04 23:01:5344 'lib/os.js',
45 'lib/path.js',
46 'lib/punycode.js',
47 'lib/querystring.js',
48 'lib/readline.js',
49 'lib/repl.js',
Trevor Norrisd8178432013-07-12 22:18:2150 'lib/smalloc.js',
Bert Belderae2ac4f2011-09-04 23:01:5351 'lib/stream.js',
isaacs420e07c2012-10-02 22:44:5052 'lib/_stream_readable.js',
53 'lib/_stream_writable.js',
54 'lib/_stream_duplex.js',
55 'lib/_stream_transform.js',
56 'lib/_stream_passthrough.js',
Bert Belderae2ac4f2011-09-04 23:01:5357 'lib/string_decoder.js',
58 'lib/sys.js',
Ryan Dahlbe0bb2d2011-10-11 20:07:1459 'lib/timers.js',
Ben Noordhuis010222d2013-10-28 13:57:4760 'lib/tracing.js',
Bert Belderae2ac4f2011-09-04 23:01:5361 'lib/tls.js',
Fedor Indutny5d2aef12014-03-06 23:27:0162 'lib/_tls_common.js',
Fedor Indutnyaf80e7b2013-06-13 13:36:0063 'lib/_tls_legacy.js',
64 'lib/_tls_wrap.js',
Ryan Dahlcdf5d912011-10-11 20:41:3365 'lib/tty.js',
Bert Belderae2ac4f2011-09-04 23:01:5366 'lib/url.js',
67 'lib/util.js',
68 'lib/vm.js',
isaacs5b8e1da2011-09-06 23:13:0569 'lib/zlib.js',
Bert Belderae2ac4f2011-09-04 23:01:5370 ],
Ryan Dahlbea48272011-08-04 06:36:2771 },
72
Ryan Dahl4f3c8b32011-08-04 00:01:3073 'targets': [
74 {
75 'target_name': 'node',
76 'type': 'executable',
Ryan Dahlbea48272011-08-04 06:36:2777
Ryan Dahl4f3c8b32011-08-04 00:01:3078 'dependencies': [
Ryan Dahla979ab92011-08-04 23:40:0779 'node_js2c#host',
Ryan Dahl4f3c8b32011-08-04 00:01:3080 ],
Ryan Dahla979ab92011-08-04 23:40:0781
82 'include_dirs': [
Ryan Dahldb1bf672011-08-08 19:11:4883 'src',
Scott Blomquista6167742013-01-03 22:36:0484 'tools/msvs/genfiles',
Ryan Dahldb1bf672011-08-08 19:11:4885 'deps/uv/src/ares',
Ryan Dahla979ab92011-08-04 23:40:0786 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
87 ],
88
Ryan Dahl4f3c8b32011-08-04 00:01:3089 'sources': [
Igor Zinkovsky8fe57122011-09-22 23:18:0890 'src/fs_event_wrap.cc',
Ryan Dahldb1bf672011-08-08 19:11:4891 'src/cares_wrap.cc',
92 'src/handle_wrap.cc',
93 'src/node.cc',
94 'src/node_buffer.cc',
95 'src/node_constants.cc',
Domenic Denicola7afdba62013-07-27 04:34:1296 'src/node_contextify.cc',
Ryan Dahldb1bf672011-08-08 19:11:4897 'src/node_file.cc',
98 'src/node_http_parser.cc',
99 'src/node_javascript.cc',
100 'src/node_main.cc',
101 'src/node_os.cc',
Ben Noordhuis010222d2013-10-28 13:57:47102 'src/node_v8.cc',
Ben Noordhuisf0ce9842012-06-16 20:41:37103 'src/node_stat_watcher.cc',
Andrew Paprockic0818092012-10-08 19:24:08104 'src/node_watchdog.cc',
isaacs5b8e1da2011-09-06 23:13:05105 'src/node_zlib.cc',
Ryan Dahldb1bf672011-08-08 19:11:48106 'src/pipe_wrap.cc',
Bert Belder600a6462012-08-20 21:59:21107 'src/signal_wrap.cc',
Trevor Norris8f3f9f72013-04-17 23:18:47108 'src/smalloc.cc',
Bert Belderfa4eb472014-02-10 20:22:06109 'src/spawn_sync.cc',
isaacs64fc34b2013-05-01 22:40:43110 'src/string_bytes.cc',
Ryan Dahldb1bf672011-08-08 19:11:48111 'src/stream_wrap.cc',
112 'src/tcp_wrap.cc',
113 'src/timer_wrap.cc',
Ryan Dahlc1ae6ea2011-09-20 20:38:07114 'src/tty_wrap.cc',
Ryan Dahldb1bf672011-08-08 19:11:48115 'src/process_wrap.cc',
Ryan Dahl06f750c2011-08-24 23:20:08116 'src/udp_wrap.cc',
Ben Noordhuisd4c14c12013-07-16 21:08:25117 'src/uv.cc',
Peter Bright64b41682011-08-15 16:35:48118 # headers to make for a more pleasant IDE experience
Trevor Norrisefa62fd2013-09-24 21:12:11119 'src/async-wrap.h',
120 'src/async-wrap-inl.h',
Trevor Norrisd120d922013-11-04 18:49:55121 'src/base-object.h',
122 'src/base-object-inl.h',
Ben Noordhuis756b6222013-08-10 22:26:11123 'src/env.h',
124 'src/env-inl.h',
Peter Bright64b41682011-08-15 16:35:48125 'src/handle_wrap.h',
126 'src/node.h',
127 'src/node_buffer.h',
Peter Bright64b41682011-08-15 16:35:48128 'src/node_constants.h',
Peter Bright64b41682011-08-15 16:35:48129 'src/node_file.h',
130 'src/node_http_parser.h',
Ben Noordhuis756b6222013-08-10 22:26:11131 'src/node_internals.h',
Peter Bright64b41682011-08-15 16:35:48132 'src/node_javascript.h',
Peter Bright64b41682011-08-15 16:35:48133 'src/node_root_certs.h',
Peter Bright64b41682011-08-15 16:35:48134 'src/node_version.h',
Andrew Paprockic0818092012-10-08 19:24:08135 'src/node_watchdog.h',
Fedor Indutny6978e992013-06-11 10:52:27136 'src/node_wrap.h',
Peter Bright64b41682011-08-15 16:35:48137 'src/pipe_wrap.h',
Ben Noordhuisa7820a12013-06-04 10:21:58138 'src/queue.h',
Trevor Norris8f3f9f72013-04-17 23:18:47139 'src/smalloc.h',
Fedor Indutnyaf98fc92012-05-16 16:04:24140 'src/tty_wrap.h',
141 'src/tcp_wrap.h',
142 'src/udp_wrap.h',
Peter Bright64b41682011-08-15 16:35:48143 'src/req_wrap.h',
isaacs64fc34b2013-05-01 22:40:43144 'src/string_bytes.h',
Peter Bright64b41682011-08-15 16:35:48145 'src/stream_wrap.h',
Bert Belder9e55ba72012-08-06 19:22:11146 'src/tree.h',
Ben Noordhuis756b6222013-08-10 22:26:11147 'src/util.h',
148 'src/util-inl.h',
Timothy J Fontaine1a09da62014-06-10 23:36:04149 'src/util.cc',
Peter Bright64b41682011-08-15 16:35:48150 'deps/http_parser/http_parser.h',
Peter Bright64b41682011-08-15 16:35:48151 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
Bert Belderae2ac4f2011-09-04 23:01:53152 # javascript files to make for an even more pleasant IDE experience
153 '<@(library_files)',
Bert Belderc0c4bd42011-10-28 10:10:24154 # node.gyp is added to the project by default.
155 'common.gypi',
Ryan Dahla979ab92011-08-04 23:40:07156 ],
157
158 'defines': [
Ben Noordhuis09dc5772011-11-29 16:35:19159 'NODE_WANT_INTERNALS=1',
Ryan Dahla979ab92011-08-04 23:40:07160 'ARCH="<(target_arch)"',
161 'PLATFORM="<(OS)"',
Maciej Małeckif84bf5b2012-12-21 01:56:47162 'NODE_TAG="<(node_tag)"',
Ben Noordhuis490d5ab2014-03-31 12:22:49163 'NODE_V8_OPTIONS="<(node_v8_options)"',
Ryan Dahl4f3c8b32011-08-04 00:01:30164 ],
165
166 'conditions': [
Ryan Dahla979ab92011-08-04 23:40:07167 [ 'node_use_openssl=="true"', {
Peter Bright71333b32011-08-06 19:20:15168 'defines': [ 'HAVE_OPENSSL=1' ],
Fedor Indutny03e008d2013-06-11 10:59:10169 'sources': [
170 'src/node_crypto.cc',
171 'src/node_crypto_bio.cc',
Fedor Indutny8e281932013-08-02 12:16:13172 'src/node_crypto_clienthello.cc',
Nathan Rajlich567c72b2013-07-06 03:53:23173 'src/node_crypto.h',
174 'src/node_crypto_bio.h',
Fedor Indutny8e281932013-08-02 12:16:13175 'src/node_crypto_clienthello.h',
Fedor Indutny03e008d2013-06-11 10:59:10176 'src/tls_wrap.cc',
177 'src/tls_wrap.h'
178 ],
Ben Noordhuis9f986982011-08-29 22:01:43179 'conditions': [
Ryan Dahlfe464a22012-06-20 20:31:49180 [ 'node_shared_openssl=="false"', {
Fedor Indutny6f3d6032013-12-11 17:20:17181 'dependencies': [
182 './deps/openssl/openssl.gyp:openssl',
183
184 # For tests
Fedor Indutny93390ff2014-07-23 19:51:14185 './deps/openssl/openssl.gyp:openssl-cli',
Fedor Indutny6f3d6032013-12-11 17:20:17186 ],
Fedor Indutny9f36c0d2014-07-30 10:54:36187 # Do not let unused OpenSSL symbols to slip away
188 'xcode_settings': {
189 'OTHER_LDFLAGS': [
190 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
191 ],
192 },
193 'conditions': [
194 ['OS=="linux"', {
195 'ldflags': [
196 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
197 ],
198 }],
199 ],
Ben Noordhuis9f986982011-08-29 22:01:43200 }]]
Ryan Dahla979ab92011-08-04 23:40:07201 }, {
202 'defines': [ 'HAVE_OPENSSL=0' ]
203 }],
Peter Bright64b41682011-08-15 16:35:48204 [ 'node_use_dtrace=="true"', {
Dave Pachecocc152992012-03-28 17:26:10205 'defines': [ 'HAVE_DTRACE=1' ],
Fedor Indutnyb940e0f2014-02-20 16:52:26206 'dependencies': [
207 'node_dtrace_header',
208 'specialize_node_d',
209 ],
Dave Pachecocc152992012-03-28 17:26:10210 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
Fedor Indutnyb940e0f2014-02-20 16:52:26211
Dave Pachecocc152992012-03-28 17:26:10212 #
Ben Noordhuisc4def502013-10-28 19:18:59213 # DTrace is supported on linux, solaris, mac, and bsd. There are
214 # three object files associated with DTrace support, but they're
215 # not all used all the time:
Dave Pachecofe7440c2013-03-28 18:36:00216 #
217 # node_dtrace.o all configurations
Ben Noordhuisc4def502013-10-28 19:18:59218 # node_dtrace_ustack.o not supported on mac and linux
Dave Pachecofe7440c2013-03-28 18:36:00219 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
220 # used on OS X.
221 #
222 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
223 # actually exist. They're listed here to trick GYP into linking the
224 # corresponding object files into the final "node" executable. These
225 # object files are generated by "dtrace -G" using custom actions
226 # below, and the GYP-generated Makefiles will properly build them when
227 # needed.
Dave Pachecocc152992012-03-28 17:26:10228 #
Ben Noordhuisc4def502013-10-28 19:18:59229 'sources': [ 'src/node_dtrace.cc' ],
230 'conditions': [
231 [ 'OS=="linux"', {
232 'sources': [
233 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
234 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
235 ],
236 }],
237 [ 'OS!="mac" and OS!="linux"', {
Dave Pachecofe7440c2013-03-28 18:36:00238 'sources': [
239 'src/node_dtrace_ustack.cc',
240 'src/node_dtrace_provider.cc',
241 ]
242 }
243 ] ]
Dave Pachecocc152992012-03-28 17:26:10244 } ],
Timothy J Fontainee851fef2013-07-17 20:46:25245 [ 'node_use_mdb=="true"', {
246 'dependencies': [ 'node_mdb' ],
247 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
248 'sources': [
249 'src/node_mdb.cc',
250 ],
251 } ],
Igor Zinkovsky35a14212012-06-11 23:23:17252 [ 'node_use_etw=="true"', {
253 'defines': [ 'HAVE_ETW=1' ],
254 'dependencies': [ 'node_etw' ],
255 'sources': [
256 'src/node_win32_etw_provider.h',
257 'src/node_win32_etw_provider-inl.h',
258 'src/node_win32_etw_provider.cc',
259 'src/node_dtrace.cc',
Scott Blomquista6167742013-01-03 22:36:04260 'tools/msvs/genfiles/node_etw_provider.h',
261 'tools/msvs/genfiles/node_etw_provider.rc',
Igor Zinkovsky35a14212012-06-11 23:23:17262 ]
263 } ],
Scott Blomquistf657ce62012-11-20 23:27:22264 [ 'node_use_perfctr=="true"', {
265 'defines': [ 'HAVE_PERFCTR=1' ],
266 'dependencies': [ 'node_perfctr' ],
267 'sources': [
268 'src/node_win32_perfctr_provider.h',
269 'src/node_win32_perfctr_provider.cc',
270 'src/node_counters.cc',
271 'src/node_counters.h',
Scott Blomquista6167742013-01-03 22:36:04272 'tools/msvs/genfiles/node_perfctr_provider.rc',
Scott Blomquistf657ce62012-11-20 23:27:22273 ]
274 } ],
Paddy Byersd8852aa2013-04-03 07:35:39275 [ 'v8_postmortem_support=="true"', {
276 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
Fedor Indutny4c48df52014-07-21 18:12:11277 'xcode_settings': {
278 'OTHER_LDFLAGS': [
279 '-Wl,-force_load,<(V8_BASE)',
280 ],
281 },
Paddy Byersd8852aa2013-04-03 07:35:39282 }],
Ben Noordhuisf00c8bc2012-06-26 22:33:50283 [ 'node_shared_v8=="false"', {
isaacs59ecf2c2012-02-23 22:52:18284 'sources': [
285 'deps/v8/include/v8.h',
286 'deps/v8/include/v8-debug.h',
287 ],
288 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
289 }],
290
T.C. Hollingsworthd03b8482012-02-26 23:02:21291 [ 'node_shared_zlib=="false"', {
292 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
293 }],
294
Stephen Gallagherbfd78b62012-10-23 13:01:26295 [ 'node_shared_http_parser=="false"', {
296 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
297 }],
298
Stephen Gallagher73ff6532012-10-23 14:27:19299 [ 'node_shared_cares=="false"', {
300 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
301 }],
302
Stephen Gallagher38809e32012-10-23 23:54:22303 [ 'node_shared_libuv=="false"', {
304 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
305 }],
306
Ryan Dahl4f3c8b32011-08-04 00:01:30307 [ 'OS=="win"', {
Ryan Dahl4f3c8b32011-08-04 00:01:30308 'sources': [
Bert Belder0187b652012-06-13 15:40:50309 'src/res/node.rc',
Peter Bright71333b32011-08-06 19:20:15310 ],
Peter Bright6ac8c552011-08-07 05:11:21311 'defines': [
Peter Bright6ac8c552011-08-07 05:11:21312 'FD_SETSIZE=1024',
Peter Bright79d9f622011-08-07 17:43:24313 # we need to use node's preferred "win32" rather than gyp's preferred "win"
314 'PLATFORM="win32"',
Bert Belderd52f5022012-02-16 19:20:07315 '_UNICODE=1',
Peter Bright6ac8c552011-08-07 05:11:21316 ],
Ryan Dahl19762882011-09-02 19:53:16317 'libraries': [ '-lpsapi.lib' ]
Ben Noordhuisacbfc402012-07-12 23:43:14318 }, { # POSIX
Ryan Dahla979ab92011-08-04 23:40:07319 'defines': [ '__POSIX__' ],
Ryan Dahl4f3c8b32011-08-04 00:01:30320 }],
321 [ 'OS=="mac"', {
Thorsten Lorenzb1741ea2014-08-06 18:00:31322 # linking Corefoundation is needed since certain OSX debugging tools
323 # like Instruments require it for some features
324 'libraries': [ '-framework CoreFoundation' ],
Nathan Rajlichf2ba4ce2012-01-11 22:44:39325 'defines!': [
326 'PLATFORM="mac"',
327 ],
Nathan Rajlich9ff86a22012-01-11 22:36:27328 'defines': [
329 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
330 'PLATFORM="darwin"',
331 ],
Ryan Dahlb433c422011-08-16 00:54:47332 }],
Ben Noordhuisdecd8182011-08-17 05:44:53333 [ 'OS=="freebsd"', {
Ben Noordhuisdecd8182011-08-17 05:44:53334 'libraries': [
335 '-lutil',
336 '-lkvm',
337 ],
338 }],
Ben Noordhuis13871fa2011-10-26 05:11:20339 [ 'OS=="solaris"', {
Ben Noordhuis13871fa2011-10-26 05:11:20340 'libraries': [
341 '-lkstat',
Trent Mickf70b1382012-07-27 17:56:40342 '-lumem',
Ben Noordhuis13871fa2011-10-26 05:11:20343 ],
Nathan Rajlich606a9332012-08-29 21:57:25344 'defines!': [
345 'PLATFORM="solaris"',
346 ],
347 'defines': [
348 # we need to use node's preferred "sunos"
349 # rather than gyp's preferred "solaris"
350 'PLATFORM="sunos"',
351 ],
Ben Noordhuis13871fa2011-10-26 05:11:20352 }],
Timothy J Fontaine6877e642013-12-02 02:57:43353 [
Timothy J Fontaine92bbd602013-12-10 18:10:34354 'OS=="linux" and node_shared_v8=="false"', {
Timothy J Fontaine6877e642013-12-02 02:57:43355 'ldflags': [
Fedor Indutny61c0d572014-01-16 16:39:12356 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
Timothy J Fontaine6877e642013-12-02 02:57:43357 ],
358 }],
Peter Bright16788f42011-08-13 18:17:47359 ],
Bert Belder5691e8a2012-09-24 22:50:37360 'msvs_settings': {
Peter Bright16788f42011-08-13 18:17:47361 'VCLinkerTool': {
362 'SubSystem': 1, # /subsystem:console
363 },
364 },
Ryan Dahl4f3c8b32011-08-04 00:01:30365 },
Igor Zinkovsky35a14212012-06-11 23:23:17366 # generate ETW header and resource files
367 {
368 'target_name': 'node_etw',
369 'type': 'none',
370 'conditions': [
Scott Blomquist841b7f52012-12-21 08:06:21371 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
Igor Zinkovsky35a14212012-06-11 23:23:17372 'actions': [
373 {
374 'action_name': 'node_etw',
375 'inputs': [ 'src/res/node_etw_provider.man' ],
Scott Blomquist953b0492012-10-25 23:51:46376 'outputs': [
Scott Blomquista6167742013-01-03 22:36:04377 'tools/msvs/genfiles/node_etw_provider.rc',
378 'tools/msvs/genfiles/node_etw_provider.h',
379 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
Scott Blomquist953b0492012-10-25 23:51:46380 ],
Scott Blomquista6167742013-01-03 22:36:04381 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
Igor Zinkovsky35a14212012-06-11 23:23:17382 }
383 ]
384 } ]
385 ]
386 },
Scott Blomquistf657ce62012-11-20 23:27:22387 # generate perf counter header and resource files
388 {
389 'target_name': 'node_perfctr',
390 'type': 'none',
391 'conditions': [
Scott Blomquist841b7f52012-12-21 08:06:21392 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
Scott Blomquistf657ce62012-11-20 23:27:22393 'actions': [
394 {
395 'action_name': 'node_perfctr_man',
396 'inputs': [ 'src/res/node_perfctr_provider.man' ],
397 'outputs': [
Scott Blomquista6167742013-01-03 22:36:04398 'tools/msvs/genfiles/node_perfctr_provider.h',
399 'tools/msvs/genfiles/node_perfctr_provider.rc',
400 'tools/msvs/genfiles/MSG00001.BIN',
Scott Blomquistf657ce62012-11-20 23:27:22401 ],
402 'action': [ 'ctrpp <@(_inputs) '
Scott Blomquista6167742013-01-03 22:36:04403 '-o tools/msvs/genfiles/node_perfctr_provider.h '
404 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
Scott Blomquistf657ce62012-11-20 23:27:22405 ]
406 },
407 ],
408 } ]
409 ]
410 },
Ryan Dahl4f3c8b32011-08-04 00:01:30411 {
412 'target_name': 'node_js2c',
413 'type': 'none',
414 'toolsets': ['host'],
Ryan Dahl4f3c8b32011-08-04 00:01:30415 'actions': [
416 {
417 'action_name': 'node_js2c',
418 'inputs': [
Ryan Dahl4f3c8b32011-08-04 00:01:30419 '<@(library_files)',
Nathan Rajlich95fd5172012-03-14 15:34:44420 './config.gypi',
Ryan Dahl4f3c8b32011-08-04 00:01:30421 ],
422 'outputs': [
423 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
424 ],
Ryan Dahla979ab92011-08-04 23:40:07425 'conditions': [
Ben Noordhuisc4def502013-10-28 19:18:59426 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
427 'inputs': [ 'src/notrace_macros.py' ]
Ben Noordhuis4b279f02013-07-24 10:53:28428 }],
Scott Blomquistf657ce62012-11-20 23:27:22429 [ 'node_use_perfctr=="false"', {
430 'inputs': [ 'src/perfctr_macros.py' ]
Ryan Dahla979ab92011-08-04 23:40:07431 }]
Peter Bright71333b32011-08-06 19:20:15432 ],
Ben Noordhuis4b279f02013-07-24 10:53:28433 'action': [
434 '<(python)',
435 'tools/js2c.py',
436 '<@(_outputs)',
437 '<@(_inputs)',
438 ],
Ryan Dahl4f3c8b32011-08-04 00:01:30439 },
440 ],
441 }, # end node_js2c
Dave Pachecocc152992012-03-28 17:26:10442 {
443 'target_name': 'node_dtrace_header',
444 'type': 'none',
445 'conditions': [
Ben Noordhuisc4def502013-10-28 19:18:59446 [ 'node_use_dtrace=="true"', {
Dave Pachecocc152992012-03-28 17:26:10447 'actions': [
448 {
449 'action_name': 'node_dtrace_header',
450 'inputs': [ 'src/node_provider.d' ],
451 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
452 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
453 '-o', '<@(_outputs)' ]
454 }
455 ]
456 } ]
457 ]
458 },
459 {
Timothy J Fontainee851fef2013-07-17 20:46:25460 'target_name': 'node_mdb',
461 'type': 'none',
462 'conditions': [
463 [ 'node_use_mdb=="true"',
464 {
465 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
466 'actions': [
467 {
468 'action_name': 'node_mdb',
469 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
470 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
471 'conditions': [
472 [ 'target_arch=="ia32"', {
Timothy J Fontaine032373d2013-08-05 21:33:55473 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
Timothy J Fontainee851fef2013-07-17 20:46:25474 } ],
475 [ 'target_arch=="x64"', {
476 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
477 } ],
478 ],
479 },
480 ],
481 },
482 ],
483 ],
484 },
485 {
Dave Pachecocc152992012-03-28 17:26:10486 'target_name': 'node_dtrace_provider',
487 'type': 'none',
488 'conditions': [
Ben Noordhuisc4def502013-10-28 19:18:59489 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
Dave Pachecocc152992012-03-28 17:26:10490 'actions': [
491 {
492 'action_name': 'node_dtrace_provider_o',
493 'inputs': [
Timothy J Fontainec1b1f312014-01-25 03:13:50494 '<(OBJ_DIR)/libuv/deps/uv/src/unix/core.o',
495 '<(OBJ_DIR)/node/src/node_dtrace.o',
Dave Pachecocc152992012-03-28 17:26:10496 ],
497 'outputs': [
Fedor Indutny61c0d572014-01-16 16:39:12498 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
Dave Pachecocc152992012-03-28 17:26:10499 ],
Timothy J Fontainef0d80d72013-04-16 23:18:07500 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
501 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
Dave Pachecocc152992012-03-28 17:26:10502 '-o', '<@(_outputs)' ]
503 }
504 ]
Ben Noordhuisc4def502013-10-28 19:18:59505 }],
506 [ 'node_use_dtrace=="true" and OS=="linux"', {
507 'actions': [
508 {
509 'action_name': 'node_dtrace_provider_o',
510 'inputs': [ 'src/node_provider.d' ],
511 'outputs': [
512 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
513 ],
514 'action': [
515 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
516 ],
517 },
518 {
519 'action_name': 'libuv_dtrace_provider_o',
520 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
521 'outputs': [
522 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
523 ],
524 'action': [
525 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
526 ],
527 },
528 ],
529 }],
Dave Pachecocc152992012-03-28 17:26:10530 ]
531 },
532 {
533 'target_name': 'node_dtrace_ustack',
534 'type': 'none',
535 'conditions': [
Ben Noordhuisc4def502013-10-28 19:18:59536 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
Dave Pachecocc152992012-03-28 17:26:10537 'actions': [
538 {
539 'action_name': 'node_dtrace_ustack_constants',
540 'inputs': [
Fedor Indutny61c0d572014-01-16 16:39:12541 '<(V8_BASE)'
Dave Pachecocc152992012-03-28 17:26:10542 ],
543 'outputs': [
544 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
545 ],
546 'action': [
547 'tools/genv8constants.py',
548 '<@(_outputs)',
549 '<@(_inputs)'
550 ]
551 },
552 {
553 'action_name': 'node_dtrace_ustack',
554 'inputs': [
555 'src/v8ustack.d',
556 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
557 ],
558 'outputs': [
Fedor Indutny61c0d572014-01-16 16:39:12559 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
Dave Pachecocc152992012-03-28 17:26:10560 ],
Fedor Indutny3d913fe2013-02-26 07:57:12561 'conditions': [
562 [ 'target_arch=="ia32"', {
563 'action': [
564 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
565 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
566 ]
567 } ],
568 [ 'target_arch=="x64"', {
569 'action': [
570 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
571 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
572 ]
573 } ],
Dave Pachecocc152992012-03-28 17:26:10574 ]
Fedor Indutnyb940e0f2014-02-20 16:52:26575 },
Dave Pachecocc152992012-03-28 17:26:10576 ]
577 } ],
578 ]
Fedor Indutnyb940e0f2014-02-20 16:52:26579 },
580 {
581 'target_name': 'specialize_node_d',
582 'type': 'none',
583 'conditions': [
584 [ 'node_use_dtrace=="true"', {
585 'actions': [
586 {
587 'action_name': 'specialize_node_d',
588 'inputs': [
589 'src/node.d'
590 ],
591 'outputs': [
592 '<(PRODUCT_DIR)/node.d',
593 ],
594 'action': [
595 'tools/specialize_node_d.py',
596 '<@(_outputs)',
597 '<@(_inputs)',
598 '<@(OS)',
599 '<@(target_arch)',
600 ],
601 },
602 ],
603 } ],
604 ]
Dave Pachecocc152992012-03-28 17:26:10605 }
Ryan Dahl4f3c8b32011-08-04 00:01:30606 ] # end targets
607}