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 @ bfd78b69

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

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

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

    
287
          'inputs': [
288
            '<@(library_files)',
289
            './config.gypi',
290
          ],
291

    
292
          'outputs': [
293
            '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
294
          ],
295

    
296
          # FIXME can the following conditions be shorted by just setting
297
          # macros.py into some variable which then gets included in the
298
          # action?
299

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