blob: f6894d2a5890e5a93e6eb804e0b9aff701fe333d [file] [log] [blame]
Ryan Dahl4f3c8b32011-08-04 00:01:301{
Ryan Dahlbea48272011-08-04 06:36:272 'variables': {
3 'v8_use_snapshot': 'true',
Peter Bright71333b32011-08-06 19:20:154 'target_arch': 'ia32',
Ryan Dahla979ab92011-08-04 23:40:075 'node_use_dtrace': 'false',
6 'node_use_openssl': 'true'
Ryan Dahlbea48272011-08-04 06:36:277 },
8
Ryan Dahl4f3c8b32011-08-04 00:01:309 'targets': [
10 {
11 'target_name': 'node',
12 'type': 'executable',
Ryan Dahlbea48272011-08-04 06:36:2713
Ryan Dahl4f3c8b32011-08-04 00:01:3014 'dependencies': [
Ryan Dahldb1bf672011-08-08 19:11:4815 'deps/http_parser/http_parser.gyp:http_parser',
Peter Bright16788f42011-08-13 18:17:4716 'deps/v8/tools/gyp/v8-node.gyp:v8',
17 'deps/uv/uv.gyp:uv',
Ryan Dahla979ab92011-08-04 23:40:0718 'node_js2c#host',
Ryan Dahl4f3c8b32011-08-04 00:01:3019 ],
Ryan Dahla979ab92011-08-04 23:40:0720
21 'include_dirs': [
Ryan Dahldb1bf672011-08-08 19:11:4822 'src',
23 'deps/uv/src/ares',
Ryan Dahla979ab92011-08-04 23:40:0724 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
25 ],
26
Ryan Dahl4f3c8b32011-08-04 00:01:3027 'sources': [
Ryan Dahldb1bf672011-08-08 19:11:4828 'src/cares_wrap.cc',
29 'src/handle_wrap.cc',
30 'src/node.cc',
31 'src/node_buffer.cc',
32 'src/node_constants.cc',
33 'src/node_dtrace.cc',
34 'src/node_extensions.cc',
35 'src/node_file.cc',
36 'src/node_http_parser.cc',
37 'src/node_javascript.cc',
38 'src/node_main.cc',
39 'src/node_os.cc',
40 'src/node_script.cc',
41 'src/node_string.cc',
42 'src/pipe_wrap.cc',
43 'src/stdio_wrap.cc',
44 'src/stream_wrap.cc',
45 'src/tcp_wrap.cc',
46 'src/timer_wrap.cc',
47 'src/process_wrap.cc',
Ben Noordhuis97b00002011-08-12 16:57:0448 'src/v8_typed_array.cc',
Ryan Dahla979ab92011-08-04 23:40:0749 ],
50
51 'defines': [
52 'ARCH="<(target_arch)"',
53 'PLATFORM="<(OS)"',
54 '_LARGEFILE_SOURCE',
55 '_FILE_OFFSET_BITS=64',
Ryan Dahl4f3c8b32011-08-04 00:01:3056 ],
57
58 'conditions': [
Ryan Dahla979ab92011-08-04 23:40:0759 [ 'node_use_openssl=="true"', {
60 'libraries': [ '-lssl', '-lcrypto' ],
Peter Bright71333b32011-08-06 19:20:1561 'defines': [ 'HAVE_OPENSSL=1' ],
Ryan Dahldb1bf672011-08-08 19:11:4862 'sources': [ 'src/node_crypto.cc' ],
Ryan Dahla979ab92011-08-04 23:40:0763 }, {
64 'defines': [ 'HAVE_OPENSSL=0' ]
65 }],
66
Ryan Dahl4f3c8b32011-08-04 00:01:3067 [ 'OS=="win"', {
Peter Bright6ac8c552011-08-07 05:11:2168 'dependencies': [
Peter Bright16788f42011-08-13 18:17:4769 'deps/uv/deps/pthread-win32/pthread-win32.gyp:pthread-win32',
Peter Bright6ac8c552011-08-07 05:11:2170 ],
71 # openssl is not built using gyp, and needs to be
72 # built separately and placed outside the hierarchy.
73 # the dependencies aren't set up yet to put it in
74 # place, so I'm going to force it off indiscrimately
75 # for the time being. Because the above condition has
76 # already kicked in, it's not enough simply to turn
77 # 'node_use_openssl' off; I need to undo its effects
Peter Bright71333b32011-08-06 19:20:1578 'node_use_openssl': 'false',
Peter Bright6ac8c552011-08-07 05:11:2179 'defines!': [ 'HAVE_OPENSSL=1' ],
80 'defines': [ 'HAVE_OPENSSL=0' ],
81 'libraries!': [ '-lssl', '-lcrypto' ],
Ryan Dahldb1bf672011-08-08 19:11:4882 'sources!': [ 'src/node_crypto.cc' ],
Ryan Dahl4f3c8b32011-08-04 00:01:3083 'sources': [
Ryan Dahldb1bf672011-08-08 19:11:4884 'src/platform_win32.cc',
85 'src/node_stdio_win32.cc',
Peter Bright79d9f622011-08-07 17:43:2486 # file operations depend on eio to link. uv contains eio in unix builds, but not win32. So we need to compile it here instead.
Ryan Dahldb1bf672011-08-08 19:11:4887 'deps/uv/src/eio/eio.c',
Peter Bright71333b32011-08-06 19:20:1588 ],
Peter Bright6ac8c552011-08-07 05:11:2189 'defines': [
Peter Bright79d9f622011-08-07 17:43:2490 'PTW32_STATIC_LIB',
Peter Bright6ac8c552011-08-07 05:11:2191 'FD_SETSIZE=1024',
Peter Bright79d9f622011-08-07 17:43:2492 # we need to use node's preferred "win32" rather than gyp's preferred "win"
93 'PLATFORM="win32"',
Peter Bright6ac8c552011-08-07 05:11:2194 ],
Ryan Dahl4f3c8b32011-08-04 00:01:3095 },{ # POSIX
Ryan Dahla979ab92011-08-04 23:40:0796 'defines': [ '__POSIX__' ],
Ryan Dahl4f3c8b32011-08-04 00:01:3097 'sources': [
Ryan Dahldb1bf672011-08-08 19:11:4898 'src/node_cares.cc',
99 'src/node_net.cc',
100 'src/node_signal_watcher.cc',
101 'src/node_stat_watcher.cc',
102 'src/node_io_watcher.cc',
103 'src/node_stdio.cc',
104 'src/node_child_process.cc',
105 'src/node_timer.cc'
Ryan Dahl4f3c8b32011-08-04 00:01:30106 ]
107 }],
108 [ 'OS=="mac"', {
Ryan Dahldb1bf672011-08-08 19:11:48109 'sources': [ 'src/platform_darwin.cc' ],
Ryan Dahla979ab92011-08-04 23:40:07110 'libraries': [ '-framework Carbon' ],
Ryan Dahlb433c422011-08-16 00:54:47111 }],
112 [ 'OS=="linux"', {
113 'sources': [ 'src/platform_linux.cc' ],
114 'libraries': [
115 '-lutil' # needed for openpty
116 ],
Ryan Dahl4f3c8b32011-08-04 00:01:30117 }]
Peter Bright16788f42011-08-13 18:17:47118 ],
119 'msvs-settings': {
120 'VCLinkerTool': {
121 'SubSystem': 1, # /subsystem:console
122 },
123 },
Ryan Dahl4f3c8b32011-08-04 00:01:30124 },
125
126 {
127 'target_name': 'node_js2c',
128 'type': 'none',
129 'toolsets': ['host'],
130 'variables': {
131 'library_files': [
Ryan Dahldb1bf672011-08-08 19:11:48132 'src/node.js',
133 'lib/_debugger.js',
134 'lib/_linklist.js',
135 'lib/assert.js',
136 'lib/buffer.js',
137 'lib/buffer_ieee754.js',
138 'lib/child_process_legacy.js',
139 'lib/child_process_uv.js',
140 'lib/console.js',
141 'lib/constants.js',
142 'lib/crypto.js',
143 'lib/dgram.js',
144 'lib/dns_legacy.js',
145 'lib/dns_uv.js',
146 'lib/events.js',
147 'lib/freelist.js',
148 'lib/fs.js',
149 'lib/http.js',
150 'lib/http2.js',
151 'lib/https.js',
152 'lib/https2.js',
153 'lib/module.js',
154 'lib/net_legacy.js',
155 'lib/net_uv.js',
156 'lib/os.js',
157 'lib/path.js',
158 'lib/punycode.js',
159 'lib/querystring.js',
160 'lib/readline.js',
161 'lib/repl.js',
162 'lib/stream.js',
163 'lib/string_decoder.js',
164 'lib/sys.js',
165 'lib/timers_legacy.js',
166 'lib/timers_uv.js',
167 'lib/tls.js',
168 'lib/tty.js',
169 'lib/tty_posix.js',
170 'lib/tty_win32.js',
171 'lib/url.js',
172 'lib/util.js',
173 'lib/vm.js',
Ryan Dahl4f3c8b32011-08-04 00:01:30174 ],
175 },
Ryan Dahla979ab92011-08-04 23:40:07176
Ryan Dahl4f3c8b32011-08-04 00:01:30177 'actions': [
178 {
179 'action_name': 'node_js2c',
Ryan Dahla979ab92011-08-04 23:40:07180
Ryan Dahl4f3c8b32011-08-04 00:01:30181 'inputs': [
Ryan Dahldb1bf672011-08-08 19:11:48182 './tools/js2c.py',
Ryan Dahl4f3c8b32011-08-04 00:01:30183 '<@(library_files)',
184 ],
Ryan Dahla979ab92011-08-04 23:40:07185
Ryan Dahl4f3c8b32011-08-04 00:01:30186 'outputs': [
187 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
188 ],
Ryan Dahla979ab92011-08-04 23:40:07189
190 # FIXME can the following conditions be shorted by just setting
191 # macros.py into some variable which then gets included in the
192 # action?
193
194 'conditions': [
195 [ 'node_use_dtrace=="true"', {
196 'action': [
197 'python',
Ryan Dahldb1bf672011-08-08 19:11:48198 'tools/js2c.py',
Ryan Dahla979ab92011-08-04 23:40:07199 '<@(_outputs)',
200 '<@(library_files)'
201 ],
202 }, { # No Dtrace
203 'action': [
204 'python',
Ryan Dahldb1bf672011-08-08 19:11:48205 'tools/js2c.py',
Ryan Dahla979ab92011-08-04 23:40:07206 '<@(_outputs)',
207 '<@(library_files)',
Ryan Dahldb1bf672011-08-08 19:11:48208 'src/macros.py'
Ryan Dahla979ab92011-08-04 23:40:07209 ],
210 }]
Peter Bright71333b32011-08-06 19:20:15211 ],
Ryan Dahl4f3c8b32011-08-04 00:01:30212 },
213 ],
214 }, # end node_js2c
215 ] # end targets
216}
217