mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Problem: can't build libzmq.a using gyp
Solution: add necessary macros into builds/gyp/platform.hpp Work for Linux now, other platforms to test.
This commit is contained in:
parent
fde81d7e07
commit
6bef3fe9ad
2
.gitignore
vendored
2
.gitignore
vendored
@ -174,4 +174,4 @@ build
|
|||||||
test-suite.log
|
test-suite.log
|
||||||
project.Makefile
|
project.Makefile
|
||||||
libzmq.target.mk
|
libzmq.target.mk
|
||||||
|
out/
|
||||||
|
@ -40,29 +40,33 @@
|
|||||||
#if defined ZMQ_HAVE_WINDOWS
|
#if defined ZMQ_HAVE_WINDOWS
|
||||||
# define ZMQ_USE_SELECT 1
|
# define ZMQ_USE_SELECT 1
|
||||||
|
|
||||||
#elseif defined ZMQ_HAVE_OSX
|
#elif defined ZMQ_HAVE_OSX
|
||||||
# define ZMQ_USE_KQUEUE 1
|
# define ZMQ_USE_KQUEUE 1
|
||||||
# define ZMQ_HAVE_UIO 1
|
# define HAVE_POSIX_MEMALIGN 1
|
||||||
# define ZMQ_HAVE_SO_KEEPALIVE 1
|
# define ZMQ_HAVE_SO_KEEPALIVE 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPALIVE 1
|
# define ZMQ_HAVE_TCP_KEEPALIVE 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPCNT 1
|
# define ZMQ_HAVE_TCP_KEEPCNT 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPINTVL 1
|
# define ZMQ_HAVE_TCP_KEEPINTVL 1
|
||||||
# define HAVE_POSIX_MEMALIGN 1
|
# define ZMQ_HAVE_UIO 1
|
||||||
# define HAVE_FORK 1
|
# define HAVE_FORK 1
|
||||||
|
|
||||||
#elseif defined ZMQ_HAVE_LINUX
|
#elif defined ZMQ_HAVE_LINUX
|
||||||
# define ZMQ_USE_EPOLL 1
|
# define ZMQ_USE_EPOLL 1
|
||||||
|
# define HAVE_POSIX_MEMALIGN 1
|
||||||
# define ZMQ_HAVE_EVENTFD 1
|
# define ZMQ_HAVE_EVENTFD 1
|
||||||
|
# define ZMQ_HAVE_IFADDRS 1
|
||||||
# define ZMQ_HAVE_SOCK_CLOEXEC 1
|
# define ZMQ_HAVE_SOCK_CLOEXEC 1
|
||||||
# define ZMQ_HAVE_SO_PEERCRED 1
|
|
||||||
# define ZMQ_HAVE_UIO 1
|
|
||||||
# define ZMQ_HAVE_SO_KEEPALIVE 1
|
# define ZMQ_HAVE_SO_KEEPALIVE 1
|
||||||
|
# define ZMQ_HAVE_SO_PEERCRED 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPCNT 1
|
# define ZMQ_HAVE_TCP_KEEPCNT 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPIDLE 1
|
# define ZMQ_HAVE_TCP_KEEPIDLE 1
|
||||||
# define ZMQ_HAVE_TCP_KEEPINTVL 1
|
# define ZMQ_HAVE_TCP_KEEPINTVL 1
|
||||||
# define HAVE_POSIX_MEMALIGN 1
|
# define ZMQ_HAVE_UIO 1
|
||||||
# define HAVE_CLOCK_GETTIME 1
|
# define HAVE_CLOCK_GETTIME 1
|
||||||
# define HAVE_FORK 1
|
# define HAVE_FORK 1
|
||||||
|
|
||||||
|
#else
|
||||||
|
# error "No platform defined, abandoning"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This is the gyp script for libzmq
|
# This is the gyp script for libzmq
|
||||||
#
|
#
|
||||||
|
# Use:
|
||||||
# gyp --depth=.
|
# gyp --depth=.
|
||||||
{
|
{
|
||||||
'targets': [
|
'targets': [
|
||||||
@ -138,17 +139,17 @@
|
|||||||
'conditions': [
|
'conditions': [
|
||||||
[ 'OS=="win"', {
|
[ 'OS=="win"', {
|
||||||
"defines": [
|
"defines": [
|
||||||
"ZMQ_HAVE_WINDOWS"
|
"ZMQ_HAVE_WINDOWS=1"
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
"defines": [
|
"defines": [
|
||||||
"ZMQ_HAVE_OSX"
|
"ZMQ_HAVE_OSX=1"
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux"', {
|
[ 'OS=="linux"', {
|
||||||
"defines": [
|
"defines": [
|
||||||
"ZMQ_HAVE_LINUX"
|
"ZMQ_HAVE_LINUX=1"
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user