-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
58 lines (43 loc) · 1.68 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# openssl
OPENSSL_PATH=./libs/libcrypton/build/openssl
all:
mkdir -p build/
g++ -std=c++17 main-test.cpp src/neo3-cpp-core/ExternalCrypto.cpp -Isrc/ -Ilibs/ -Ilibs/libcrypton/src -I$(OPENSSL_PATH)/include -L$(OPENSSL_PATH) libs/libcrypton/src/CryptoNeoOpenSSL.cpp -L./libs/csbiginteger-cpp/lib -o build/app_main -lcsbiginteger -lgmp -lgmpxx -llinux-openssl-crypto-x86_64 -lpthread -ldl
run:
./build/app_main
test:
cd tests && make
vendor: vendor_js vendor_cpp #get_bn-js already provided
@echo "Finished 'make vendor' successfully"
vendor_js: update_submodules
# empty
vendor_cpp: update_submodules get_libcrypton get_csbiginteger
get_bn-js:
npm install bn.js --prefix libs/ -g
####cp libs/lib/node_modules/bn.js/lib/bn.js xx-no-need-to-copy
#npm install csbiginteger.js --prefix libs/ -g ## TODO:
npm install crypto-js --prefix libs/ -g
update_submodules:
git submodule update --init --recursive
git submodule update --recursive
get_libcrypton:
(cd libs/libcrypton && git submodule update --init --recursive && git submodule update --recursive)
(cd libs/libcrypton && make vendor && make test)
get_csbiginteger:
(cd libs/csbiginteger-cpp && git submodule update --init --recursive && git submodule update --recursive)
(cd libs/csbiginteger-cpp && rm -rf tests/libgtest/build)
(cd libs/csbiginteger-cpp && make vendor && make test)
js:
cd tests/node_tests && make js
js_docker:
cd tests/node_tests && make js_docker
run_js:
cd tests/node_tests && make run_js
jslib:
make vendor_js
# clean remote 'dist/'
rm -f ./packages/lib-neopt-core-js/dist/*
cd ./packages/lib-neopt-core-js/ && make compile
cd ./packages/lib-neopt-core-js/ && make test
clean:
rm -f build/*