Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 392 lines (377 sloc) 11.287 kB
4f3c8b3 @ry WIP
ry authored
1 {
bea4827 @ry More progress with gyp
ry authored
2 'variables': {
bca88b2 @ry support nosnapshot in vcbuild.bat
ry authored
3 'v8_use_snapshot%': 'true',
d2ab314 @ry Turn off V8's -Werror in GYP
ry authored
4 # Turn off -Werror in V8
5 # See http://codereview.chromium.org/8159015
6 'werror': '',
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
7 'node_use_dtrace%': 'false',
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
8 'node_use_etw%': 'false',
a84adad @TooTallNate Default node_shared_v8 to false.
TooTallNate authored
9 'node_shared_v8%': 'false',
d03b848 @tchollingsworth build: support shared zlib
tchollingsworth authored
10 'node_shared_zlib%': 'false',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
11 'node_use_openssl%': 'true',
fe464a2 @ry Rename GYP variable node_use_system_openssl to be consistent
ry authored
12 'node_shared_openssl%': 'false',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
13 'library_files': [
14 'src/node.js',
15 'lib/_debugger.js',
16 'lib/_linklist.js',
17 'lib/assert.js',
18 'lib/buffer.js',
19 'lib/buffer_ieee754.js',
96e423a @ry Remove child_process_legacy
ry authored
20 'lib/child_process.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
21 'lib/console.js',
22 'lib/constants.js',
23 'lib/crypto.js',
73b4b86 @ry Add cluster.js to node.gyp
ry authored
24 'lib/cluster.js',
71cce3f @ry Remove dgram_legacy
ry authored
25 'lib/dgram.js',
58e892d @ry Remove dns_legacy
ry authored
26 'lib/dns.js',
963459d @isaacs Domain feature
isaacs authored
27 'lib/domain.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
28 'lib/events.js',
29 'lib/freelist.js',
30 'lib/fs.js',
31 'lib/http.js',
32 'lib/https.js',
33 'lib/module.js',
be0bb2d @ry Remove net_legacy timers_legacy
ry authored
34 'lib/net.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
35 'lib/os.js',
36 'lib/path.js',
37 'lib/punycode.js',
38 'lib/querystring.js',
39 'lib/readline.js',
40 'lib/repl.js',
41 'lib/stream.js',
42 'lib/string_decoder.js',
43 'lib/sys.js',
be0bb2d @ry Remove net_legacy timers_legacy
ry authored
44 'lib/timers.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
45 'lib/tls.js',
cdf5d91 @ry Remove tty_legacy
ry authored
46 'lib/tty.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
47 'lib/url.js',
48 'lib/util.js',
49 'lib/vm.js',
5b8e1da @isaacs Initial pass at zlib bindings
isaacs authored
50 'lib/zlib.js',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
51 ],
bea4827 @ry More progress with gyp
ry authored
52 },
53
4f3c8b3 @ry WIP
ry authored
54 'targets': [
55 {
56 'target_name': 'node',
57 'type': 'executable',
bea4827 @ry More progress with gyp
ry authored
58
4f3c8b3 @ry WIP
ry authored
59 'dependencies': [
9e55ba7 @piscisaureus dns: don't rely on libuv for c-ares integration
piscisaureus authored
60 'deps/cares/cares.gyp:cares',
db1bf67 @ry Move GYP file to the project root
ry authored
61 'deps/http_parser/http_parser.gyp:http_parser',
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
62 'deps/uv/uv.gyp:uv',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
63 'node_js2c#host',
4f3c8b3 @ry WIP
ry authored
64 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
65
66 'include_dirs': [
db1bf67 @ry Move GYP file to the project root
ry authored
67 'src',
68 'deps/uv/src/ares',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
69 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
70 ],
71
4f3c8b3 @ry WIP
ry authored
72 'sources': [
8fe5712 fs watcher binding
Igor Zinkovsky authored
73 'src/fs_event_wrap.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
74 'src/cares_wrap.cc',
75 'src/handle_wrap.cc',
76 'src/node.cc',
77 'src/node_buffer.cc',
78 'src/node_constants.cc',
79 'src/node_extensions.cc',
80 'src/node_file.cc',
81 'src/node_http_parser.cc',
82 'src/node_javascript.cc',
83 'src/node_main.cc',
84 'src/node_os.cc',
85 'src/node_script.cc',
f0ce984 @bnoordhuis fs: make fs.watchFile() work on windows
bnoordhuis authored
86 'src/node_stat_watcher.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
87 'src/node_string.cc',
5b8e1da @isaacs Initial pass at zlib bindings
isaacs authored
88 'src/node_zlib.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
89 'src/pipe_wrap.cc',
600a646 @piscisaureus process: use uv_signal instead of ev_signal
piscisaureus authored
90 'src/signal_wrap.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
91 'src/stream_wrap.cc',
08032ef @bnoordhuis core: add reusable slab allocator
bnoordhuis authored
92 'src/slab_allocator.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
93 'src/tcp_wrap.cc',
94 'src/timer_wrap.cc',
c1ae6ea @ry Add TTYWrap
ry authored
95 'src/tty_wrap.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
96 'src/process_wrap.cc',
97b0000 @bnoordhuis build: add src/v8_typed_array.cc to gyp sources list
bnoordhuis authored
97 'src/v8_typed_array.cc',
06f750c @ry fix windows build
ry authored
98 'src/udp_wrap.cc',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
99 # headers to make for a more pleasant IDE experience
100 'src/handle_wrap.h',
101 'src/node.h',
102 'src/node_buffer.h',
103 'src/node_constants.h',
104 'src/node_crypto.h',
105 'src/node_extensions.h',
106 'src/node_file.h',
107 'src/node_http_parser.h',
108 'src/node_javascript.h',
109 'src/node_os.h',
110 'src/node_root_certs.h',
111 'src/node_script.h',
112 'src/node_string.h',
113 'src/node_version.h',
5f04065 @bnoordhuis process: add _getActiveHandles(), _getActiveRequests()
bnoordhuis authored
114 'src/ngx-queue.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
115 'src/pipe_wrap.h',
af98fc9 @indutny child_process: new stdio API for .spawn() method
indutny authored
116 'src/tty_wrap.h',
117 'src/tcp_wrap.h',
118 'src/udp_wrap.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
119 'src/req_wrap.h',
08032ef @bnoordhuis core: add reusable slab allocator
bnoordhuis authored
120 'src/slab_allocator.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
121 'src/stream_wrap.h',
9e55ba7 @piscisaureus dns: don't rely on libuv for c-ares integration
piscisaureus authored
122 'src/tree.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
123 'src/v8_typed_array.h',
124 'deps/http_parser/http_parser.h',
125 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
126 # javascript files to make for an even more pleasant IDE experience
127 '<@(library_files)',
c0c4bd4 @piscisaureus Add common.gypi to gyp output
piscisaureus authored
128 # node.gyp is added to the project by default.
129 'common.gypi',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
130 ],
131
132 'defines': [
09dc577 @bnoordhuis build: move internals to separate header file
bnoordhuis authored
133 'NODE_WANT_INTERNALS=1',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
134 'ARCH="<(target_arch)"',
135 'PLATFORM="<(OS)"',
4f3c8b3 @ry WIP
ry authored
136 ],
137
138 'conditions': [
a979ab9 @ry Improve gyp build - now works kind of
ry authored
139 [ 'node_use_openssl=="true"', {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
140 'defines': [ 'HAVE_OPENSSL=1' ],
db1bf67 @ry Move GYP file to the project root
ry authored
141 'sources': [ 'src/node_crypto.cc' ],
9f98698 @bnoordhuis build: configure node, v8, cares and openssl
bnoordhuis authored
142 'conditions': [
fe464a2 @ry Rename GYP variable node_use_system_openssl to be consistent
ry authored
143 [ 'node_shared_openssl=="false"', {
9f98698 @bnoordhuis build: configure node, v8, cares and openssl
bnoordhuis authored
144 'dependencies': [ './deps/openssl/openssl.gyp:openssl' ],
145 }]]
a979ab9 @ry Improve gyp build - now works kind of
ry authored
146 }, {
147 'defines': [ 'HAVE_OPENSSL=0' ]
148 }],
149
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
150 [ 'node_use_dtrace=="true"', {
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
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 #
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
161 'sources': [
b3ddb89 @ry Don't compile in node_dtrace.cc when not supported
ry authored
162 'src/node_dtrace.cc',
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
163 'src/node_dtrace_provider.cc'
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
164 ],
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
165 'conditions': [ [
166 'target_arch=="ia32"', {
167 'sources': [ 'src/node_dtrace_ustack.cc' ]
168 }
169 ] ],
170 } ],
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
171 [ 'node_use_etw=="true"', {
172 'defines': [ 'HAVE_ETW=1' ],
173 'dependencies': [ 'node_etw' ],
174 'sources': [
175 'src/node_win32_etw_provider.h',
176 'src/node_win32_etw_provider-inl.h',
177 'src/node_win32_etw_provider.cc',
178 'src/node_dtrace.cc',
179 '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h',
180 '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc',
181 ]
182 } ],
f00c8bc @bnoordhuis build: fix --shared-v8 option
bnoordhuis authored
183 [ 'node_shared_v8=="false"', {
59ecf2c @isaacs Revert "Revert "build: support shared V8 properly""
isaacs authored
184 'sources': [
185 'deps/v8/include/v8.h',
186 'deps/v8/include/v8-debug.h',
187 ],
188 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
189 }],
190
d03b848 @tchollingsworth build: support shared zlib
tchollingsworth authored
191 [ 'node_shared_zlib=="false"', {
192 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
193 }],
194
4f3c8b3 @ry WIP
ry authored
195 [ 'OS=="win"', {
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
196 'sources': [
0187b65 @piscisaureus Move resource files to src/res.
piscisaureus authored
197 'src/res/node.rc',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
198 ],
4f3c8b3 @ry WIP
ry authored
199 'defines': [
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
200 'FD_SETSIZE=1024',
79d9f62 @DrPizza Fix bad platform name.
DrPizza authored
201 # we need to use node's preferred "win32" rather than gyp's preferred "win"
202 'PLATFORM="win32"',
d52f502 @piscisaureus Windows: another attempt to support unicode argv
piscisaureus authored
203 '_UNICODE=1',
4f3c8b3 @ry WIP
ry authored
204 ],
1976288 @ry win: link to psapi.lib
ry authored
205 'libraries': [ '-lpsapi.lib' ]
acbfc40 @bnoordhuis build: fix add-on loading on freebsd
bnoordhuis authored
206 }, { # POSIX
a979ab9 @ry Improve gyp build - now works kind of
ry authored
207 'defines': [ '__POSIX__' ],
81fc6ca @piscisaureus symbol hack test
piscisaureus authored
208 'ldflags': [
209 '-Wl,--dynamic-list=../deps/openssl/export/unix/openssl.sym'
210 ]
4f3c8b3 @ry WIP
ry authored
211 }],
212 [ 'OS=="mac"', {
a979ab9 @ry Improve gyp build - now works kind of
ry authored
213 'libraries': [ '-framework Carbon' ],
f2ba4ce @TooTallNate build: remove the old -DPLATFORM="mac" define
TooTallNate authored
214 'defines!': [
215 'PLATFORM="mac"',
216 ],
9ff86a2 @TooTallNate build: set `process.platform` to "darwin" on OS X
TooTallNate authored
217 'defines': [
218 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
219 'PLATFORM="darwin"',
220 ],
b433c42 @ry gyp: Support Linux
ry authored
221 }],
decd818 @bnoordhuis build: fix freebsd gyp build
bnoordhuis authored
222 [ 'OS=="freebsd"', {
223 'libraries': [
224 '-lutil',
225 '-lkvm',
226 ],
227 }],
13871fa @bnoordhuis build: fix sunos gyp build, include platform file
bnoordhuis authored
228 [ 'OS=="solaris"', {
229 'libraries': [
230 '-lkstat',
f70b138 @trentm always link sunos builds with libumem
trentm authored
231 '-lumem',
13871fa @bnoordhuis build: fix sunos gyp build, include platform file
bnoordhuis authored
232 ],
606a933 @TooTallNate build: set `process.platform` to "sunos" on SunOS
TooTallNate authored
233 'defines!': [
234 'PLATFORM="solaris"',
235 ],
236 'defines': [
237 # we need to use node's preferred "sunos"
238 # rather than gyp's preferred "solaris"
239 'PLATFORM="sunos"',
240 ],
13871fa @bnoordhuis build: fix sunos gyp build, include platform file
bnoordhuis authored
241 }],
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
242 ],
5691e8a @piscisaureus windows: fix typo in node.gyp
piscisaureus authored
243 'msvs_settings': {
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
244 'VCLinkerTool': {
f7faacf @piscisaureus windows: make node.exe export openssl symbols
piscisaureus authored
245 # Make node.exe re-export all openssl symbols, so binary modules
246 # can link against it
247 'ModuleDefinitionFile': './deps/openssl/export/win32/openssl.def',
248 # Executable should run in the console subsystem.
249 'SubSystem': 1
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
250 },
251 },
4f3c8b3 @ry WIP
ry authored
252 },
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
253 # generate ETW header and resource files
254 {
255 'target_name': 'node_etw',
256 'type': 'none',
257 'conditions': [
258 [ 'node_use_etw=="true"', {
259 'actions': [
260 {
261 'action_name': 'node_etw',
262 'inputs': [ 'src/res/node_etw_provider.man' ],
263 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
264 'action': [ 'mc <@(_inputs) -h <@(_outputs) -r <@(_outputs)' ]
265 }
266 ]
267 } ]
268 ]
269 },
4f3c8b3 @ry WIP
ry authored
270 {
271 'target_name': 'node_js2c',
272 'type': 'none',
273 'toolsets': ['host'],
274 'actions': [
275 {
276 'action_name': 'node_js2c',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
277
4f3c8b3 @ry WIP
ry authored
278 'inputs': [
279 '<@(library_files)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
280 './config.gypi',
4f3c8b3 @ry WIP
ry authored
281 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
282
4f3c8b3 @ry WIP
ry authored
283 'outputs': [
284 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
285 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
286
287 # FIXME can the following conditions be shorted by just setting
288 # macros.py into some variable which then gets included in the
289 # action?
290
291 'conditions': [
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
292 [ 'node_use_dtrace=="true" or node_use_etw=="true"', {
a979ab9 @ry Improve gyp build - now works kind of
ry authored
293 'action': [
294 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
295 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
296 '<@(_outputs)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
297 '<@(_inputs)',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
298 ],
299 }, { # No Dtrace
300 'action': [
301 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
302 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
303 '<@(_outputs)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
304 '<@(_inputs)',
db1bf67 @ry Move GYP file to the project root
ry authored
305 'src/macros.py'
a979ab9 @ry Improve gyp build - now works kind of
ry authored
306 ],
307 }]
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
308 ],
4f3c8b3 @ry WIP
ry authored
309 },
310 ],
311 }, # end node_js2c
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
312 {
313 'target_name': 'node_dtrace_header',
314 'type': 'none',
315 'conditions': [
316 [ 'node_use_dtrace=="true"', {
317 'actions': [
318 {
319 'action_name': 'node_dtrace_header',
320 'inputs': [ 'src/node_provider.d' ],
321 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
322 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
323 '-o', '<@(_outputs)' ]
324 }
325 ]
326 } ]
327 ]
328 },
329 {
330 'target_name': 'node_dtrace_provider',
331 'type': 'none',
332 'conditions': [
333 [ 'node_use_dtrace=="true"', {
334 'actions': [
335 {
336 'action_name': 'node_dtrace_provider_o',
337 'inputs': [
338 'src/node_provider.d',
339 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o'
340 ],
341 'outputs': [
342 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
343 ],
344 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
345 '-o', '<@(_outputs)' ]
346 }
347 ]
348 } ]
349 ]
350 },
351 {
352 'target_name': 'node_dtrace_ustack',
353 'type': 'none',
354 'conditions': [
8559a4a @davepacheco Fix 64-bit SmartOS build
davepacheco authored
355 [ 'node_use_dtrace=="true" and target_arch=="ia32"', {
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
356 'actions': [
357 {
358 'action_name': 'node_dtrace_ustack_constants',
359 'inputs': [
360 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a'
361 ],
362 'outputs': [
363 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
364 ],
365 'action': [
366 'tools/genv8constants.py',
367 '<@(_outputs)',
368 '<@(_inputs)'
369 ]
370 },
371 {
372 'action_name': 'node_dtrace_ustack',
373 'inputs': [
374 'src/v8ustack.d',
375 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
376 ],
377 'outputs': [
378 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
379 ],
380 'action': [
381 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
382 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
383 ]
384 }
385 ]
386 } ],
387 ]
388 }
4f3c8b3 @ry WIP
ry authored
389 ] # end targets
390 }
391
Something went wrong with that request. Please try again.