Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 378 lines (363 sloc) 10.738 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': [
db1bf67 @ry Move GYP file to the project root
ry authored
60 'deps/http_parser/http_parser.gyp:http_parser',
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
61 'deps/uv/uv.gyp:uv',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
62 'node_js2c#host',
4f3c8b3 @ry WIP
ry authored
63 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
64
65 'include_dirs': [
db1bf67 @ry Move GYP file to the project root
ry authored
66 'src',
67 'deps/uv/src/ares',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
68 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
69 ],
70
4f3c8b3 @ry WIP
ry authored
71 'sources': [
8fe5712 fs watcher binding
Igor Zinkovsky authored
72 'src/fs_event_wrap.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
73 'src/cares_wrap.cc',
74 'src/handle_wrap.cc',
75 'src/node.cc',
76 'src/node_buffer.cc',
77 'src/node_constants.cc',
78 'src/node_extensions.cc',
79 'src/node_file.cc',
80 'src/node_http_parser.cc',
81 'src/node_javascript.cc',
82 'src/node_main.cc',
83 'src/node_os.cc',
84 'src/node_script.cc',
f0ce984 @bnoordhuis fs: make fs.watchFile() work on windows
bnoordhuis authored
85 'src/node_stat_watcher.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
86 'src/node_string.cc',
5b8e1da @isaacs Initial pass at zlib bindings
isaacs authored
87 'src/node_zlib.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
88 'src/pipe_wrap.cc',
89 'src/stream_wrap.cc',
08032ef @bnoordhuis core: add reusable slab allocator
bnoordhuis authored
90 'src/slab_allocator.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
91 'src/tcp_wrap.cc',
92 'src/timer_wrap.cc',
c1ae6ea @ry Add TTYWrap
ry authored
93 'src/tty_wrap.cc',
db1bf67 @ry Move GYP file to the project root
ry authored
94 'src/process_wrap.cc',
97b0000 @bnoordhuis build: add src/v8_typed_array.cc to gyp sources list
bnoordhuis authored
95 'src/v8_typed_array.cc',
06f750c @ry fix windows build
ry authored
96 'src/udp_wrap.cc',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
97 # headers to make for a more pleasant IDE experience
98 'src/handle_wrap.h',
99 'src/node.h',
100 'src/node_buffer.h',
101 'src/node_constants.h',
102 'src/node_crypto.h',
103 'src/node_extensions.h',
104 'src/node_file.h',
105 'src/node_http_parser.h',
106 'src/node_javascript.h',
107 'src/node_os.h',
108 'src/node_root_certs.h',
109 'src/node_script.h',
110 'src/node_string.h',
111 'src/node_version.h',
5f04065 @bnoordhuis process: add _getActiveHandles(), _getActiveRequests()
bnoordhuis authored
112 'src/ngx-queue.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
113 'src/pipe_wrap.h',
af98fc9 @indutny child_process: new stdio API for .spawn() method
indutny authored
114 'src/tty_wrap.h',
115 'src/tcp_wrap.h',
116 'src/udp_wrap.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
117 'src/req_wrap.h',
08032ef @bnoordhuis core: add reusable slab allocator
bnoordhuis authored
118 'src/slab_allocator.h',
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
119 'src/stream_wrap.h',
120 'src/v8_typed_array.h',
121 'deps/http_parser/http_parser.h',
122 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
ae2ac4f @piscisaureus gyp: add js files to node project
piscisaureus authored
123 # javascript files to make for an even more pleasant IDE experience
124 '<@(library_files)',
c0c4bd4 @piscisaureus Add common.gypi to gyp output
piscisaureus authored
125 # node.gyp is added to the project by default.
126 'common.gypi',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
127 ],
128
129 'defines': [
09dc577 @bnoordhuis build: move internals to separate header file
bnoordhuis authored
130 'NODE_WANT_INTERNALS=1',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
131 'ARCH="<(target_arch)"',
132 'PLATFORM="<(OS)"',
4f3c8b3 @ry WIP
ry authored
133 ],
134
135 'conditions': [
a979ab9 @ry Improve gyp build - now works kind of
ry authored
136 [ 'node_use_openssl=="true"', {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
137 'defines': [ 'HAVE_OPENSSL=1' ],
db1bf67 @ry Move GYP file to the project root
ry authored
138 'sources': [ 'src/node_crypto.cc' ],
9f98698 @bnoordhuis build: configure node, v8, cares and openssl
bnoordhuis authored
139 'conditions': [
fe464a2 @ry Rename GYP variable node_use_system_openssl to be consistent
ry authored
140 [ 'node_shared_openssl=="false"', {
9f98698 @bnoordhuis build: configure node, v8, cares and openssl
bnoordhuis authored
141 'dependencies': [ './deps/openssl/openssl.gyp:openssl' ],
142 }]]
a979ab9 @ry Improve gyp build - now works kind of
ry authored
143 }, {
144 'defines': [ 'HAVE_OPENSSL=0' ]
145 }],
146
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
147 [ 'node_use_dtrace=="true"', {
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
148 'defines': [ 'HAVE_DTRACE=1' ],
149 'dependencies': [ 'node_dtrace_header' ],
150 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
151 #
152 # node_dtrace_provider.cc and node_dtrace_ustack.cc do not actually
153 # exist. They're here to trick GYP into linking the corresponding
154 # object files into the final "node" executable. These files are
155 # generated by "dtrace -G" using custom actions below, and the
156 # GYP-generated Makefiles will properly build them when needed.
157 #
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
158 'sources': [
b3ddb89 @ry Don't compile in node_dtrace.cc when not supported
ry authored
159 'src/node_dtrace.cc',
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
160 'src/node_dtrace_provider.cc'
64b4168 @DrPizza Add headers to improve the IDE experience.
DrPizza authored
161 ],
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
162 'conditions': [ [
163 'target_arch=="ia32"', {
164 'sources': [ 'src/node_dtrace_ustack.cc' ]
165 }
166 ] ],
167 } ],
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
168 [ 'node_use_etw=="true"', {
169 'defines': [ 'HAVE_ETW=1' ],
170 'dependencies': [ 'node_etw' ],
171 'sources': [
172 'src/node_win32_etw_provider.h',
173 'src/node_win32_etw_provider-inl.h',
174 'src/node_win32_etw_provider.cc',
175 'src/node_dtrace.cc',
176 '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h',
177 '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc',
178 ]
179 } ],
f00c8bc @bnoordhuis build: fix --shared-v8 option
bnoordhuis authored
180 [ 'node_shared_v8=="false"', {
59ecf2c @isaacs Revert "Revert "build: support shared V8 properly""
isaacs authored
181 'sources': [
182 'deps/v8/include/v8.h',
183 'deps/v8/include/v8-debug.h',
184 ],
185 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
186 }],
187
d03b848 @tchollingsworth build: support shared zlib
tchollingsworth authored
188 [ 'node_shared_zlib=="false"', {
189 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
190 }],
191
4f3c8b3 @ry WIP
ry authored
192 [ 'OS=="win"', {
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
193 'sources': [
0187b65 @piscisaureus Move resource files to src/res.
piscisaureus authored
194 'src/res/node.rc',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
195 ],
4f3c8b3 @ry WIP
ry authored
196 'defines': [
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
197 'FD_SETSIZE=1024',
79d9f62 @DrPizza Fix bad platform name.
DrPizza authored
198 # we need to use node's preferred "win32" rather than gyp's preferred "win"
199 'PLATFORM="win32"',
d52f502 @piscisaureus Windows: another attempt to support unicode argv
piscisaureus authored
200 '_UNICODE=1',
4f3c8b3 @ry WIP
ry authored
201 ],
1976288 @ry win: link to psapi.lib
ry authored
202 'libraries': [ '-lpsapi.lib' ]
acbfc40 @bnoordhuis build: fix add-on loading on freebsd
bnoordhuis authored
203 }, { # POSIX
a979ab9 @ry Improve gyp build - now works kind of
ry authored
204 'defines': [ '__POSIX__' ],
4f3c8b3 @ry WIP
ry authored
205 'sources': [
db1bf67 @ry Move GYP file to the project root
ry authored
206 'src/node_signal_watcher.cc',
f35a396 Revert "remove node_io_watcher"
Igor Zinkovsky authored
207 'src/node_io_watcher.cc',
acbfc40 @bnoordhuis build: fix add-on loading on freebsd
bnoordhuis authored
208 ],
4f3c8b3 @ry WIP
ry authored
209 }],
210 [ 'OS=="mac"', {
a979ab9 @ry Improve gyp build - now works kind of
ry authored
211 'libraries': [ '-framework Carbon' ],
f2ba4ce @TooTallNate build: remove the old -DPLATFORM="mac" define
TooTallNate authored
212 'defines!': [
213 'PLATFORM="mac"',
214 ],
9ff86a2 @TooTallNate build: set `process.platform` to "darwin" on OS X
TooTallNate authored
215 'defines': [
216 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
217 'PLATFORM="darwin"',
218 ],
b433c42 @ry gyp: Support Linux
ry authored
219 }],
decd818 @bnoordhuis build: fix freebsd gyp build
bnoordhuis authored
220 [ 'OS=="freebsd"', {
221 'libraries': [
222 '-lutil',
223 '-lkvm',
224 ],
225 }],
13871fa @bnoordhuis build: fix sunos gyp build, include platform file
bnoordhuis authored
226 [ 'OS=="solaris"', {
227 'libraries': [
228 '-lkstat',
f70b138 @trentm always link sunos builds with libumem
trentm authored
229 '-lumem',
13871fa @bnoordhuis build: fix sunos gyp build, include platform file
bnoordhuis authored
230 ],
231 }],
16788f4 @DrPizza Rename gyp files to produce useful solution names.
DrPizza authored
232 ],
233 'msvs-settings': {
234 'VCLinkerTool': {
235 'SubSystem': 1, # /subsystem:console
236 },
237 },
4f3c8b3 @ry WIP
ry authored
238 },
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
239 # generate ETW header and resource files
240 {
241 'target_name': 'node_etw',
242 'type': 'none',
243 'conditions': [
244 [ 'node_use_etw=="true"', {
245 'actions': [
246 {
247 'action_name': 'node_etw',
248 'inputs': [ 'src/res/node_etw_provider.man' ],
249 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
250 'action': [ 'mc <@(_inputs) -h <@(_outputs) -r <@(_outputs)' ]
251 }
252 ]
253 } ]
254 ]
255 },
4f3c8b3 @ry WIP
ry authored
256 {
257 'target_name': 'node_js2c',
258 'type': 'none',
259 'toolsets': ['host'],
260 'actions': [
261 {
262 'action_name': 'node_js2c',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
263
4f3c8b3 @ry WIP
ry authored
264 'inputs': [
265 '<@(library_files)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
266 './config.gypi',
4f3c8b3 @ry WIP
ry authored
267 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
268
4f3c8b3 @ry WIP
ry authored
269 'outputs': [
270 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
271 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
272
273 # FIXME can the following conditions be shorted by just setting
274 # macros.py into some variable which then gets included in the
275 # action?
276
277 'conditions': [
35a1421 Windows: Enable ETW events.
Igor Zinkovsky authored
278 [ 'node_use_dtrace=="true" or node_use_etw=="true"', {
a979ab9 @ry Improve gyp build - now works kind of
ry authored
279 'action': [
280 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
281 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
282 '<@(_outputs)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
283 '<@(_inputs)',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
284 ],
285 }, { # No Dtrace
286 'action': [
287 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
288 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
289 '<@(_outputs)',
95fd517 @TooTallNate node.gyp: include the config.gypi file in the js2c inputs list
TooTallNate authored
290 '<@(_inputs)',
db1bf67 @ry Move GYP file to the project root
ry authored
291 'src/macros.py'
a979ab9 @ry Improve gyp build - now works kind of
ry authored
292 ],
293 }]
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
294 ],
4f3c8b3 @ry WIP
ry authored
295 },
296 ],
297 }, # end node_js2c
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
298 {
299 'target_name': 'node_dtrace_header',
300 'type': 'none',
301 'conditions': [
302 [ 'node_use_dtrace=="true"', {
303 'actions': [
304 {
305 'action_name': 'node_dtrace_header',
306 'inputs': [ 'src/node_provider.d' ],
307 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
308 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
309 '-o', '<@(_outputs)' ]
310 }
311 ]
312 } ]
313 ]
314 },
315 {
316 'target_name': 'node_dtrace_provider',
317 'type': 'none',
318 'conditions': [
319 [ 'node_use_dtrace=="true"', {
320 'actions': [
321 {
322 'action_name': 'node_dtrace_provider_o',
323 'inputs': [
324 'src/node_provider.d',
325 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o'
326 ],
327 'outputs': [
328 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
329 ],
330 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
331 '-o', '<@(_outputs)' ]
332 }
333 ]
334 } ]
335 ]
336 },
337 {
338 'target_name': 'node_dtrace_ustack',
339 'type': 'none',
340 'conditions': [
8559a4a @davepacheco Fix 64-bit SmartOS build
davepacheco authored
341 [ 'node_use_dtrace=="true" and target_arch=="ia32"', {
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
342 'actions': [
343 {
344 'action_name': 'node_dtrace_ustack_constants',
345 'inputs': [
346 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a'
347 ],
348 'outputs': [
349 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
350 ],
351 'action': [
352 'tools/genv8constants.py',
353 '<@(_outputs)',
354 '<@(_inputs)'
355 ]
356 },
357 {
358 'action_name': 'node_dtrace_ustack',
359 'inputs': [
360 'src/v8ustack.d',
361 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
362 ],
363 'outputs': [
364 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
365 ],
366 'action': [
367 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
368 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
369 ]
370 }
371 ]
372 } ],
373 ]
374 }
4f3c8b3 @ry WIP
ry authored
375 ] # end targets
376 }
377
Something went wrong with that request. Please try again.