Skip to content

Commit

Permalink
Improve gyp config
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Jan 7, 2017
1 parent 8dc329f commit ab531d7
Showing 1 changed file with 24 additions and 60 deletions.
84 changes: 24 additions & 60 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@
"conditions": [
[
"OS=='win'", {
"with_gmp%": "false",
"conditions": [
["target_arch=='ia32'", {"openssl_root%": "C:/OpenSSL-Win32"}, {"openssl_root%": "C:/OpenSSL-Win64"}]
]
},
{
"with_gmp%": "<!(utils/has_lib.sh gmpxx && utils/has_lib.sh gmp)",
"conditions": [
["target_arch=='ia32'", {"openssl_config_path": "<(nodedir)/deps/openssl/config/piii"}],
["target_arch=='x64'", {"openssl_config_path": "<(nodedir)/deps/openssl/config/k8"}],
["target_arch=='arm'", {"openssl_config_path": "<(nodedir)/deps/openssl/config/arm"}],
]
"with_gmp%": "false"
}, {
"with_gmp%": "<!(utils/has_lib.sh gmpxx && utils/has_lib.sh gmp)"
}
]
]
Expand All @@ -32,6 +23,17 @@
"./src/secp256k1-src/contrib/lax_der_parsing.c",
"./src/secp256k1-src/contrib/lax_der_privatekey_parsing.c"
],
"include_dirs": [
"/usr/local/include",
"./src/secp256k1-src",
"./src/secp256k1-src/contrib",
"./src/secp256k1-src/include",
"./src/secp256k1-src/src",
"<!(node -e \"require('nan')\")"
],
"defines": [
"ENABLE_MODULE_RECOVERY=1"
],
"cflags": [
"-Wall",
"-Wno-maybe-uninitialized",
Expand All @@ -42,14 +44,6 @@
"cflags_cc+": [
"-std=c++0x"
],
"include_dirs": [
"/usr/local/include",
"./src/secp256k1-src",
"./src/secp256k1-src/contrib",
"./src/secp256k1-src/include",
"./src/secp256k1-src/src",
"<!(node -e \"require('nan')\")"
],
"conditions": [
[
"with_gmp=='true'", {
Expand All @@ -66,42 +60,27 @@
}, {
"defines": [
"USE_NUM_NONE=1",
"USE_SCALAR_INV_BUILTIN=1",
"USE_FIELD_INV_BUILTIN=1",
"ENABLE_MODULE_RECOVERY=1"
"USE_SCALAR_INV_BUILTIN=1"
]
}
],
[
"target_arch=='ia32'", {
"target_arch=='x64' and OS!='win'", {
"defines": [
"HAVE___INT128=1",
"USE_ASM_X86_64=1",
"USE_FIELD_5X52=1",
"USE_FIELD_5X52_INT128=1",
"USE_SCALAR_4X64=1"
]
}, {
"defines": [
"USE_FIELD_10X26=1",
"USE_SCALAR_8X32=1"
]
}
],
[
"target_arch=='x64'", {
"conditions": [
[
"OS=='win'", {
"defines": [
"USE_FIELD_10X26=1",
"USE_SCALAR_8X32=1"
]
}, {
"defines": [
"HAVE___INT128=1"
"USE_ASM_X86_64=1",
"USE_FIELD_5X52=1",
"USE_FIELD_5X52_INT128=1",
"USE_SCALAR_4X64=1"
]
}
]
]
}
],
[
"OS=='mac'", {
"libraries": [
Expand All @@ -114,21 +93,6 @@
]
}
}
],
[
"OS=='win'", {
"libraries": [
"-l<(openssl_root)/lib/libeay32.lib",
],
"include_dirs": [
"<(openssl_root)/include",
],
}, {
"include_dirs": [
"<(nodedir)/deps/openssl/openssl/include",
"<(openssl_config_path)"
]
}
]
]
}]
Expand Down

0 comments on commit ab531d7

Please sign in to comment.