The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / node.gyp @ 38809e39
History | View | Annotate | Download (12.2 KB)
1 |
{ |
---|---|
2 |
'variables': { |
3 |
'v8_use_snapshot%': 'true', |
4 |
# Turn off -Werror in V8 |
5 |
# See http://codereview.chromium.org/8159015 |
6 |
'werror': '', |
7 |
'node_use_dtrace%': 'false', |
8 |
'node_use_etw%': 'false', |
9 |
'node_shared_v8%': 'false', |
10 |
'node_shared_zlib%': 'false', |
11 |
'node_shared_http_parser%': 'false', |
12 |
'node_shared_cares%': 'false', |
13 |
'node_shared_libuv%': 'false', |
14 |
'node_use_openssl%': 'true', |
15 |
'node_use_systemtap%': 'false', |
16 |
'node_shared_openssl%': 'false', |
17 |
'library_files': [ |
18 |
'src/node.js', |
19 |
'lib/_debugger.js', |
20 |
'lib/_linklist.js', |
21 |
'lib/assert.js', |
22 |
'lib/buffer.js', |
23 |
'lib/buffer_ieee754.js', |
24 |
'lib/child_process.js', |
25 |
'lib/console.js', |
26 |
'lib/constants.js', |
27 |
'lib/crypto.js', |
28 |
'lib/cluster.js', |
29 |
'lib/dgram.js', |
30 |
'lib/dns.js', |
31 |
'lib/domain.js', |
32 |
'lib/events.js', |
33 |
'lib/freelist.js', |
34 |
'lib/fs.js', |
35 |
'lib/http.js', |
36 |
'lib/https.js', |
37 |
'lib/module.js', |
38 |
'lib/net.js', |
39 |
'lib/os.js', |
40 |
'lib/path.js', |
41 |
'lib/punycode.js', |
42 |
'lib/querystring.js', |
43 |
'lib/readline.js', |
44 |
'lib/repl.js', |
45 |
'lib/stream.js', |
46 |
'lib/string_decoder.js', |
47 |
'lib/sys.js', |
48 |
'lib/timers.js', |
49 |
'lib/tls.js', |
50 |
'lib/tty.js', |
51 |
'lib/url.js', |
52 |
'lib/util.js', |
53 |
'lib/vm.js', |
54 |
'lib/zlib.js', |
55 |
], |
56 |
}, |
57 |
|
58 |
'targets': [ |
59 |
{ |
60 |
'target_name': 'node', |
61 |
'type': 'executable', |
62 |
|
63 |
'dependencies': [ |
64 |
'node_js2c#host', |
65 |
], |
66 |
|
67 |
'include_dirs': [ |
68 |
'src', |
69 |
'deps/uv/src/ares', |
70 |
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h |
71 |
], |
72 |
|
73 |
'sources': [ |
74 |
'src/fs_event_wrap.cc', |
75 |
'src/cares_wrap.cc', |
76 |
'src/handle_wrap.cc', |
77 |
'src/node.cc', |
78 |
'src/node_buffer.cc', |
79 |
'src/node_constants.cc', |
80 |
'src/node_extensions.cc', |
81 |
'src/node_file.cc', |
82 |
'src/node_http_parser.cc', |
83 |
'src/node_javascript.cc', |
84 |
'src/node_main.cc', |
85 |
'src/node_os.cc', |
86 |
'src/node_script.cc', |
87 |
'src/node_stat_watcher.cc', |
88 |
'src/node_string.cc', |
89 |
'src/node_zlib.cc', |
90 |
'src/pipe_wrap.cc', |
91 |
'src/signal_wrap.cc', |
92 |
'src/stream_wrap.cc', |
93 |
'src/slab_allocator.cc', |
94 |
'src/tcp_wrap.cc', |
95 |
'src/timer_wrap.cc', |
96 |
'src/tty_wrap.cc', |
97 |
'src/process_wrap.cc', |
98 |
'src/v8_typed_array.cc', |
99 |
'src/udp_wrap.cc', |
100 |
# headers to make for a more pleasant IDE experience |
101 |
'src/handle_wrap.h', |
102 |
'src/node.h', |
103 |
'src/node_buffer.h', |
104 |
'src/node_constants.h', |
105 |
'src/node_crypto.h', |
106 |
'src/node_extensions.h', |
107 |
'src/node_file.h', |
108 |
'src/node_http_parser.h', |
109 |
'src/node_javascript.h', |
110 |
'src/node_os.h', |
111 |
'src/node_root_certs.h', |
112 |
'src/node_script.h', |
113 |
'src/node_string.h', |
114 |
'src/node_version.h', |
115 |
'src/ngx-queue.h', |
116 |
'src/pipe_wrap.h', |
117 |
'src/tty_wrap.h', |
118 |
'src/tcp_wrap.h', |
119 |
'src/udp_wrap.h', |
120 |
'src/req_wrap.h', |
121 |
'src/slab_allocator.h', |
122 |
'src/stream_wrap.h', |
123 |
'src/tree.h', |
124 |
'src/v8_typed_array.h', |
125 |
'deps/http_parser/http_parser.h', |
126 |
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h', |
127 |
# javascript files to make for an even more pleasant IDE experience |
128 |
'<@(library_files)', |
129 |
# node.gyp is added to the project by default. |
130 |
'common.gypi', |
131 |
], |
132 |
|
133 |
'defines': [ |
134 |
'NODE_WANT_INTERNALS=1', |
135 |
'ARCH="<(target_arch)"', |
136 |
'PLATFORM="<(OS)"', |
137 |
], |
138 |
|
139 |
'conditions': [ |
140 |
[ 'node_use_openssl=="true"', { |
141 |
'defines': [ 'HAVE_OPENSSL=1' ], |
142 |
'sources': [ 'src/node_crypto.cc' ], |
143 |
'conditions': [ |
144 |
[ 'node_shared_openssl=="false"', { |
145 |
'dependencies': [ './deps/openssl/openssl.gyp:openssl' ], |
146 |
}]] |
147 |
}, { |
148 |
'defines': [ 'HAVE_OPENSSL=0' ] |
149 |
}], |
150 |
[ 'node_use_dtrace=="true"', { |
151 |
'defines': [ 'HAVE_DTRACE=1' ], |
152 |
'dependencies': [ 'node_dtrace_header' ], |
153 |
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
154 |
# |
155 |
# node_dtrace_provider.cc and node_dtrace_ustack.cc do not actually |
156 |
# exist. They're here to trick GYP into linking the corresponding |
157 |
# object files into the final "node" executable. These files are |
158 |
# generated by "dtrace -G" using custom actions below, and the |
159 |
# GYP-generated Makefiles will properly build them when needed. |
160 |
# |
161 |
'sources': [ |
162 |
'src/node_dtrace.cc', |
163 |
'src/node_dtrace_provider.cc' |
164 |
], |
165 |
'conditions': [ [ |
166 |
'target_arch=="ia32"', { |
167 |
'sources': [ 'src/node_dtrace_ustack.cc' ] |
168 |
} |
169 |
] ], |
170 |
} ], |
171 |
[ 'node_use_systemtap=="true"', { |
172 |
'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ], |
173 |
'dependencies': [ 'node_systemtap_header' ], |
174 |
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], |
175 |
'sources': [ |
176 |
'src/node_dtrace.cc', |
177 |
'<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h', |
178 |
], |
179 |
} ], |
180 |
[ 'node_use_etw=="true"', { |
181 |
'defines': [ 'HAVE_ETW=1' ], |
182 |
'dependencies': [ 'node_etw' ], |
183 |
'sources': [ |
184 |
'src/node_win32_etw_provider.h', |
185 |
'src/node_win32_etw_provider-inl.h', |
186 |
'src/node_win32_etw_provider.cc', |
187 |
'src/node_dtrace.cc', |
188 |
'<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h', |
189 |
'<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc', |
190 |
] |
191 |
} ], |
192 |
[ 'node_shared_v8=="false"', { |
193 |
'sources': [ |
194 |
'deps/v8/include/v8.h', |
195 |
'deps/v8/include/v8-debug.h', |
196 |
], |
197 |
'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ], |
198 |
}], |
199 |
|
200 |
[ 'node_shared_zlib=="false"', { |
201 |
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], |
202 |
}], |
203 |
|
204 |
[ 'node_shared_http_parser=="false"', { |
205 |
'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], |
206 |
}], |
207 |
|
208 |
[ 'node_shared_cares=="false"', { |
209 |
'dependencies': [ 'deps/cares/cares.gyp:cares' ], |
210 |
}], |
211 |
|
212 |
[ 'node_shared_libuv=="false"', { |
213 |
'dependencies': [ 'deps/uv/uv.gyp:libuv' ], |
214 |
}], |
215 |
|
216 |
[ 'OS=="win"', { |
217 |
'sources': [ |
218 |
'src/res/node.rc', |
219 |
], |
220 |
'defines': [ |
221 |
'FD_SETSIZE=1024', |
222 |
# we need to use node's preferred "win32" rather than gyp's preferred "win" |
223 |
'PLATFORM="win32"', |
224 |
'_UNICODE=1', |
225 |
], |
226 |
'libraries': [ '-lpsapi.lib' ] |
227 |
}, { # POSIX |
228 |
'defines': [ '__POSIX__' ], |
229 |
}], |
230 |
[ 'OS=="mac"', { |
231 |
'libraries': [ '-framework Carbon' ], |
232 |
'defines!': [ |
233 |
'PLATFORM="mac"', |
234 |
], |
235 |
'xcode_settings': { |
236 |
'DEAD_CODE_STRIPPING': 'YES', |
237 |
}, |
238 |
'defines': [ |
239 |
# we need to use node's preferred "darwin" rather than gyp's preferred "mac" |
240 |
'PLATFORM="darwin"', |
241 |
], |
242 |
}], |
243 |
[ 'OS=="freebsd"', { |
244 |
'libraries': [ |
245 |
'-lutil', |
246 |
'-lkvm', |
247 |
], |
248 |
}], |
249 |
[ 'OS=="solaris"', { |
250 |
'libraries': [ |
251 |
'-lkstat', |
252 |
'-lumem', |
253 |
], |
254 |
'defines!': [ |
255 |
'PLATFORM="solaris"', |
256 |
], |
257 |
'defines': [ |
258 |
# we need to use node's preferred "sunos" |
259 |
# rather than gyp's preferred "solaris" |
260 |
'PLATFORM="sunos"', |
261 |
], |
262 |
}], |
263 |
], |
264 |
'msvs_settings': { |
265 |
'VCLinkerTool': { |
266 |
'SubSystem': 1, # /subsystem:console |
267 |
}, |
268 |
}, |
269 |
}, |
270 |
# generate ETW header and resource files |
271 |
{ |
272 |
'target_name': 'node_etw', |
273 |
'type': 'none', |
274 |
'conditions': [ |
275 |
[ 'node_use_etw=="true"', { |
276 |
'actions': [ |
277 |
{ |
278 |
'action_name': 'node_etw', |
279 |
'inputs': [ 'src/res/node_etw_provider.man' ], |
280 |
'outputs': [ |
281 |
'<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc', |
282 |
'<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h', |
283 |
], |
284 |
'action': [ 'mc <@(_inputs) -h <(SHARED_INTERMEDIATE_DIR) -r <(SHARED_INTERMEDIATE_DIR)' ] |
285 |
} |
286 |
] |
287 |
} ] |
288 |
] |
289 |
}, |
290 |
{ |
291 |
'target_name': 'node_js2c', |
292 |
'type': 'none', |
293 |
'toolsets': ['host'], |
294 |
'actions': [ |
295 |
{ |
296 |
'action_name': 'node_js2c', |
297 |
|
298 |
'inputs': [ |
299 |
'<@(library_files)', |
300 |
'./config.gypi', |
301 |
], |
302 |
|
303 |
'outputs': [ |
304 |
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h', |
305 |
], |
306 |
|
307 |
# FIXME can the following conditions be shorted by just setting |
308 |
# macros.py into some variable which then gets included in the |
309 |
# action? |
310 |
|
311 |
'conditions': [ |
312 |
[ 'node_use_dtrace=="true"' |
313 |
' or node_use_etw=="true"' |
314 |
' or node_use_systemtap=="true"', |
315 |
{ |
316 |
'action': [ |
317 |
'python', |
318 |
'tools/js2c.py', |
319 |
'<@(_outputs)', |
320 |
'<@(_inputs)', |
321 |
], |
322 |
}, { # No Dtrace |
323 |
'action': [ |
324 |
'python', |
325 |
'tools/js2c.py', |
326 |
'<@(_outputs)', |
327 |
'<@(_inputs)', |
328 |
'src/macros.py' |
329 |
], |
330 |
}] |
331 |
], |
332 |
}, |
333 |
], |
334 |
}, # end node_js2c |
335 |
{ |
336 |
'target_name': 'node_dtrace_header', |
337 |
'type': 'none', |
338 |
'conditions': [ |
339 |
[ 'node_use_dtrace=="true"', { |
340 |
'actions': [ |
341 |
{ |
342 |
'action_name': 'node_dtrace_header', |
343 |
'inputs': [ 'src/node_provider.d' ], |
344 |
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ], |
345 |
'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)', |
346 |
'-o', '<@(_outputs)' ] |
347 |
} |
348 |
] |
349 |
} ] |
350 |
] |
351 |
}, |
352 |
{ |
353 |
'target_name': 'node_systemtap_header', |
354 |
'type': 'none', |
355 |
'conditions': [ |
356 |
[ 'node_use_systemtap=="true"', { |
357 |
'actions': [ |
358 |
{ |
359 |
'action_name': 'node_systemtap_header', |
360 |
'inputs': [ 'src/node_systemtap.d' ], |
361 |
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ], |
362 |
'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)', |
363 |
'-o', '<@(_outputs)' ] |
364 |
} |
365 |
] |
366 |
} ] |
367 |
] |
368 |
}, |
369 |
{ |
370 |
'target_name': 'node_dtrace_provider', |
371 |
'type': 'none', |
372 |
'conditions': [ |
373 |
[ 'node_use_dtrace=="true"', { |
374 |
'actions': [ |
375 |
{ |
376 |
'action_name': 'node_dtrace_provider_o', |
377 |
'inputs': [ |
378 |
'src/node_provider.d', |
379 |
'<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o' |
380 |
], |
381 |
'outputs': [ |
382 |
'<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o' |
383 |
], |
384 |
'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)', |
385 |
'-o', '<@(_outputs)' ] |
386 |
} |
387 |
] |
388 |
} ] |
389 |
] |
390 |
}, |
391 |
{ |
392 |
'target_name': 'node_dtrace_ustack', |
393 |
'type': 'none', |
394 |
'conditions': [ |
395 |
[ 'node_use_dtrace=="true" and target_arch=="ia32"', { |
396 |
'actions': [ |
397 |
{ |
398 |
'action_name': 'node_dtrace_ustack_constants', |
399 |
'inputs': [ |
400 |
'<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a' |
401 |
], |
402 |
'outputs': [ |
403 |
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h' |
404 |
], |
405 |
'action': [ |
406 |
'tools/genv8constants.py', |
407 |
'<@(_outputs)', |
408 |
'<@(_inputs)' |
409 |
] |
410 |
}, |
411 |
{ |
412 |
'action_name': 'node_dtrace_ustack', |
413 |
'inputs': [ |
414 |
'src/v8ustack.d', |
415 |
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h' |
416 |
], |
417 |
'outputs': [ |
418 |
'<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o' |
419 |
], |
420 |
'action': [ |
421 |
'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc', |
422 |
'-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)', |
423 |
] |
424 |
} |
425 |
] |
426 |
} ], |
427 |
] |
428 |
} |
429 |
] # end targets |
430 |
} |
431 |
|