0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/deps/uv/uv.gyp

358 lines
9.8 KiB
Plaintext
Raw Normal View History

2011-08-10 23:23:26 +02:00
{
'variables': {
2011-10-12 17:32:47 +02:00
'conditions': [
['OS=="win"', {
'shared_unix_defines': [ ],
}, {
'shared_unix_defines': [
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
2011-10-12 17:32:47 +02:00
],
}],
['OS in "mac ios"', {
'shared_mac_defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
}, {
'shared_mac_defines': [ ],
}],
['OS=="zos"', {
'shared_zos_defines': [
'_UNIX03_THREADS',
'_UNIX03_SOURCE',
'_UNIX03_WITHDRAWN',
'_OPEN_SYS_IF_EXT',
'_OPEN_SYS_SOCK_IPV6',
'_OPEN_MSGQ_EXT',
'_XOPEN_SOURCE_EXTENDED',
'_ALL_SOURCE',
'_LARGE_TIME_API',
'_OPEN_SYS_FILE_EXT',
'_AE_BIMODAL',
'PATH_MAX=255'
2011-10-29 01:06:09 +02:00
],
}, {
'shared_zos_defines': [ ],
2011-10-12 17:32:47 +02:00
}],
],
},
2011-08-10 23:23:26 +02:00
'targets': [
{
2012-10-11 14:36:23 +02:00
'target_name': 'libuv',
2014-02-27 03:08:30 +01:00
'type': '<(uv_library)',
2011-08-30 00:23:13 +02:00
'include_dirs': [
'include',
'src/',
],
'defines': [
'<@(shared_mac_defines)',
'<@(shared_unix_defines)',
'<@(shared_zos_defines)',
],
2011-08-10 23:23:26 +02:00
'direct_dependent_settings': {
'defines': [
'<@(shared_mac_defines)',
'<@(shared_unix_defines)',
'<@(shared_zos_defines)',
],
2011-08-10 23:23:26 +02:00
'include_dirs': [ 'include' ],
2012-03-05 15:38:43 +01:00
'conditions': [
2013-01-22 16:21:25 +01:00
['OS == "linux"', {
'defines': [ '_POSIX_C_SOURCE=200112' ],
2012-11-04 01:25:06 +01:00
}],
2012-03-05 15:38:43 +01:00
],
2011-08-10 23:23:26 +02:00
},
'sources': [
2011-10-29 01:06:09 +02:00
'common.gypi',
2011-08-10 23:23:26 +02:00
'include/uv.h',
'include/uv/tree.h',
'include/uv/errno.h',
'include/uv/threadpool.h',
'include/uv/version.h',
2012-06-18 22:57:29 +02:00
'src/fs-poll.c',
2014-02-27 03:08:30 +01:00
'src/heap-inl.h',
'src/idna.c',
'src/idna.h',
2012-08-07 01:25:06 +02:00
'src/inet.c',
2013-03-29 16:10:56 +01:00
'src/queue.h',
'src/strscpy.c',
'src/strscpy.h',
2014-08-07 13:03:17 +02:00
'src/threadpool.c',
'src/timer.c',
'src/uv-data-getter-setters.c',
2011-08-10 23:23:26 +02:00
'src/uv-common.c',
'src/uv-common.h',
2013-03-28 00:28:45 +01:00
'src/version.c'
2011-08-10 23:23:26 +02:00
],
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'WARNING_CFLAGS': [
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
'-Wstrict-prototypes',
],
'OTHER_CFLAGS': [ '-g', '--std=gnu89', '-pedantic' ],
},
2011-08-10 23:23:26 +02:00
'conditions': [
[ 'OS=="win"', {
'defines': [
2012-02-12 16:12:04 +01:00
'_WIN32_WINNT=0x0600',
2011-08-10 23:23:26 +02:00
'_GNU_SOURCE',
],
'sources': [
'include/uv/win.h',
2011-08-10 23:23:26 +02:00
'src/win/async.c',
2012-08-20 18:41:07 +02:00
'src/win/atomicops-inl.h',
2011-08-10 23:23:26 +02:00
'src/win/core.c',
'src/win/detect-wakeup.c',
2011-10-29 01:06:09 +02:00
'src/win/dl.c',
2011-08-10 23:23:26 +02:00
'src/win/error.c',
2011-08-30 00:23:13 +02:00
'src/win/fs.c',
2011-09-23 04:41:43 +02:00
'src/win/fs-event.c',
2011-08-10 23:23:26 +02:00
'src/win/getaddrinfo.c',
2014-06-27 02:44:36 +02:00
'src/win/getnameinfo.c',
2011-08-10 23:23:26 +02:00
'src/win/handle.c',
2012-06-05 15:45:46 +02:00
'src/win/handle-inl.h',
2011-08-10 23:23:26 +02:00
'src/win/internal.h',
'src/win/loop-watcher.c',
'src/win/pipe.c',
2011-11-18 13:07:01 +01:00
'src/win/thread.c',
'src/win/poll.c',
2011-08-10 23:23:26 +02:00
'src/win/process.c',
2012-06-14 01:24:43 +02:00
'src/win/process-stdio.c',
2012-06-05 15:45:46 +02:00
'src/win/req-inl.h',
2012-08-20 18:41:07 +02:00
'src/win/signal.c',
'src/win/snprintf.c',
2011-08-10 23:23:26 +02:00
'src/win/stream.c',
2012-06-05 15:45:46 +02:00
'src/win/stream-inl.h',
2011-08-10 23:23:26 +02:00
'src/win/tcp.c',
2011-09-12 23:53:27 +02:00
'src/win/tty.c',
2011-08-23 02:34:43 +02:00
'src/win/udp.c',
2011-08-10 23:23:26 +02:00
'src/win/util.c',
2011-08-12 10:14:04 +02:00
'src/win/winapi.c',
2011-08-22 23:51:29 +02:00
'src/win/winapi.h',
'src/win/winsock.c',
'src/win/winsock.h',
],
'link_settings': {
'libraries': [
2014-08-07 13:03:17 +02:00
'-ladvapi32',
'-liphlpapi',
'-lpsapi',
'-lshell32',
'-luser32',
'-luserenv',
2014-08-07 13:03:17 +02:00
'-lws2_32'
],
},
2011-08-10 23:23:26 +02:00
}, { # Not Windows i.e. POSIX
'sources': [
'include/uv/unix.h',
'include/uv/linux.h',
'include/uv/sunos.h',
'include/uv/darwin.h',
'include/uv/bsd.h',
'include/uv/aix.h',
2012-04-29 00:22:01 +02:00
'src/unix/async.c',
2013-10-30 00:33:17 +01:00
'src/unix/atomic-ops.h',
2012-04-29 00:22:01 +02:00
'src/unix/core.c',
2011-10-29 01:06:09 +02:00
'src/unix/dl.c',
2012-04-29 00:22:01 +02:00
'src/unix/fs.c',
2012-10-06 23:04:30 +02:00
'src/unix/getaddrinfo.c',
2014-06-27 02:44:36 +02:00
'src/unix/getnameinfo.c',
2012-04-29 00:22:01 +02:00
'src/unix/internal.h',
'src/unix/loop.c',
2012-05-24 23:26:32 +02:00
'src/unix/loop-watcher.c',
2012-04-29 00:22:01 +02:00
'src/unix/pipe.c',
'src/unix/poll.c',
2012-04-29 00:22:01 +02:00
'src/unix/process.c',
2012-08-20 18:41:07 +02:00
'src/unix/signal.c',
2013-10-30 00:33:17 +01:00
'src/unix/spinlock.h',
2012-04-29 00:22:01 +02:00
'src/unix/stream.c',
'src/unix/tcp.c',
'src/unix/thread.c',
'src/unix/tty.c',
'src/unix/udp.c',
2011-08-10 23:23:26 +02:00
],
2012-11-16 17:57:15 +01:00
'link_settings': {
'libraries': [ '-lm' ],
'conditions': [
['OS=="solaris"', {
'ldflags': [ '-pthreads' ],
2013-06-26 19:48:10 +02:00
}],
[ 'OS=="zos" and uv_library=="shared_library"', {
'ldflags': [ '-Wl,DLL' ],
}],
['OS != "solaris" and OS != "android" and OS != "zos"', {
2012-11-16 17:57:15 +01:00
'ldflags': [ '-pthread' ],
}],
],
},
'conditions': [
2014-02-27 03:08:30 +01:00
['uv_library=="shared_library"', {
'conditions': [
['OS=="zos"', {
'cflags': [ '-qexportall' ],
}, {
'cflags': [ '-fPIC' ],
}],
],
2012-11-16 17:57:15 +01:00
}],
['uv_library=="shared_library" and OS!="mac" and OS!="zos"', {
# This will cause gyp to set soname
# Must correspond with UV_VERSION_MAJOR
# in include/uv/version.h
'product_extension': 'so.1',
2013-05-15 02:13:42 +02:00
}],
2012-11-16 17:57:15 +01:00
],
2011-08-10 23:23:26 +02:00
}],
[ 'OS in "linux mac ios android zos"', {
2013-02-24 04:03:49 +01:00
'sources': [ 'src/unix/proctitle.c' ],
}],
[ 'OS != "zos"', {
'cflags': [
'-fvisibility=hidden',
'-g',
'--std=gnu89',
'-pedantic',
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
'-Wstrict-prototypes',
],
}],
[ 'OS in "mac ios"', {
2013-02-24 04:03:49 +01:00
'sources': [
'src/unix/darwin.c',
'src/unix/fsevents.c',
'src/unix/darwin-proctitle.c'
2013-02-24 04:03:49 +01:00
],
2011-08-10 23:23:26 +02:00
'defines': [
2012-04-29 00:22:01 +02:00
'_DARWIN_USE_64_BIT_INODE=1',
2014-09-19 19:37:55 +02:00
'_DARWIN_UNLIMITED_SELECT=1',
2011-08-10 23:23:26 +02:00
]
}],
[ 'OS=="linux"', {
'defines': [ '_GNU_SOURCE' ],
2012-02-28 18:11:48 +01:00
'sources': [
2013-02-20 21:12:18 +01:00
'src/unix/linux-core.c',
'src/unix/linux-inotify.c',
'src/unix/linux-syscalls.c',
'src/unix/linux-syscalls.h',
'src/unix/procfs-exepath.c',
'src/unix/sysinfo-loadavg.c',
'src/unix/sysinfo-memory.c',
2012-02-28 18:11:48 +01:00
],
2012-11-16 17:57:15 +01:00
'link_settings': {
'libraries': [ '-ldl', '-lrt' ],
2011-08-10 23:23:26 +02:00
},
}],
2013-06-26 19:48:10 +02:00
[ 'OS=="android"', {
'sources': [
'src/unix/linux-core.c',
'src/unix/linux-inotify.c',
'src/unix/linux-syscalls.c',
'src/unix/linux-syscalls.h',
'src/unix/pthread-fixes.c',
'src/unix/android-ifaddrs.c',
'src/unix/procfs-exepath.c',
'src/unix/sysinfo-loadavg.c',
'src/unix/sysinfo-memory.c',
2013-06-26 19:48:10 +02:00
],
'link_settings': {
'libraries': [ '-ldl' ],
},
}],
2011-09-12 23:45:00 +02:00
[ 'OS=="solaris"', {
'sources': [
'src/unix/no-proctitle.c',
'src/unix/sunos.c',
],
2011-09-12 23:45:00 +02:00
'defines': [
'__EXTENSIONS__',
'_XOPEN_SOURCE=500',
],
2012-11-16 17:57:15 +01:00
'link_settings': {
2011-10-05 01:53:17 +02:00
'libraries': [
2011-10-11 02:05:18 +02:00
'-lkstat',
2011-10-05 01:53:17 +02:00
'-lnsl',
2012-10-06 23:04:30 +02:00
'-lsendfile',
'-lsocket',
2011-10-05 01:53:17 +02:00
],
2011-09-12 23:45:00 +02:00
},
}],
2012-09-14 02:56:41 +02:00
[ 'OS=="aix"', {
'variables': {
'os_name': '<!(uname -s)',
},
'sources': [
'src/unix/aix-common.c',
],
2012-09-14 02:56:41 +02:00
'defines': [
'_ALL_SOURCE',
'_XOPEN_SOURCE=500',
2014-08-07 13:03:17 +02:00
'_LINUX_SOURCE_COMPAT',
'_THREAD_SAFE',
2012-09-14 02:56:41 +02:00
],
'conditions': [
[ '"<(os_name)"=="OS400"', {
'sources': [
'src/unix/ibmi.c',
'src/unix/posix-poll.c',
'src/unix/no-fsevents.c',
'src/unix/no-proctitle.c',
],
}, {
'sources': [
'src/unix/aix.c'
],
'defines': [
'HAVE_SYS_AHAFS_EVPRODS_H'
],
'link_settings': {
'libraries': [
'-lperfstat',
],
},
}],
]
2012-09-14 02:56:41 +02:00
}],
2012-11-20 20:11:08 +01:00
[ 'OS=="freebsd" or OS=="dragonflybsd"', {
2011-08-17 06:45:21 +02:00
'sources': [ 'src/unix/freebsd.c' ],
}],
2011-10-15 00:42:10 +02:00
[ 'OS=="openbsd"', {
'sources': [ 'src/unix/openbsd.c' ],
}],
2012-09-13 16:18:54 +02:00
[ 'OS=="netbsd"', {
2012-11-16 17:57:15 +01:00
'link_settings': {
2013-05-11 00:30:53 +02:00
'libraries': [ '-lkvm' ],
2012-09-13 16:18:54 +02:00
},
'sources': [ 'src/unix/netbsd.c' ],
}],
[ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
'sources': [
'src/unix/posix-hrtime.c',
'src/unix/bsd-proctitle.c'
],
2012-09-13 16:18:54 +02:00
}],
[ 'OS in "ios mac freebsd dragonflybsd openbsd netbsd".split()', {
'sources': [
'src/unix/bsd-ifaddrs.c',
'src/unix/kqueue.c',
],
2011-10-05 01:53:17 +02:00
}],
2014-02-27 03:08:30 +01:00
['uv_library=="shared_library"', {
2012-10-06 23:04:30 +02:00
'defines': [ 'BUILDING_UV_SHARED=1' ]
2013-04-12 17:43:05 +02:00
}],
['OS=="zos"', {
'sources': [
'src/unix/pthread-fixes.c',
'src/unix/os390.c',
'src/unix/os390-syscalls.c'
]
}],
2011-08-10 23:23:26 +02:00
]
},
]
}