Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 277 lines (260 sloc) 7.964 kb
4f3c8b3 @ry WIP
ry authored
1 {
bea4827 @ry More progress with gyp
ry authored
2 'target_defaults': {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
3 'default_configuration': 'Debug',
bea4827 @ry More progress with gyp
ry authored
4 'configurations': {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
5 # TODO: hoist these out and put them somewhere common, because
6 # RuntimeLibrary MUST MATCH across the entire project
bea4827 @ry More progress with gyp
ry authored
7 'Debug': {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
8 'defines': [ 'DEBUG', '_DEBUG' ],
9 'msvs_settings': {
10 'VCCLCompilerTool': {
11 'RuntimeLibrary': 1, # static debug
e38fc6c @DrPizza Disable optimization in debug builds.
DrPizza authored
12 'Optimization': 0, # /Od, no optimization
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
13 },
14 },
bea4827 @ry More progress with gyp
ry authored
15 },
16 'Release': {
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
17 'defines': [ 'NDEBUG' ],
18 'msvs_settings': {
19 'VCCLCompilerTool': {
20 'RuntimeLibrary': 0, # static release
e38fc6c @DrPizza Disable optimization in debug builds.
DrPizza authored
21 'Optimization': 3, # /Ox, full optimization
22 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
23 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
24 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
25 },
26 'VCLinkerTool': {
27 'LinkTimeCodeGeneration': 1, # link-time code generation
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
28 },
29 },
bea4827 @ry More progress with gyp
ry authored
30 }
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
31 },
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
32 'msvs_settings': {
33 'VCCLCompilerTool': {
e38fc6c @DrPizza Disable optimization in debug builds.
DrPizza authored
34 'StringPooling': 'true', # pool string literals
35 'DebugInformationFormat': 3, # Generate a PDB
36 'AdditionalOptions': [
37 '/MP', # compile across multiple CPUs, VC2008 setting
38 ],
39 'MultiProcessorCompilation': 'true', # compile across multiple CPUs, VC2010 setting
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
40 },
41 'VCLibrarianTool': {
42 },
43 'VCLinkerTool': {
44 'GenerateDebugInformation': 'true',
45 },
46 },
47 'conditions': [
48 ['OS == "win"', {
49 'defines': [
588ef72 @DrPizza Silence VC++ warnings about use of badly-designed parts of the C library...
DrPizza authored
50 'WIN32',
51 # we don't really want VC++ warning us about
52 # how dangerous C functions are...
53 '_CRT_SECURE_NO_DEPRECATE',
54 # ... or that C implementations shouldn't use
55 # POSIX names
56 '_CRT_NONSTDC_NO_DEPRECATE',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
57 ],
58 }]
59 ],
bea4827 @ry More progress with gyp
ry authored
60 },
61
62 'variables': {
63 'v8_use_snapshot': 'true',
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
64 'target_arch': 'ia32',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
65 'node_use_dtrace': 'false',
66 'node_use_openssl': 'true'
bea4827 @ry More progress with gyp
ry authored
67 },
68
4f3c8b3 @ry WIP
ry authored
69 'targets': [
70 {
71 'target_name': 'node',
72 'type': 'executable',
bea4827 @ry More progress with gyp
ry authored
73
4f3c8b3 @ry WIP
ry authored
74 'dependencies': [
db1bf67 @ry Move GYP file to the project root
ry authored
75 'deps/http_parser/http_parser.gyp:http_parser',
76 'deps/v8/tools/gyp/v8.gyp:v8',
b9d7777 @DrPizza Fix MSVS building.
DrPizza authored
77 'deps/uv/all.gyp:uv',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
78 'node_js2c#host',
4f3c8b3 @ry WIP
ry authored
79 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
80
81 'include_dirs': [
db1bf67 @ry Move GYP file to the project root
ry authored
82 'src',
83 'deps/uv/src/ares',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
84 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
85 ],
86
4f3c8b3 @ry WIP
ry authored
87 'sources': [
db1bf67 @ry Move GYP file to the project root
ry authored
88 'src/cares_wrap.cc',
89 'src/handle_wrap.cc',
90 'src/node.cc',
91 'src/node_buffer.cc',
92 'src/node_constants.cc',
93 'src/node_dtrace.cc',
94 'src/node_extensions.cc',
95 'src/node_file.cc',
96 'src/node_http_parser.cc',
97 'src/node_javascript.cc',
98 'src/node_main.cc',
99 'src/node_os.cc',
100 'src/node_script.cc',
101 'src/node_string.cc',
102 'src/pipe_wrap.cc',
103 'src/stdio_wrap.cc',
104 'src/stream_wrap.cc',
105 'src/tcp_wrap.cc',
106 'src/timer_wrap.cc',
107 'src/process_wrap.cc',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
108 ],
109
110 'defines': [
111 'ARCH="<(target_arch)"',
112 'PLATFORM="<(OS)"',
113 '_LARGEFILE_SOURCE',
114 '_FILE_OFFSET_BITS=64',
4f3c8b3 @ry WIP
ry authored
115 ],
116
117 'conditions': [
a979ab9 @ry Improve gyp build - now works kind of
ry authored
118 [ 'node_use_openssl=="true"', {
119 'libraries': [ '-lssl', '-lcrypto' ],
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
120 'defines': [ 'HAVE_OPENSSL=1' ],
db1bf67 @ry Move GYP file to the project root
ry authored
121 'sources': [ 'src/node_crypto.cc' ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
122 }, {
123 'defines': [ 'HAVE_OPENSSL=0' ]
124 }],
125
4f3c8b3 @ry WIP
ry authored
126 [ 'OS=="win"', {
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
127 'dependencies': [
db1bf67 @ry Move GYP file to the project root
ry authored
128 'deps/uv/deps/pthread-win32/build/all.gyp:pthread-win32',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
129 ],
130 # openssl is not built using gyp, and needs to be
131 # built separately and placed outside the hierarchy.
132 # the dependencies aren't set up yet to put it in
133 # place, so I'm going to force it off indiscrimately
134 # for the time being. Because the above condition has
135 # already kicked in, it's not enough simply to turn
136 # 'node_use_openssl' off; I need to undo its effects
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
137 'node_use_openssl': 'false',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
138 'defines!': [ 'HAVE_OPENSSL=1' ],
139 'defines': [ 'HAVE_OPENSSL=0' ],
140 'libraries!': [ '-lssl', '-lcrypto' ],
db1bf67 @ry Move GYP file to the project root
ry authored
141 'sources!': [ 'src/node_crypto.cc' ],
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
142 'sources': [
db1bf67 @ry Move GYP file to the project root
ry authored
143 'src/platform_win32.cc',
144 'src/node_stdio_win32.cc',
79d9f62 @DrPizza Fix bad platform name.
DrPizza authored
145 # file operations depend on eio to link. uv contains eio in unix builds, but not win32. So we need to compile it here instead.
db1bf67 @ry Move GYP file to the project root
ry authored
146 'deps/uv/src/eio/eio.c',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
147 ],
4f3c8b3 @ry WIP
ry authored
148 'defines': [
79d9f62 @DrPizza Fix bad platform name.
DrPizza authored
149 'PTW32_STATIC_LIB',
6ac8c55 @DrPizza Make MSVS build.
DrPizza authored
150 'FD_SETSIZE=1024',
79d9f62 @DrPizza Fix bad platform name.
DrPizza authored
151 # we need to use node's preferred "win32" rather than gyp's preferred "win"
152 'PLATFORM="win32"',
4f3c8b3 @ry WIP
ry authored
153 ],
154 'libraries': [
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
155 '-lws2_32.lib',
156 '-lwinmm.lib',
4f3c8b3 @ry WIP
ry authored
157 ],
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
158 'msvs_settings': {
159 'VCCLCompilerTool': {
160 'WarningLevel': '3',
161 },
162 },
4f3c8b3 @ry WIP
ry authored
163 },{ # POSIX
a979ab9 @ry Improve gyp build - now works kind of
ry authored
164 'defines': [ '__POSIX__' ],
4f3c8b3 @ry WIP
ry authored
165 'sources': [
db1bf67 @ry Move GYP file to the project root
ry authored
166 'src/node_cares.cc',
167 'src/node_net.cc',
168 'src/node_signal_watcher.cc',
169 'src/node_stat_watcher.cc',
170 'src/node_io_watcher.cc',
171 'src/node_stdio.cc',
172 'src/node_child_process.cc',
173 'src/node_timer.cc'
4f3c8b3 @ry WIP
ry authored
174 ]
175 }],
176 [ 'OS=="mac"', {
db1bf67 @ry Move GYP file to the project root
ry authored
177 'sources': [ 'src/platform_darwin.cc' ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
178 'libraries': [ '-framework Carbon' ],
4f3c8b3 @ry WIP
ry authored
179 }]
180 ]
181 },
182
183 {
184 'target_name': 'node_js2c',
185 'type': 'none',
186 'toolsets': ['host'],
187 'variables': {
188 'library_files': [
db1bf67 @ry Move GYP file to the project root
ry authored
189 'src/node.js',
190 'lib/_debugger.js',
191 'lib/_linklist.js',
192 'lib/assert.js',
193 'lib/buffer.js',
194 'lib/buffer_ieee754.js',
195 'lib/child_process_legacy.js',
196 'lib/child_process_uv.js',
197 'lib/console.js',
198 'lib/constants.js',
199 'lib/crypto.js',
200 'lib/dgram.js',
201 'lib/dns_legacy.js',
202 'lib/dns_uv.js',
203 'lib/events.js',
204 'lib/freelist.js',
205 'lib/fs.js',
206 'lib/http.js',
207 'lib/http2.js',
208 'lib/https.js',
209 'lib/https2.js',
210 'lib/module.js',
211 'lib/net_legacy.js',
212 'lib/net_uv.js',
213 'lib/os.js',
214 'lib/path.js',
215 'lib/punycode.js',
216 'lib/querystring.js',
217 'lib/readline.js',
218 'lib/repl.js',
219 'lib/stream.js',
220 'lib/string_decoder.js',
221 'lib/sys.js',
222 'lib/timers_legacy.js',
223 'lib/timers_uv.js',
224 'lib/tls.js',
225 'lib/tty.js',
226 'lib/tty_posix.js',
227 'lib/tty_win32.js',
228 'lib/url.js',
229 'lib/util.js',
230 'lib/vm.js',
4f3c8b3 @ry WIP
ry authored
231 ],
232 },
a979ab9 @ry Improve gyp build - now works kind of
ry authored
233
4f3c8b3 @ry WIP
ry authored
234 'actions': [
43d7cfc @ry gyp: fix test runner
ry authored
235
4f3c8b3 @ry WIP
ry authored
236 {
237 'action_name': 'node_js2c',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
238
4f3c8b3 @ry WIP
ry authored
239 'inputs': [
db1bf67 @ry Move GYP file to the project root
ry authored
240 './tools/js2c.py',
4f3c8b3 @ry WIP
ry authored
241 '<@(library_files)',
242 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
243
4f3c8b3 @ry WIP
ry authored
244 'outputs': [
245 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
246 ],
a979ab9 @ry Improve gyp build - now works kind of
ry authored
247
248 # FIXME can the following conditions be shorted by just setting
249 # macros.py into some variable which then gets included in the
250 # action?
251
252 'conditions': [
253 [ 'node_use_dtrace=="true"', {
254 'action': [
255 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
256 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
257 '<@(_outputs)',
258 '<@(library_files)'
259 ],
260 }, { # No Dtrace
261 'action': [
262 'python',
db1bf67 @ry Move GYP file to the project root
ry authored
263 'tools/js2c.py',
a979ab9 @ry Improve gyp build - now works kind of
ry authored
264 '<@(_outputs)',
265 '<@(library_files)',
db1bf67 @ry Move GYP file to the project root
ry authored
266 'src/macros.py'
a979ab9 @ry Improve gyp build - now works kind of
ry authored
267 ],
268 }]
71333b3 @DrPizza Modify GYP scripts for VC build
DrPizza authored
269 ],
270 'msvs_cygwin_shell': 0,
4f3c8b3 @ry WIP
ry authored
271 },
272 ],
273 }, # end node_js2c
274 ] # end targets
275 }
276
Something went wrong with that request. Please try again.