binding.gyp

This commit is contained in:
Christopher Jeffrey 2014-09-12 14:39:37 -07:00
parent 3aeed05215
commit 75d2b11227

View File

@ -1,18 +1,26 @@
{ {
'targets': [{ 'targets': [{
'target_name': 'bitcoindjs', 'target_name': 'bitcoindjs',
'variables': {
'BOOST_INCLUDE': '<!(test -n "$BOOST_INCLUDE"'\
' && echo "$BOOST_INCLUDE"'\
' || echo /usr/include/boost)',
'BITCOIN_DIR': '<!(test -n "$BITCOIN_DIR"'\
' && echo "$BITCOIN_DIR"'\
' || echo "${HOME}/bitcoin")',
},
'include_dirs' : [ 'include_dirs' : [
# standard include: # standard include:
# '/usr/include', # '/usr/include',
# boost: # boost:
# '/usr/include/boost', # '<(BOOST_INCLUDE)',
# leveldb: # leveldb:
'<!(test -n "$BITCOIN_DIR" && echo "$BITCOIN_DIR" || echo "${HOME}/bitcoin")/src/leveldb/include', '<(BITCOIN_DIR)/src/leveldb/include',
# bitcoind: # bitcoind:
'<!(test -n "$BITCOIN_DIR" && echo "$BITCOIN_DIR" || echo "${HOME}/bitcoin")/src', '<(BITCOIN_DIR)/src',
# nan: # nan:
'<!(node -e "require(\'nan\')")', '<!(node -e "require(\'nan\')")',
@ -22,14 +30,12 @@
], ],
'defines': [ 'defines': [
# boost sleep: # boost sleep:
'<!(test $(grep "#define BOOST_VERSION " /usr/include/boost/version.hpp'\ '<!(test $(grep "#define BOOST_VERSION " <(BOOST_INCLUDE)/version.hpp'\
' | awk "{ print \$3 }") -gt 105200'\ ' | awk "{ print \$3 }") -ge 105200'\
' && echo HAVE_WORKING_BOOST_SLEEP_FOR'\ ' && echo HAVE_WORKING_BOOST_SLEEP_FOR'\
' || echo HAVE_WORKING_BOOST_SLEEP)', ' || echo HAVE_WORKING_BOOST_SLEEP)',
# wallet: # wallet:
# Assume libbitcoind.so is always
# compiled with wallet support.
'ENABLE_WALLET', 'ENABLE_WALLET',
], ],
'cflags_cc': [ 'cflags_cc': [
@ -49,7 +55,7 @@
'-lboost_chrono', '-lboost_chrono',
# bitcoind: # bitcoind:
'<!(test -n "$BITCOIN_DIR" && echo "$BITCOIN_DIR" || echo "${HOME}/bitcoin")/src/libbitcoind.so', '<(BITCOIN_DIR)/src/libbitcoind.so',
] ]
}] }]
} }