-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
31 lines (23 loc) · 1.11 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
BITCOINDIR=.bitcoin
REGTESTCLI=bitcoin-cli -datadir=$(BITCOINDIR) -chain=regtest
.PHONY: mac-aarch64 linux-amd64 windows-amd64 release
mac-aarch64:
cargo build --release --target aarch64-apple-darwin
linux-amd64:
TARGET_CC=x86_64-linux-musl-gcc cargo build --release --target x86_64-unknown-linux-musl
# Setup: https://gist.github.com/Mefistophell/9787e1b6d2d9441c16d2ac79d6a505e6
windows-amd64:
TARGET_CC=x86_64-w64-mingw32-gcc cargo build --release --target x86_64-pc-windows-gnu
release: mac-aarch64 linux-amd64 windows-amd64
mkdir -p release
zip release/nomen-mac-aarch64-$(VERSION).zip target/aarch64-apple-darwin/release/nomen
zip release/nomen-linux-amd64-$(VERSION).zip target/x86_64-unknown-linux-musl/release/nomen
zip release/nomen-windows-amd64-$(VERSION).zip target/x86_64-pc-windows-gnu/release/nomen.exe
bitcoin-local:
mkdir -p .bitcoin
bitcoind -datadir=$(BITCOINDIR) -chain=regtest -fallbackfee=0.001 -txindex -rpcuser=regtest -rpcpassword=regtest
bitcoin-wallet:
$(REGTESTCLI) createwallet regtest
$(REGTESTCLI) generatetoaddress 101 $$($(REGTESTCLI) getnewaddress)
bitcoin-reset:
rm -rf .bitcoin