0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/node.gyp

277 lines
7.8 KiB
Plaintext
Raw Normal View History

2011-08-04 02:01:30 +02:00
{
2011-08-04 08:36:27 +02:00
'target_defaults': {
2011-08-06 21:20:15 +02:00
'default_configuration': 'Debug',
2011-08-04 08:36:27 +02:00
'configurations': {
2011-08-06 21:20:15 +02:00
# TODO: hoist these out and put them somewhere common, because
# RuntimeLibrary MUST MATCH across the entire project
2011-08-04 08:36:27 +02:00
'Debug': {
2011-08-06 21:20:15 +02:00
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
'Optimization': 0, # /Od, no optimization
},
},
2011-08-04 08:36:27 +02:00
},
'Release': {
2011-08-06 21:20:15 +02:00
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
'Optimization': 3, # /Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
},
'VCLinkerTool': {
'LinkTimeCodeGeneration': 1, # link-time code generation
},
},
2011-08-04 08:36:27 +02:00
}
2011-08-06 21:20:15 +02:00
},
'msvs_settings': {
'VCCLCompilerTool': {
'StringPooling': 'true', # pool string literals
'DebugInformationFormat': 3, # Generate a PDB
'AdditionalOptions': [
'/MP', # compile across multiple CPUs, VC2008 setting
],
'MultiProcessorCompilation': 'true', # compile across multiple CPUs, VC2010 setting
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32',
# we don't really want VC++ warning us about
# how dangerous C functions are...
'_CRT_SECURE_NO_DEPRECATE',
# ... or that C implementations shouldn't use
# POSIX names
'_CRT_NONSTDC_NO_DEPRECATE',
],
}]
],
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',
'node_use_openssl': 'true'
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',
'deps/v8/tools/gyp/v8.gyp:v8',
2011-08-11 03:45:56 +02:00
'deps/uv/all.gyp:uv',
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',
'src/pipe_wrap.cc',
'src/stdio_wrap.cc',
'src/stream_wrap.cc',
'src/tcp_wrap.cc',
'src/timer_wrap.cc',
'src/process_wrap.cc',
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"', {
'libraries': [ '-lssl', '-lcrypto' ],
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-05 01:40:07 +02:00
}, {
'defines': [ 'HAVE_OPENSSL=0' ]
}],
2011-08-04 02:01:30 +02:00
[ 'OS=="win"', {
'dependencies': [
2011-08-08 21:11:48 +02:00
'deps/uv/deps/pthread-win32/build/all.gyp:pthread-win32',
],
# openssl is not built using gyp, and needs to be
# built separately and placed outside the hierarchy.
# the dependencies aren't set up yet to put it in
# place, so I'm going to force it off indiscrimately
# for the time being. Because the above condition has
# already kicked in, it's not enough simply to turn
# 'node_use_openssl' off; I need to undo its effects
2011-08-06 21:20:15 +02:00
'node_use_openssl': 'false',
'defines!': [ 'HAVE_OPENSSL=1' ],
'defines': [ 'HAVE_OPENSSL=0' ],
'libraries!': [ '-lssl', '-lcrypto' ],
2011-08-08 21:11:48 +02:00
'sources!': [ 'src/node_crypto.cc' ],
'sources': [
2011-08-08 21:11:48 +02:00
'src/platform_win32.cc',
'src/node_stdio_win32.cc',
2011-08-07 19:43:24 +02:00
# file operations depend on eio to link. uv contains eio in unix builds, but not win32. So we need to compile it here instead.
2011-08-08 21:11:48 +02:00
'deps/uv/src/eio/eio.c',
],
2011-08-04 02:01:30 +02:00
'defines': [
2011-08-07 19:43:24 +02:00
'PTW32_STATIC_LIB',
'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
],
'libraries': [
2011-08-06 21:20:15 +02:00
'-lws2_32.lib',
'-lwinmm.lib',
2011-08-04 02:01:30 +02:00
],
2011-08-06 21:20:15 +02:00
'msvs_settings': {
'VCCLCompilerTool': {
'WarningLevel': '3',
},
},
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-04 02:01:30 +02:00
}]
]
},
{
'target_name': 'node_js2c',
'type': 'none',
'toolsets': ['host'],
'variables': {
'library_files': [
2011-08-08 21:11:48 +02:00
'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.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-08-04 02:01:30 +02:00
],
},
2011-08-05 01:40:07 +02:00
2011-08-04 02:01:30 +02:00
'actions': [
2011-08-05 02:13:37 +02:00
2011-08-04 02:01:30 +02:00
{
'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
],
'msvs_cygwin_shell': 0,
2011-08-04 02:01:30 +02:00
},
],
}, # end node_js2c
] # end targets
}