Skip to content

Commit

Permalink
build: binding.gyp style.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Nov 3, 2018
1 parent ca5aeba commit 7ee81de
Showing 1 changed file with 46 additions and 54 deletions.
100 changes: 46 additions & 54 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,11 @@
"target_name": "secp256k1",
"variables": {
"conditions": [
[
"OS=='win'", {
"with_gmp%": "false"
}, {
"with_gmp%": "<!(vendor/secp256k1/utils/has_lib.sh gmpxx gmp)"
}
]
["OS=='win'", {
"with_gmp%": "false"
}, {
"with_gmp%": "<!(vendor/secp256k1/utils/has_lib.sh gmpxx gmp)"
}]
]
},
"sources": [
Expand Down Expand Up @@ -189,55 +187,49 @@
"-Wno-deprecated-declarations"
],
"conditions": [
[
"with_gmp=='true'", {
"defines": [
"HAVE_LIBGMP=1",
"USE_NUM_GMP=1",
"USE_FIELD_INV_NUM=1",
"USE_SCALAR_INV_NUM=1"
],
"libraries": [
"-lgmpxx",
"-lgmp"
]
}, {
"defines": [
"USE_NUM_NONE=1",
"USE_FIELD_INV_BUILTIN=1",
"USE_SCALAR_INV_BUILTIN=1"
]
}
],
[
"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"
["with_gmp=='true'", {
"defines": [
"HAVE_LIBGMP=1",
"USE_NUM_GMP=1",
"USE_FIELD_INV_NUM=1",
"USE_SCALAR_INV_NUM=1"
],
"libraries": [
"-lgmpxx",
"-lgmp"
]
}, {
"defines": [
"USE_NUM_NONE=1",
"USE_FIELD_INV_BUILTIN=1",
"USE_SCALAR_INV_BUILTIN=1"
]
}],
["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"
]
}],
["OS=='mac'", {
"libraries": [
"-L/usr/local/lib"
],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.7",
"OTHER_CPLUSPLUSFLAGS": [
"-stdlib=libc++"
]
}
],
[
"OS=='mac'", {
"libraries": [
"-L/usr/local/lib"
],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.7",
"OTHER_CPLUSPLUSFLAGS": [
"-stdlib=libc++"
]
}
}
]
}]
]
}]
}

0 comments on commit 7ee81de

Please sign in to comment.