Skip to content

Commit

Permalink
fix gen-fixtures scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Mar 10, 2021
1 parent 59a3abb commit 6391acc
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "util/gen-fixtures/secp256k1"]
path = util/gen-fixtures/secp256k1
url = https://github.com/bitcoin-core/secp256k1.git
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/util/gen-fixtures/secp256k1
22 changes: 0 additions & 22 deletions scripts/Makefile

This file was deleted.

File renamed without changes.
29 changes: 29 additions & 0 deletions util/gen-fixtures/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
all: json-privates json-points json-ecdsa

.PHONY: secp256k1
secp256k1:
cd secp256k1 && ./autogen.sh && ./configure && make

privates: secp256k1
privates: privates.cpp shared.hpp
g++ $< -Lsecp256k1/.libs/ -lgmp -l:libsecp256k1.a -o $@

points: secp256k1
points: points.cpp shared.hpp
g++ $< -Lsecp256k1/.libs/ -lgmp -l:libsecp256k1.a -o $@

ecdsa: secp256k1
ecdsa: ecdsa.cpp shared.hpp
g++ $< -Lsecp256k1/.libs/ -lgmp -lcrypto -lssl -l:libsecp256k1.a -o $@

clean:
rm privates points ecdsa && cd secp256k1 && make clean

json-points: points
./points | jq . > ../../tests/fixtures/points.json

json-privates: privates
./privates | jq . > ../../tests/fixtures/privates.json

json-ecdsa: ecdsa
./ecdsa | jq . > ../../tests/fixtures/ecdsa.json
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions util/gen-fixtures/secp256k1
Submodule secp256k1 added at 4c3ba8
2 changes: 1 addition & 1 deletion scripts/shared.hpp → util/gen-fixtures/shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <sstream>
#include <vector>

#include "../native/secp256k1/include/secp256k1.h"
#include "secp256k1/include/secp256k1.h"
#include "hexxer.hpp"
#include "json.hpp"

Expand Down

0 comments on commit 6391acc

Please sign in to comment.