You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

binding.gyp 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {
  2. "targets": [{
  3. "target_name": "secp256k1",
  4. "variables": {
  5. "conditions": [
  6. [
  7. "OS=='win'", {
  8. "with_gmp%": "false"
  9. }, {
  10. "with_gmp%": "<!(scripts/checklib gmpxx && scripts/checklib gmp)"
  11. }
  12. ]
  13. ]
  14. },
  15. "sources": [
  16. "./native/addon.cpp",
  17. "./native/secp256k1/src/secp256k1.c"
  18. ],
  19. "include_dirs": [
  20. "/usr/local/include",
  21. "./native/secp256k1",
  22. "./native/secp256k1/contrib",
  23. "./native/secp256k1/include",
  24. "./native/secp256k1/src",
  25. "<!(node -e \"require('nan')\")"
  26. ],
  27. "defines": [
  28. "ECMULT_GEN_PREC_BITS=4",
  29. "ECMULT_WINDOW_SIZE=15",
  30. ],
  31. "cflags": [
  32. "-Wall",
  33. "-Wno-maybe-uninitialized",
  34. "-Wno-uninitialized",
  35. "-Wno-unused-function",
  36. "-Wextra"
  37. ],
  38. "cflags_cc+": [
  39. "-std=c++11"
  40. ],
  41. "conditions": [
  42. [
  43. "with_gmp=='true'", {
  44. "defines": [
  45. "HAVE_LIBGMP=1",
  46. "USE_NUM_GMP=1",
  47. "USE_FIELD_INV_NUM=1",
  48. "USE_SCALAR_INV_NUM=1"
  49. ],
  50. "libraries": [
  51. "-lgmpxx",
  52. "-lgmp"
  53. ]
  54. }, {
  55. "defines": [
  56. "USE_NUM_NONE=1",
  57. "USE_FIELD_INV_BUILTIN=1",
  58. "USE_SCALAR_INV_BUILTIN=1"
  59. ]
  60. }
  61. ],
  62. [
  63. "target_arch=='x64' and OS!='win'", {
  64. "defines": [
  65. "HAVE___INT128=1",
  66. "USE_ASM_X86_64=1",
  67. "USE_FIELD_5X52=1",
  68. "USE_FIELD_5X52_INT128=1",
  69. "USE_SCALAR_4X64=1"
  70. ]
  71. }, {
  72. "defines": [
  73. "USE_FIELD_10X26=1",
  74. "USE_SCALAR_8X32=1"
  75. ]
  76. }
  77. ],
  78. [
  79. "OS=='mac'", {
  80. "libraries": [
  81. "-L/usr/local/lib"
  82. ],
  83. "xcode_settings": {
  84. "MACOSX_DEPLOYMENT_TARGET": "10.7",
  85. "OTHER_CPLUSPLUSFLAGS": [
  86. "-stdlib=libc++"
  87. ]
  88. }
  89. }
  90. ]
  91. ]
  92. }]
  93. }