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.

Statistics
| Branch: | Revision:

main_repo / node.gyp @ 73ff653a

History | View | Annotate | Download (12 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_use_openssl%': 'true',
14
    'node_use_systemtap%': 'false',
15
    'node_shared_openssl%': 'false',
16
    'library_files': [
17
      'src/node.js',
18
      'lib/_debugger.js',
19
      'lib/_linklist.js',
20
      'lib/assert.js',
21
      'lib/buffer.js',
22
      'lib/buffer_ieee754.js',
23
      'lib/child_process.js',
24
      'lib/console.js',
25
      'lib/constants.js',
26
      'lib/crypto.js',
27
      'lib/cluster.js',
28
      'lib/dgram.js',
29
      'lib/dns.js',
30
      'lib/domain.js',
31
      'lib/events.js',
32
      'lib/freelist.js',
33
      'lib/fs.js',
34
      'lib/http.js',
35
      'lib/https.js',
36
      'lib/module.js',
37
      'lib/net.js',
38
      'lib/os.js',
39
      'lib/path.js',
40
      'lib/punycode.js',
41
      'lib/querystring.js',
42
      'lib/readline.js',
43
      'lib/repl.js',
44
      'lib/stream.js',
45
      'lib/string_decoder.js',
46
      'lib/sys.js',
47
      'lib/timers.js',
48
      'lib/tls.js',
49
      'lib/tty.js',
50
      'lib/url.js',
51
      'lib/util.js',
52
      'lib/vm.js',
53
      'lib/zlib.js',
54
    ],
55
  },
56

    
57
  'targets': [
58
    {
59
      'target_name': 'node',
60
      'type': 'executable',
61

    
62
      'dependencies': [
63
        'deps/uv/uv.gyp:libuv',
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
        [ 'OS=="win"', {
213
          'sources': [
214
            'src/res/node.rc',
215
          ],
216
          'defines': [
217
            'FD_SETSIZE=1024',
218
            # we need to use node's preferred "win32" rather than gyp's preferred "win"
219
            'PLATFORM="win32"',
220
            '_UNICODE=1',
221
          ],
222
          'libraries': [ '-lpsapi.lib' ]
223
        }, { # POSIX
224
          'defines': [ '__POSIX__' ],
225
        }],
226
        [ 'OS=="mac"', {
227
          'libraries': [ '-framework Carbon' ],
228
          'defines!': [
229
            'PLATFORM="mac"',
230
          ],
231
          'defines': [
232
            # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
233
            'PLATFORM="darwin"',
234
          ],
235
        }],
236
        [ 'OS=="freebsd"', {
237
          'libraries': [
238
            '-lutil',
239
            '-lkvm',
240
          ],
241
        }],
242
        [ 'OS=="solaris"', {
243
          'libraries': [
244
            '-lkstat',
245
            '-lumem',
246
          ],
247
          'defines!': [
248
            'PLATFORM="solaris"',
249
          ],
250
          'defines': [
251
            # we need to use node's preferred "sunos"
252
            # rather than gyp's preferred "solaris"
253
            'PLATFORM="sunos"',
254
          ],
255
        }],
256
      ],
257
      'msvs_settings': {
258
        'VCLinkerTool': {
259
          'SubSystem': 1, # /subsystem:console
260
        },
261
      },
262
    },
263
    # generate ETW header and resource files
264
    {
265
      'target_name': 'node_etw',
266
      'type': 'none',
267
      'conditions': [
268
        [ 'node_use_etw=="true"', {
269
          'actions': [
270
            {
271
              'action_name': 'node_etw',
272
              'inputs': [ 'src/res/node_etw_provider.man' ],
273
              'outputs': [
274
                '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc',
275
                '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h',
276
              ],
277
              'action': [ 'mc <@(_inputs) -h <(SHARED_INTERMEDIATE_DIR) -r <(SHARED_INTERMEDIATE_DIR)' ]
278
            }
279
          ]
280
        } ]
281
      ]
282
    },
283
    {
284
      'target_name': 'node_js2c',
285
      'type': 'none',
286
      'toolsets': ['host'],
287
      'actions': [
288
        {
289
          'action_name': 'node_js2c',
290

    
291
          'inputs': [
292
            '<@(library_files)',
293
            './config.gypi',
294
          ],
295

    
296
          'outputs': [
297
            '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
298
          ],
299

    
300
          # FIXME can the following conditions be shorted by just setting
301
          # macros.py into some variable which then gets included in the
302
          # action?
303

    
304
          'conditions': [
305
            [ 'node_use_dtrace=="true"'
306
              ' or node_use_etw=="true"'
307
              ' or node_use_systemtap=="true"',
308
            {
309
              'action': [
310
                'python',
311
                'tools/js2c.py',
312
                '<@(_outputs)',
313
                '<@(_inputs)',
314
              ],
315
            }, { # No Dtrace
316
              'action': [
317
                'python',
318
                'tools/js2c.py',
319
                '<@(_outputs)',
320
                '<@(_inputs)',
321
                'src/macros.py'
322
              ],
323
            }]
324
          ],
325
        },
326
      ],
327
    }, # end node_js2c
328
    {
329
      'target_name': 'node_dtrace_header',
330
      'type': 'none',
331
      'conditions': [
332
        [ 'node_use_dtrace=="true"', {
333
          'actions': [
334
            {
335
              'action_name': 'node_dtrace_header',
336
              'inputs': [ 'src/node_provider.d' ],
337
              'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
338
              'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
339
                '-o', '<@(_outputs)' ]
340
            }
341
          ]
342
        } ]
343
      ]
344
    },
345
    {
346
      'target_name': 'node_systemtap_header',
347
      'type': 'none',
348
      'conditions': [
349
        [ 'node_use_systemtap=="true"', {
350
          'actions': [
351
            {
352
              'action_name': 'node_systemtap_header',
353
              'inputs': [ 'src/node_systemtap.d' ],
354
              'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ],
355
              'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)',
356
                '-o', '<@(_outputs)' ]
357
            }
358
          ]
359
        } ]
360
      ]
361
    },
362
    {
363
      'target_name': 'node_dtrace_provider',
364
      'type': 'none',
365
      'conditions': [
366
        [ 'node_use_dtrace=="true"', {
367
          'actions': [
368
            {
369
              'action_name': 'node_dtrace_provider_o',
370
              'inputs': [
371
                'src/node_provider.d',
372
                '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o'
373
              ],
374
              'outputs': [
375
                '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
376
              ],
377
              'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
378
                '-o', '<@(_outputs)' ]
379
            }
380
          ]
381
        } ]
382
      ]
383
    },
384
    {
385
      'target_name': 'node_dtrace_ustack',
386
      'type': 'none',
387
      'conditions': [
388
        [ 'node_use_dtrace=="true" and target_arch=="ia32"', {
389
          'actions': [
390
            {
391
              'action_name': 'node_dtrace_ustack_constants',
392
              'inputs': [
393
                '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a'
394
              ],
395
              'outputs': [
396
                '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
397
              ],
398
              'action': [
399
                'tools/genv8constants.py',
400
                '<@(_outputs)',
401
                '<@(_inputs)'
402
              ]
403
            },
404
            {
405
              'action_name': 'node_dtrace_ustack',
406
              'inputs': [
407
                'src/v8ustack.d',
408
                '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
409
              ],
410
              'outputs': [
411
                '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
412
              ],
413
              'action': [
414
                'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
415
                '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
416
              ]
417
            }
418
          ]
419
        } ],
420
      ]
421
    }
422
  ] # end targets
423
}
424