2011-08-10 23:23:26 +02:00
|
|
|
{
|
2018-02-21 21:42:26 +01:00
|
|
|
'variables': {
|
2011-10-12 17:32:47 +02:00
|
|
|
'conditions': [
|
2018-02-21 21:42:26 +01:00
|
|
|
['OS=="win"', {
|
2018-04-02 19:33:48 +02:00
|
|
|
'shared_unix_defines': [ ],
|
|
|
|
}, {
|
2018-02-21 21:42:26 +01:00
|
|
|
'shared_unix_defines': [
|
2011-12-16 00:56:42 +01:00
|
|
|
'_LARGEFILE_SOURCE',
|
|
|
|
'_FILE_OFFSET_BITS=64',
|
2011-10-12 17:32:47 +02:00
|
|
|
],
|
2018-02-21 21:42:26 +01: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
|
|
|
],
|
2018-02-21 21:42:26 +01: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/',
|
|
|
|
],
|
2018-02-21 21:42:26 +01:00
|
|
|
'defines': [
|
|
|
|
'<@(shared_mac_defines)',
|
|
|
|
'<@(shared_unix_defines)',
|
|
|
|
'<@(shared_zos_defines)',
|
|
|
|
],
|
2011-08-10 23:23:26 +02:00
|
|
|
'direct_dependent_settings': {
|
2018-02-21 21:42:26 +01:00
|
|
|
'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',
|
2018-06-22 17:28:11 +02:00
|
|
|
'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',
|
2018-11-13 05:59:52 +01:00
|
|
|
'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',
|
2018-12-16 20:18:16 +01:00
|
|
|
'src/strscpy.c',
|
|
|
|
'src/strscpy.h',
|
2014-08-07 13:03:17 +02:00
|
|
|
'src/threadpool.c',
|
2018-07-10 04:16:25 +02:00
|
|
|
'src/timer.c',
|
2018-01-19 21:33:43 +01:00
|
|
|
'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
|
|
|
],
|
2018-02-21 21:42:26 +01: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': [
|
2018-06-22 17:28:11 +02:00
|
|
|
'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',
|
2016-10-25 04:13:07 +02:00
|
|
|
'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',
|
2012-05-17 07:13:29 +02:00
|
|
|
'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',
|
2016-04-01 11:19:19 +02:00
|
|
|
'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',
|
2011-08-13 20:17:47 +02:00
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
2014-08-07 13:03:17 +02:00
|
|
|
'-ladvapi32',
|
|
|
|
'-liphlpapi',
|
|
|
|
'-lpsapi',
|
|
|
|
'-lshell32',
|
2016-05-17 00:25:23 +02:00
|
|
|
'-luser32',
|
2015-06-03 21:18:55 +02:00
|
|
|
'-luserenv',
|
2014-08-07 13:03:17 +02:00
|
|
|
'-lws2_32'
|
2011-08-13 20:17:47 +02:00
|
|
|
],
|
|
|
|
},
|
2011-08-10 23:23:26 +02:00
|
|
|
}, { # Not Windows i.e. POSIX
|
|
|
|
'sources': [
|
2018-06-22 17:28:11 +02:00
|
|
|
'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',
|
2012-05-17 07:13:29 +02:00
|
|
|
'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
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
[ 'OS=="zos" and uv_library=="shared_library"', {
|
2016-10-25 04:13:07 +02:00
|
|
|
'ldflags': [ '-Wl,DLL' ],
|
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
['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"', {
|
2016-10-25 04:13:07 +02:00
|
|
|
'conditions': [
|
2017-10-03 01:44:44 +02:00
|
|
|
['OS=="zos"', {
|
2016-10-25 04:13:07 +02:00
|
|
|
'cflags': [ '-qexportall' ],
|
|
|
|
}, {
|
|
|
|
'cflags': [ '-fPIC' ],
|
|
|
|
}],
|
|
|
|
],
|
2012-11-16 17:57:15 +01:00
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
['uv_library=="shared_library" and OS!="mac" and OS!="zos"', {
|
2015-05-06 09:46:15 +02:00
|
|
|
# This will cause gyp to set soname
|
|
|
|
# Must correspond with UV_VERSION_MAJOR
|
2018-06-22 17:28:11 +02:00
|
|
|
# in include/uv/version.h
|
2015-05-06 09:46:15 +02:00
|
|
|
'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
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
[ 'OS in "linux mac ios android zos"', {
|
2013-02-24 04:03:49 +01:00
|
|
|
'sources': [ 'src/unix/proctitle.c' ],
|
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
[ 'OS != "zos"', {
|
2016-10-25 04:13:07 +02:00
|
|
|
'cflags': [
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
'-g',
|
|
|
|
'--std=gnu89',
|
|
|
|
'-pedantic',
|
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wno-unused-parameter',
|
2017-05-30 19:19:11 +02:00
|
|
|
'-Wstrict-prototypes',
|
2016-10-25 04:13:07 +02:00
|
|
|
],
|
|
|
|
}],
|
2015-05-06 09:46:15 +02:00
|
|
|
[ 'OS in "mac ios"', {
|
2013-02-24 04:03:49 +01:00
|
|
|
'sources': [
|
|
|
|
'src/unix/darwin.c',
|
|
|
|
'src/unix/fsevents.c',
|
2017-09-06 15:59:10 +02:00
|
|
|
'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"', {
|
2015-01-28 22:14:19 +01:00
|
|
|
'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',
|
2017-05-30 19:19:11 +02:00
|
|
|
'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',
|
2016-05-17 00:25:23 +02:00
|
|
|
'src/unix/android-ifaddrs.c',
|
2017-05-30 19:19:11 +02:00
|
|
|
'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"', {
|
2017-05-30 19:19:11 +02:00
|
|
|
'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"', {
|
2017-12-01 03:41:16 +01:00
|
|
|
'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',
|
2016-04-01 11:19:19 +02:00
|
|
|
'_THREAD_SAFE',
|
2012-09-14 02:56:41 +02:00
|
|
|
],
|
2017-12-01 03:41:16 +01: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
|
|
|
},
|
2017-07-07 01:12:45 +02:00
|
|
|
'sources': [ 'src/unix/netbsd.c' ],
|
|
|
|
}],
|
|
|
|
[ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
|
2018-11-13 05:59:52 +01:00
|
|
|
'sources': [
|
|
|
|
'src/unix/posix-hrtime.c',
|
|
|
|
'src/unix/bsd-proctitle.c'
|
|
|
|
],
|
2012-09-13 16:18:54 +02:00
|
|
|
}],
|
2015-05-06 09:46:15 +02:00
|
|
|
[ 'OS in "ios mac freebsd dragonflybsd openbsd netbsd".split()', {
|
2017-05-30 19:19:11 +02:00
|
|
|
'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
|
|
|
}],
|
2017-10-03 01:44:44 +02:00
|
|
|
['OS=="zos"', {
|
2016-10-25 04:13:07 +02:00
|
|
|
'sources': [
|
|
|
|
'src/unix/pthread-fixes.c',
|
2017-02-01 02:06:00 +01:00
|
|
|
'src/unix/os390.c',
|
|
|
|
'src/unix/os390-syscalls.c'
|
2016-10-25 04:13:07 +02:00
|
|
|
]
|
|
|
|
}],
|
2011-08-10 23:23:26 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|