mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-11 02:35:53 +00:00
gyp that maybe works on yarn install
This commit is contained in:
parent
c033f782b8
commit
d09b1009b6
1
bindings/node.js/.gitignore
vendored
1
bindings/node.js/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
build
|
||||
dist
|
||||
*.node
|
||||
node_modules
|
||||
|
@ -13,4 +13,4 @@ jest.config.js
|
||||
rollup.config.js
|
||||
tsconfig.json
|
||||
babel.config.js
|
||||
dist/blst/bindings
|
||||
*.bak
|
||||
|
@ -26,4 +26,8 @@ bundle: clean
|
||||
cp ../../src/c_kzg_4844.h dist/deps/c-kzg
|
||||
|
||||
publish:
|
||||
mv binding.gyp binding.gyp.bak
|
||||
mv binding.dist.gyp binding.gyp
|
||||
npm publish
|
||||
mv binding.gyp binding.dist.gyp
|
||||
mv binding.gyp.bak binding.gyp
|
||||
|
60
bindings/node.js/binding.dist.gyp
Normal file
60
bindings/node.js/binding.dist.gyp
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"target_name": "kzg",
|
||||
"cflags!": ["-fno-exceptions"],
|
||||
"cflags_cc!": ["-fno-exceptions"],
|
||||
"xcode_settings": {
|
||||
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
||||
"CLANG_CXX_LIBRARY": "libc++",
|
||||
"MACOSX_DEPLOYMENT_TARGET": "13.0"
|
||||
},
|
||||
"sources": ["kzg.cxx"],
|
||||
"include_dirs": [
|
||||
"../../inc",
|
||||
"../../src",
|
||||
"<!@(node -p \"require('node-addon-api').include\")"
|
||||
],
|
||||
"libraries": [
|
||||
"<(module_root_dir)/libblst.a",
|
||||
"<(module_root_dir)/c_kzg_4844.o"
|
||||
],
|
||||
"dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"],
|
||||
"defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"],
|
||||
"actions": [
|
||||
{
|
||||
"action_name": "build_blst",
|
||||
"inputs": ["<(module_root_dir)/dist/deps/blst/build.sh"],
|
||||
"outputs": ["<(module_root_dir)/libblst.a"],
|
||||
"action": ["<(module_root_dir)/dist/deps/blst/build.sh"]
|
||||
},
|
||||
{
|
||||
"action_name": "build_ckzg",
|
||||
"inputs": [
|
||||
"<(module_root_dir)/dist/deps/c-kzg/c_kzg_4844.c",
|
||||
"<(module_root_dir)/libblst.a"
|
||||
],
|
||||
"outputs": ["<(module_root_dir)/c_kzg_4844.o"],
|
||||
"action": [
|
||||
"clang",
|
||||
"-I<(module_root_dir)/dist/deps/blst/bindings",
|
||||
"-O2",
|
||||
"-c",
|
||||
"<(module_root_dir)/dist/deps/c-kzg/c_kzg_4844.c"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"target_name": "action_after_build",
|
||||
"type": "none",
|
||||
"dependencies": ["kzg"],
|
||||
"copies": [
|
||||
{
|
||||
"files": ["./build/Release/kzg.node"],
|
||||
"destination": "./dist"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -30,10 +30,6 @@
|
||||
{
|
||||
"files": ["./build/Release/kzg.node"],
|
||||
"destination": "."
|
||||
},
|
||||
{
|
||||
"files": ["./build/Release/kzg.node"],
|
||||
"destination": "./dist"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user