3 'uv_use_dtrace%': 'false',
4 # uv_parent_path is the relative path to libuv in the parent project
5 # this is only relevant when dtrace is enabled and libuv is a child project
6 # as it's necessary to correctly locate the object files for post
16 '_FILE_OFFSET_BITS=64',
21 'cflags': [ '-pthreads' ],
23 'cflags': [ '-pthread' ],
32 'target_name': 'libuv',
39 'direct_dependent_settings': {
40 'include_dirs': [ 'include' ],
45 '_FILE_OFFSET_BITS=64',
49 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
52 'defines': [ '_POSIX_C_SOURCE=200112' ],
62 'include/uv-private/ngx-queue.h',
63 'include/uv-private/tree.h',
73 '_WIN32_WINNT=0x0600',
77 'include/uv-private/uv-win.h',
79 'src/win/atomicops-inl.h',
85 'src/win/getaddrinfo.c',
87 'src/win/handle-inl.h',
89 'src/win/loop-watcher.c',
94 'src/win/process-stdio.c',
99 'src/win/stream-inl.h',
102 'src/win/threadpool.c',
120 }, { # Not Windows i.e. POSIX
127 '-Wno-unused-parameter',
130 'include/uv-private/uv-unix.h',
131 'include/uv-private/uv-linux.h',
132 'include/uv-private/uv-sunos.h',
133 'include/uv-private/uv-darwin.h',
134 'include/uv-private/uv-bsd.h',
140 'src/unix/getaddrinfo.c',
141 'src/unix/internal.h',
143 'src/unix/loop-watcher.c',
146 'src/unix/process.c',
151 'src/unix/threadpool.c',
157 'libraries': [ '-lm' ],
160 'ldflags': [ '-pthreads' ],
162 'ldflags': [ '-pthread' ],
167 ['library=="shared_library"', {
168 'cflags': [ '-fPIC' ],
170 ['library=="shared_library" and OS!="mac"', {
172 # Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
174 'libraries': [ '-Wl,-soname,libuv.so.0.10' ],
179 [ 'OS=="linux" or OS=="mac"', {
180 'sources': [ 'src/unix/proctitle.c' ],
185 'src/unix/fsevents.c',
186 'src/unix/darwin-proctitle.c',
190 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
191 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
192 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
196 '_DARWIN_USE_64_BIT_INODE=1',
200 # Enable on all platforms except OS X. The antique gcc/clang that
201 # ships with Xcode emits waaaay too many false positives.
202 'cflags': [ '-Wstrict-aliasing' ],
206 'src/unix/linux-core.c',
207 'src/unix/linux-inotify.c',
208 'src/unix/linux-syscalls.c',
209 'src/unix/linux-syscalls.h',
212 'libraries': [ '-ldl', '-lrt' ],
216 'sources': [ 'src/unix/sunos.c' ],
231 'include_dirs': [ 'src/ares/config_aix' ],
232 'sources': [ 'src/unix/aix.c' ],
243 [ 'OS=="freebsd" or OS=="dragonflybsd"', {
244 'sources': [ 'src/unix/freebsd.c' ],
247 'sources': [ 'src/unix/openbsd.c' ],
250 'sources': [ 'src/unix/netbsd.c' ],
252 [ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
254 'libraries': [ '-lkvm' ],
257 [ 'OS in "mac freebsd dragonflybsd openbsd netbsd".split()', {
258 'sources': [ 'src/unix/kqueue.c' ],
260 ['library=="shared_library"', {
261 'defines': [ 'BUILDING_UV_SHARED=1' ]
263 ['uv_use_dtrace=="true"', {
264 'defines': [ 'HAVE_DTRACE=1' ],
265 'dependencies': [ 'uv_dtrace_header' ],
266 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
269 'sources': ['src/unix/dtrace.c' ],
277 'target_name': 'run-tests',
278 'type': 'executable',
279 'dependencies': [ 'libuv' ],
281 'test/blackhole-server.c',
282 'test/echo-server.c',
286 'test/test-get-loadavg.c',
289 'test/test-active.c',
291 'test/test-callback-stack.c',
292 'test/test-callback-order.c',
293 'test/test-connection-fail.c',
294 'test/test-cwd-and-chdir.c',
295 'test/test-delayed-accept.c',
298 'test/test-fail-always.c',
300 'test/test-fs-event.c',
301 'test/test-get-currentexe.c',
302 'test/test-get-memory.c',
303 'test/test-getaddrinfo.c',
304 'test/test-getsockname.c',
305 'test/test-hrtime.c',
308 'test/test-ipc-send-recv.c',
310 'test/test-loop-handles.c',
311 'test/test-loop-stop.c',
312 'test/test-walk-handles.c',
313 'test/test-watcher-cross-stop.c',
314 'test/test-multiple-listen.c',
315 'test/test-osx-select.c',
316 'test/test-pass-always.c',
317 'test/test-ping-pong.c',
318 'test/test-pipe-bind-error.c',
319 'test/test-pipe-connect-error.c',
320 'test/test-platform-output.c',
322 'test/test-poll-close.c',
323 'test/test-process-title.c',
325 'test/test-run-nowait.c',
326 'test/test-run-once.c',
327 'test/test-semaphore.c',
328 'test/test-shutdown-close.c',
329 'test/test-shutdown-eof.c',
330 'test/test-signal.c',
331 'test/test-signal-multiple-loops.c',
333 'test/test-fs-poll.c',
334 'test/test-stdio-over-pipes.c',
335 'test/test-tcp-bind-error.c',
336 'test/test-tcp-bind6-error.c',
337 'test/test-tcp-close.c',
338 'test/test-tcp-close-accept.c',
339 'test/test-tcp-close-while-connecting.c',
340 'test/test-tcp-connect-error-after-write.c',
341 'test/test-tcp-shutdown-after-write.c',
342 'test/test-tcp-flags.c',
343 'test/test-tcp-connect-error.c',
344 'test/test-tcp-connect-timeout.c',
345 'test/test-tcp-connect6-error.c',
346 'test/test-tcp-open.c',
347 'test/test-tcp-write-to-half-open-connection.c',
348 'test/test-tcp-writealot.c',
349 'test/test-tcp-unexpected-read.c',
350 'test/test-tcp-read-stop.c',
351 'test/test-threadpool.c',
352 'test/test-threadpool-cancel.c',
353 'test/test-mutexes.c',
354 'test/test-thread.c',
355 'test/test-barrier.c',
356 'test/test-condvar.c',
357 'test/test-timer-again.c',
358 'test/test-timer-from-check.c',
361 'test/test-udp-dgram-too-big.c',
362 'test/test-udp-ipv6.c',
363 'test/test-udp-open.c',
364 'test/test-udp-options.c',
365 'test/test-udp-send-and-recv.c',
366 'test/test-udp-multicast-join.c',
367 'test/test-dlerror.c',
368 'test/test-udp-multicast-ttl.c',
376 'libraries': [ 'ws2_32.lib' ]
378 'defines': [ '_GNU_SOURCE' ],
380 'test/runner-unix.c',
381 'test/runner-unix.h',
384 [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
390 [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
399 'SubSystem': 1, # /subsystem:console
405 'target_name': 'run-benchmarks',
406 'type': 'executable',
407 'dependencies': [ 'libuv' ],
409 'test/benchmark-async.c',
410 'test/benchmark-async-pummel.c',
411 'test/benchmark-fs-stat.c',
412 'test/benchmark-getaddrinfo.c',
413 'test/benchmark-list.h',
414 'test/benchmark-loop-count.c',
415 'test/benchmark-million-async.c',
416 'test/benchmark-million-timers.c',
417 'test/benchmark-multi-accept.c',
418 'test/benchmark-ping-pongs.c',
419 'test/benchmark-pound.c',
420 'test/benchmark-pump.c',
421 'test/benchmark-sizes.c',
422 'test/benchmark-spawn.c',
423 'test/benchmark-thread.c',
424 'test/benchmark-tcp-write-batch.c',
425 'test/benchmark-udp-pummel.c',
427 'test/echo-server.c',
428 'test/blackhole-server.c',
429 'test/run-benchmarks.c',
440 'libraries': [ 'ws2_32.lib' ]
442 'defines': [ '_GNU_SOURCE' ],
444 'test/runner-unix.c',
445 'test/runner-unix.h',
451 'SubSystem': 1, # /subsystem:console
457 'target_name': 'uv_dtrace_header',
460 [ 'uv_use_dtrace=="true"', {
463 'action_name': 'uv_dtrace_header',
464 'inputs': [ 'src/unix/uv-dtrace.d' ],
465 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/uv-dtrace.h' ],
466 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
467 '-o', '<@(_outputs)' ],
475 'target_name': 'uv_dtrace_provider',
478 [ 'uv_use_dtrace=="true" and OS!="mac"', {
481 'action_name': 'uv_dtrace_o',
483 'src/unix/uv-dtrace.d',
484 '<(PRODUCT_DIR)/obj.target/libuv/<(uv_parent_path)/src/unix/core.o',
487 '<(PRODUCT_DIR)/obj.target/libuv/<(uv_parent_path)/src/unix/dtrace.o',
489 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
490 '-o', '<@(_outputs)' ]