2011-08-04 02:01:30 +02:00
|
|
|
{
|
2011-08-04 08:36:27 +02:00
|
|
|
'variables': {
|
|
|
|
'v8_use_snapshot': 'true',
|
2011-08-06 21:20:15 +02:00
|
|
|
'target_arch': 'ia32',
|
2011-08-05 01:40:07 +02:00
|
|
|
'node_use_dtrace': 'false',
|
2011-09-05 01:01:53 +02:00
|
|
|
'node_use_openssl%': 'true',
|
2011-09-13 04:42:12 +02:00
|
|
|
'node_use_system_openssl%': 'false',
|
2011-09-05 01:01:53 +02:00
|
|
|
'library_files': [
|
|
|
|
'src/node.js',
|
|
|
|
'lib/_debugger.js',
|
|
|
|
'lib/_linklist.js',
|
|
|
|
'lib/assert.js',
|
|
|
|
'lib/buffer.js',
|
|
|
|
'lib/buffer_ieee754.js',
|
|
|
|
'lib/child_process_legacy.js',
|
|
|
|
'lib/child_process_uv.js',
|
|
|
|
'lib/console.js',
|
|
|
|
'lib/constants.js',
|
|
|
|
'lib/crypto.js',
|
|
|
|
'lib/dgram_legacy.js',
|
|
|
|
'lib/dgram_uv.js',
|
|
|
|
'lib/dns_legacy.js',
|
|
|
|
'lib/dns_uv.js',
|
|
|
|
'lib/events.js',
|
|
|
|
'lib/freelist.js',
|
|
|
|
'lib/fs.js',
|
|
|
|
'lib/http.js',
|
|
|
|
'lib/http2.js',
|
|
|
|
'lib/https.js',
|
|
|
|
'lib/https2.js',
|
|
|
|
'lib/module.js',
|
|
|
|
'lib/net_legacy.js',
|
|
|
|
'lib/net_uv.js',
|
|
|
|
'lib/os.js',
|
|
|
|
'lib/path.js',
|
|
|
|
'lib/punycode.js',
|
|
|
|
'lib/querystring.js',
|
|
|
|
'lib/readline.js',
|
|
|
|
'lib/repl.js',
|
|
|
|
'lib/stream.js',
|
|
|
|
'lib/string_decoder.js',
|
|
|
|
'lib/sys.js',
|
|
|
|
'lib/timers_legacy.js',
|
|
|
|
'lib/timers_uv.js',
|
|
|
|
'lib/tls.js',
|
|
|
|
'lib/tty.js',
|
|
|
|
'lib/tty_posix.js',
|
|
|
|
'lib/tty_win32.js',
|
|
|
|
'lib/url.js',
|
|
|
|
'lib/util.js',
|
|
|
|
'lib/vm.js',
|
2011-09-07 01:13:05 +02:00
|
|
|
'lib/zlib.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
],
|
2011-08-04 08:36:27 +02:00
|
|
|
},
|
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'node',
|
|
|
|
'type': 'executable',
|
2011-08-04 08:36:27 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'dependencies': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'deps/http_parser/http_parser.gyp:http_parser',
|
2011-08-13 20:17:47 +02:00
|
|
|
'deps/v8/tools/gyp/v8-node.gyp:v8',
|
|
|
|
'deps/uv/uv.gyp:uv',
|
2011-09-07 01:13:05 +02:00
|
|
|
'deps/zlib/zlib.gyp:zlib',
|
2011-08-05 01:40:07 +02:00
|
|
|
'node_js2c#host',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
2011-08-05 01:40:07 +02:00
|
|
|
|
|
|
|
'include_dirs': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'src',
|
|
|
|
'deps/uv/src/ares',
|
2011-08-05 01:40:07 +02:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
|
|
|
|
],
|
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'sources': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/cares_wrap.cc',
|
|
|
|
'src/handle_wrap.cc',
|
|
|
|
'src/node.cc',
|
|
|
|
'src/node_buffer.cc',
|
|
|
|
'src/node_constants.cc',
|
|
|
|
'src/node_dtrace.cc',
|
|
|
|
'src/node_extensions.cc',
|
|
|
|
'src/node_file.cc',
|
|
|
|
'src/node_http_parser.cc',
|
|
|
|
'src/node_javascript.cc',
|
|
|
|
'src/node_main.cc',
|
|
|
|
'src/node_os.cc',
|
|
|
|
'src/node_script.cc',
|
|
|
|
'src/node_string.cc',
|
2011-09-07 01:13:05 +02:00
|
|
|
'src/node_zlib.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/pipe_wrap.cc',
|
|
|
|
'src/stdio_wrap.cc',
|
|
|
|
'src/stream_wrap.cc',
|
|
|
|
'src/tcp_wrap.cc',
|
|
|
|
'src/timer_wrap.cc',
|
2011-09-20 22:38:07 +02:00
|
|
|
'src/tty_wrap.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/process_wrap.cc',
|
2011-08-12 18:57:04 +02:00
|
|
|
'src/v8_typed_array.cc',
|
2011-08-25 01:20:08 +02:00
|
|
|
'src/udp_wrap.cc',
|
2011-08-15 18:35:48 +02:00
|
|
|
# headers to make for a more pleasant IDE experience
|
|
|
|
'src/handle_wrap.h',
|
|
|
|
'src/node.h',
|
|
|
|
'src/node_buffer.h',
|
|
|
|
'src/node_cares.h',
|
|
|
|
'src/node_child_process.h',
|
|
|
|
'src/node_constants.h',
|
|
|
|
'src/node_crypto.h',
|
|
|
|
'src/node_dtrace.h',
|
|
|
|
'src/node_extensions.h',
|
|
|
|
'src/node_file.h',
|
|
|
|
'src/node_http_parser.h',
|
|
|
|
'src/node_javascript.h',
|
|
|
|
'src/node_net.h',
|
|
|
|
'src/node_os.h',
|
|
|
|
'src/node_root_certs.h',
|
|
|
|
'src/node_script.h',
|
|
|
|
'src/node_stdio.h',
|
|
|
|
'src/node_string.h',
|
|
|
|
'src/node_version.h',
|
|
|
|
'src/pipe_wrap.h',
|
|
|
|
'src/platform.h',
|
|
|
|
'src/req_wrap.h',
|
|
|
|
'src/stream_wrap.h',
|
|
|
|
'src/v8_typed_array.h',
|
|
|
|
'deps/http_parser/http_parser.h',
|
|
|
|
'deps/v8/include/v8.h',
|
|
|
|
'deps/v8/include/v8-debug.h',
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
|
2011-09-05 01:01:53 +02:00
|
|
|
# javascript files to make for an even more pleasant IDE experience
|
|
|
|
'<@(library_files)',
|
2011-08-05 01:40:07 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'defines': [
|
|
|
|
'ARCH="<(target_arch)"',
|
|
|
|
'PLATFORM="<(OS)"',
|
|
|
|
'_LARGEFILE_SOURCE',
|
|
|
|
'_FILE_OFFSET_BITS=64',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'conditions': [
|
2011-08-05 01:40:07 +02:00
|
|
|
[ 'node_use_openssl=="true"', {
|
2011-08-06 21:20:15 +02:00
|
|
|
'defines': [ 'HAVE_OPENSSL=1' ],
|
2011-08-08 21:11:48 +02:00
|
|
|
'sources': [ 'src/node_crypto.cc' ],
|
2011-08-30 00:01:43 +02:00
|
|
|
'conditions': [
|
|
|
|
[ 'node_use_system_openssl=="false"', {
|
|
|
|
'dependencies': [ './deps/openssl/openssl.gyp:openssl' ],
|
|
|
|
}]]
|
2011-08-05 01:40:07 +02:00
|
|
|
}, {
|
|
|
|
'defines': [ 'HAVE_OPENSSL=0' ]
|
|
|
|
}],
|
|
|
|
|
2011-08-15 18:35:48 +02:00
|
|
|
[ 'node_use_dtrace=="true"', {
|
|
|
|
'sources': [
|
|
|
|
'src/node_provider.h', # why does this get generated into src and not SHARED_INTERMEDIATE_DIR?
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
[ 'OS=="win"', {
|
2011-08-07 07:11:21 +02:00
|
|
|
'sources': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/platform_win32.cc',
|
|
|
|
'src/node_stdio_win32.cc',
|
2011-08-15 18:35:48 +02:00
|
|
|
# headers to make for a more pleasant IDE experience
|
|
|
|
'src/platform_win32.h',
|
2011-08-07 07:11:21 +02:00
|
|
|
],
|
2011-08-04 02:01:30 +02:00
|
|
|
'defines': [
|
2011-08-07 07:11:21 +02:00
|
|
|
'FD_SETSIZE=1024',
|
2011-08-07 19:43:24 +02:00
|
|
|
# we need to use node's preferred "win32" rather than gyp's preferred "win"
|
|
|
|
'PLATFORM="win32"',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
2011-09-02 21:53:16 +02:00
|
|
|
'libraries': [ '-lpsapi.lib' ]
|
2011-08-04 02:01:30 +02:00
|
|
|
},{ # POSIX
|
2011-08-05 01:40:07 +02:00
|
|
|
'defines': [ '__POSIX__' ],
|
2011-08-04 02:01:30 +02:00
|
|
|
'sources': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/node_cares.cc',
|
|
|
|
'src/node_net.cc',
|
|
|
|
'src/node_signal_watcher.cc',
|
|
|
|
'src/node_stat_watcher.cc',
|
|
|
|
'src/node_io_watcher.cc',
|
|
|
|
'src/node_stdio.cc',
|
|
|
|
'src/node_child_process.cc',
|
|
|
|
'src/node_timer.cc'
|
2011-08-04 02:01:30 +02:00
|
|
|
]
|
|
|
|
}],
|
|
|
|
[ 'OS=="mac"', {
|
2011-08-08 21:11:48 +02:00
|
|
|
'sources': [ 'src/platform_darwin.cc' ],
|
2011-08-05 01:40:07 +02:00
|
|
|
'libraries': [ '-framework Carbon' ],
|
2011-08-16 02:54:47 +02:00
|
|
|
}],
|
|
|
|
[ 'OS=="linux"', {
|
|
|
|
'sources': [ 'src/platform_linux.cc' ],
|
|
|
|
'libraries': [
|
2011-08-23 02:07:07 +02:00
|
|
|
'-ldl',
|
2011-08-16 02:54:47 +02:00
|
|
|
'-lutil' # needed for openpty
|
|
|
|
],
|
2011-08-17 07:44:53 +02:00
|
|
|
}],
|
|
|
|
[ 'OS=="freebsd"', {
|
|
|
|
'sources': [ 'src/platform_freebsd.cc' ],
|
|
|
|
'libraries': [
|
|
|
|
'-lutil',
|
|
|
|
'-lkvm',
|
|
|
|
],
|
|
|
|
}],
|
2011-08-13 20:17:47 +02:00
|
|
|
],
|
|
|
|
'msvs-settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'SubSystem': 1, # /subsystem:console
|
|
|
|
},
|
|
|
|
},
|
2011-08-04 02:01:30 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
'target_name': 'node_js2c',
|
|
|
|
'type': 'none',
|
|
|
|
'toolsets': ['host'],
|
|
|
|
'variables': {
|
|
|
|
},
|
2011-08-05 01:40:07 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_js2c',
|
2011-08-05 01:40:07 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'inputs': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'./tools/js2c.py',
|
2011-08-04 02:01:30 +02:00
|
|
|
'<@(library_files)',
|
|
|
|
],
|
2011-08-05 01:40:07 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'outputs': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
|
|
|
|
],
|
2011-08-05 01:40:07 +02:00
|
|
|
|
|
|
|
# FIXME can the following conditions be shorted by just setting
|
|
|
|
# macros.py into some variable which then gets included in the
|
|
|
|
# action?
|
|
|
|
|
|
|
|
'conditions': [
|
|
|
|
[ 'node_use_dtrace=="true"', {
|
|
|
|
'action': [
|
|
|
|
'python',
|
2011-08-08 21:11:48 +02:00
|
|
|
'tools/js2c.py',
|
2011-08-05 01:40:07 +02:00
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(library_files)'
|
|
|
|
],
|
|
|
|
}, { # No Dtrace
|
|
|
|
'action': [
|
|
|
|
'python',
|
2011-08-08 21:11:48 +02:00
|
|
|
'tools/js2c.py',
|
2011-08-05 01:40:07 +02:00
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(library_files)',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/macros.py'
|
2011-08-05 01:40:07 +02:00
|
|
|
],
|
|
|
|
}]
|
2011-08-06 21:20:15 +02:00
|
|
|
],
|
2011-08-04 02:01:30 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}, # end node_js2c
|
|
|
|
] # end targets
|
|
|
|
}
|
|
|
|
|