3 'v8_use_snapshot%': 'false',
4 'node_use_dtrace%': 'false',
5 'node_use_lttng%': 'false',
6 'node_use_etw%': 'false',
7 'node_use_perfctr%': 'false',
8 'node_has_winsdk%': 'false',
9 'node_shared_v8%': 'false',
10 'node_shared_zlib%': 'false',
11 'node_shared_http_parser%': 'false',
12 'node_shared_libuv%': 'false',
13 'node_use_openssl%': 'true',
14 'node_shared_openssl%': 'false',
15 'node_use_mdb%': 'false',
16 'node_v8_options%': '',
19 'lib/_debug_agent.js',
24 'lib/child_process.js',
37 'lib/_http_client.js',
38 'lib/_http_common.js',
39 'lib/_http_incoming.js',
40 'lib/_http_outgoing.js',
41 'lib/_http_server.js',
54 'lib/_stream_readable.js',
55 'lib/_stream_writable.js',
56 'lib/_stream_duplex.js',
57 'lib/_stream_transform.js',
58 'lib/_stream_passthrough.js',
59 'lib/string_decoder.js',
77 'target_name': 'iojs',
82 'deps/cares/cares.gyp:cares'
87 'tools/msvs/genfiles',
89 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
95 'src/fs_event_wrap.cc',
100 'src/node_constants.cc',
101 'src/node_contextify.cc',
103 'src/node_http_parser.cc',
104 'src/node_javascript.cc',
108 'src/node_v8_platform.cc',
109 'src/node_stat_watcher.cc',
110 'src/node_watchdog.cc',
114 'src/signal_wrap.cc',
117 'src/string_bytes.cc',
118 'src/stream_base.cc',
119 'src/stream_wrap.cc',
123 'src/process_wrap.cc',
126 # headers to make for a more pleasant IDE experience
128 'src/async-wrap-inl.h',
130 'src/base-object-inl.h',
137 'src/node_constants.h',
139 'src/node_http_parser.h',
140 'src/node_internals.h',
141 'src/node_javascript.h',
142 'src/node_root_certs.h',
143 'src/node_version.h',
144 'src/node_watchdog.h',
153 'src/req-wrap-inl.h',
154 'src/string_bytes.h',
161 'deps/http_parser/http_parser.h',
162 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
163 # javascript files to make for an even more pleasant IDE experience
165 # node.gyp is added to the project by default.
170 'NODE_ARCH="<(target_arch)"',
171 'NODE_PLATFORM="<(OS)"',
172 'NODE_TAG="<(node_tag)"',
173 'NODE_V8_OPTIONS="<(node_v8_options)"',
174 'NODE_WANT_INTERNALS=1',
178 [ 'v8_enable_i18n_support==1', {
179 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
181 '<(icu_gyp_path):icui18n',
182 '<(icu_gyp_path):icuuc',
185 [ 'icu_small=="true"', {
186 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
189 [ 'node_use_openssl=="true"', {
190 'defines': [ 'HAVE_OPENSSL=1' ],
192 'src/node_crypto.cc',
193 'src/node_crypto_bio.cc',
194 'src/node_crypto_clienthello.cc',
196 'src/node_crypto_bio.h',
197 'src/node_crypto_clienthello.h',
202 [ 'node_shared_openssl=="false"', {
204 './deps/openssl/openssl.gyp:openssl',
207 './deps/openssl/openssl.gyp:openssl-cli',
209 # Do not let unused OpenSSL symbols to slip away
212 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
216 ['OS in "linux freebsd"', {
218 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
224 'defines': [ 'HAVE_OPENSSL=0' ]
226 [ 'node_use_dtrace=="true"', {
227 'defines': [ 'HAVE_DTRACE=1' ],
229 'node_dtrace_header',
232 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
235 # DTrace is supported on linux, solaris, mac, and bsd. There are
236 # three object files associated with DTrace support, but they're
237 # not all used all the time:
239 # node_dtrace.o all configurations
240 # node_dtrace_ustack.o not supported on mac and linux
241 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
244 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
245 # actually exist. They're listed here to trick GYP into linking the
246 # corresponding object files into the final "node" executable. These
247 # object files are generated by "dtrace -G" using custom actions
248 # below, and the GYP-generated Makefiles will properly build them when
251 'sources': [ 'src/node_dtrace.cc' ],
255 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
258 [ 'OS!="mac" and OS!="linux"', {
260 'src/node_dtrace_ustack.cc',
261 'src/node_dtrace_provider.cc',
266 [ 'node_use_lttng=="true"', {
267 'defines': [ 'HAVE_LTTNG=1' ],
268 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
269 'libraries': [ '-llttng-ust' ],
274 [ 'node_use_mdb=="true"', {
275 'dependencies': [ 'node_mdb' ],
276 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
281 [ 'node_use_etw=="true"', {
282 'defines': [ 'HAVE_ETW=1' ],
283 'dependencies': [ 'node_etw' ],
285 'src/node_win32_etw_provider.h',
286 'src/node_win32_etw_provider-inl.h',
287 'src/node_win32_etw_provider.cc',
288 'src/node_dtrace.cc',
289 'tools/msvs/genfiles/node_etw_provider.h',
290 'tools/msvs/genfiles/node_etw_provider.rc',
293 [ 'node_use_perfctr=="true"', {
294 'defines': [ 'HAVE_PERFCTR=1' ],
295 'dependencies': [ 'node_perfctr' ],
297 'src/node_win32_perfctr_provider.h',
298 'src/node_win32_perfctr_provider.cc',
299 'src/node_counters.cc',
300 'src/node_counters.h',
301 'tools/msvs/genfiles/node_perfctr_provider.rc',
304 [ 'v8_postmortem_support=="true"', {
305 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
308 '-Wl,-force_load,<(V8_BASE)',
312 [ 'node_shared_v8=="false"', {
314 'deps/v8/include/v8.h',
315 'deps/v8/include/v8-debug.h',
317 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
320 [ 'node_shared_zlib=="false"', {
321 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
324 [ 'node_shared_http_parser=="false"', {
325 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
328 [ 'node_shared_libuv=="false"', {
329 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
337 'NODE_PLATFORM="win"',
341 # we need to use node's preferred "win32" rather than gyp's preferred "win"
342 'NODE_PLATFORM="win32"',
345 'libraries': [ '-lpsapi.lib' ]
347 'defines': [ '__POSIX__' ],
350 # linking Corefoundation is needed since certain OSX debugging tools
351 # like Instruments require it for some features
352 'libraries': [ '-framework CoreFoundation' ],
354 'NODE_PLATFORM="mac"',
357 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
358 'NODE_PLATFORM="darwin"',
373 'NODE_PLATFORM="solaris"',
376 # we need to use node's preferred "sunos"
377 # rather than gyp's preferred "solaris"
378 'NODE_PLATFORM="sunos"',
381 [ 'OS=="freebsd" or OS=="linux"', {
382 'ldflags': [ '-Wl,-z,noexecstack' ],
385 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
388 'OS in "linux freebsd" and node_shared_v8=="false"', {
390 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
396 'EmbedManifest': 'true',
397 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
401 # generate ETW header and resource files
403 'target_name': 'node_etw',
406 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
409 'action_name': 'node_etw',
410 'inputs': [ 'src/res/node_etw_provider.man' ],
412 'tools/msvs/genfiles/node_etw_provider.rc',
413 'tools/msvs/genfiles/node_etw_provider.h',
414 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
416 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
422 # generate perf counter header and resource files
424 'target_name': 'node_perfctr',
427 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
430 'action_name': 'node_perfctr_man',
431 'inputs': [ 'src/res/node_perfctr_provider.man' ],
433 'tools/msvs/genfiles/node_perfctr_provider.h',
434 'tools/msvs/genfiles/node_perfctr_provider.rc',
435 'tools/msvs/genfiles/MSG00001.BIN',
437 'action': [ 'ctrpp <@(_inputs) '
438 '-o tools/msvs/genfiles/node_perfctr_provider.h '
439 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
447 'target_name': 'node_js2c',
449 'toolsets': ['host'],
452 'action_name': 'node_js2c',
458 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
461 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
462 'inputs': [ 'src/notrace_macros.py' ]
464 ['node_use_lttng=="false"', {
465 'inputs': [ 'src/nolttng_macros.py' ]
467 [ 'node_use_perfctr=="false"', {
468 'inputs': [ 'src/perfctr_macros.py' ]
481 'target_name': 'node_dtrace_header',
484 [ 'node_use_dtrace=="true" and OS!="linux"', {
487 'action_name': 'node_dtrace_header',
488 'inputs': [ 'src/node_provider.d' ],
489 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
490 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
491 '-o', '<@(_outputs)' ]
495 [ 'node_use_dtrace=="true" and OS=="linux"', {
498 'action_name': 'node_dtrace_header',
499 'inputs': [ 'src/node_provider.d' ],
500 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
501 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
502 '-o', '<@(_outputs)' ]
509 'target_name': 'node_mdb',
512 [ 'node_use_mdb=="true"',
514 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
517 'action_name': 'node_mdb',
518 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
519 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
521 [ 'target_arch=="ia32"', {
522 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
524 [ 'target_arch=="x64"', {
525 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
535 'target_name': 'node_dtrace_provider',
538 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
541 'action_name': 'node_dtrace_provider_o',
543 '<(OBJ_DIR)/iojs/src/node_dtrace.o',
546 '<(OBJ_DIR)/iojs/src/node_dtrace_provider.o'
548 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
549 '<@(_inputs)', '-o', '<@(_outputs)' ]
553 [ 'node_use_dtrace=="true" and OS=="linux"', {
556 'action_name': 'node_dtrace_provider_o',
557 'inputs': [ 'src/node_provider.d' ],
559 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
562 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
570 'target_name': 'node_dtrace_ustack',
573 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
576 'action_name': 'node_dtrace_ustack_constants',
581 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
584 'tools/genv8constants.py',
590 'action_name': 'node_dtrace_ustack',
593 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
596 '<(OBJ_DIR)/iojs/src/node_dtrace_ustack.o'
599 [ 'target_arch=="ia32"', {
601 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
602 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
605 [ 'target_arch=="x64"', {
607 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
608 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
618 'target_name': 'specialize_node_d',
621 [ 'node_use_dtrace=="true"', {
624 'action_name': 'specialize_node_d',
629 '<(PRODUCT_DIR)/node.d',
632 'tools/specialize_node_d.py',