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 @ 06810b29

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

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

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

    
283
          'inputs': [
284
            '<@(library_files)',
285
            './config.gypi',
286
          ],
287

    
288
          'outputs': [
289
            '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
290
          ],
291

    
292
          # FIXME can the following conditions be shorted by just setting
293
          # macros.py into some variable which then gets included in the
294
          # action?
295

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