node-gyp: download header tarball for compile
[platform/upstream/nodejs.git] / deps / npm / node_modules / node-gyp / addon.gypi
1 {
2   'target_defaults': {
3     'type': 'loadable_module',
4     'win_delay_load_hook': 'true',
5     'product_prefix': '',
6
7     'include_dirs': [
8       '<(node_root_dir)/include/node',
9       '<(node_root_dir)/src',
10       '<(node_root_dir)/deps/uv/include',
11       '<(node_root_dir)/deps/v8/include'
12     ],
13     'defines': [
14       'NODE_GYP_MODULE_NAME=>(_target_name)'
15     ],
16
17     'target_conditions': [
18       ['_type=="loadable_module"', {
19         'product_extension': 'node',
20         'defines': [
21           'BUILDING_NODE_EXTENSION'
22         ],
23         'xcode_settings': {
24           'OTHER_LDFLAGS': [
25             '-undefined dynamic_lookup'
26           ],
27         },
28       }],
29
30       ['_type=="static_library"', {
31         # set to `1` to *disable* the -T thin archive 'ld' flag.
32         # older linkers don't support this flag.
33         'standalone_static_library': '<(standalone_static_library)'
34       }],
35
36       ['_win_delay_load_hook=="true"', {
37         # If the addon specifies `'win_delay_load_hook': 'true'` in its
38         # binding.gyp, link a delay-load hook into the DLL. This hook ensures
39         # that the addon will work regardless of whether the node/iojs binary
40         # is named node.exe, iojs.exe, or something else.
41         'conditions': [
42           [ 'OS=="win"', {
43             'sources': [
44               '<(node_gyp_dir)/src/win_delay_load_hook.c',
45             ],
46             'msvs_settings': {
47               'VCLinkerTool': {
48                 'DelayLoadDLLs': [ 'iojs.exe', 'node.exe' ],
49                 # Don't print a linker warning when no imports from either .exe
50                 # are used.
51                 'AdditionalOptions': [ '/ignore:4199' ],
52               },
53             },
54           }],
55         ],
56       }],
57     ],
58
59     'conditions': [
60       [ 'OS=="mac"', {
61         'defines': [
62           '_DARWIN_USE_64_BIT_INODE=1'
63         ],
64         'xcode_settings': {
65           'DYLIB_INSTALL_NAME_BASE': '@rpath'
66         },
67       }],
68       [ 'OS=="win"', {
69         'libraries': [
70           '-lkernel32.lib',
71           '-luser32.lib',
72           '-lgdi32.lib',
73           '-lwinspool.lib',
74           '-lcomdlg32.lib',
75           '-ladvapi32.lib',
76           '-lshell32.lib',
77           '-lole32.lib',
78           '-loleaut32.lib',
79           '-luuid.lib',
80           '-lodbc32.lib',
81           '-lDelayImp.lib',
82           '-l"<(node_root_dir)/$(ConfigurationName)/iojs.lib"'
83         ],
84         'msvs_disabled_warnings': [
85           # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
86           # needs to have dll-interface to be used by
87           # clients of class 'node::ObjectWrap'
88           4251
89         ],
90       }, {
91         # OS!="win"
92         'defines': [
93           '_LARGEFILE_SOURCE',
94           '_FILE_OFFSET_BITS=64'
95         ],
96       }],
97       [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', {
98         'cflags': [ '-fPIC' ],
99       }]
100     ]
101   }
102 }