-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
67 lines (46 loc) · 1.76 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
59
60
61
62
63
64
65
66
67
MAKE_SUBPROJS="solidity frontend"
SOLIDITY_SOURCES=$(wildcard solidity/contracts/*.sol solidity/contracts/lib/*.sol solidity/contracts/sapphire/*.sol interfaces/*.sol)
REGTEST_LOCALNET_JSON=btcrelay/deployments/btc-regtest_sapphire-localnet.json
PYMOD=btcrelay
all: $(MAKE_SUBPROJS)
.PHONY: $(MAKE_SUBPROJS)
include common.mk
frontend:
$(MAKE) -C "$@"
.PHONY: solidity
solidity: $(SOLIDITY_SOURCES)
$(MAKE) -C "$@"
touch "$@"
solidity-clean:
$(MAKE) -C solidity clean
clean: python-clean
@for PN in $(MAKE_SUBPROJS); do \
$(MAKE) -C "$$PN" clean ; \
done
python: python-mypy python-wheel
python-requirements:
$(PYTHON) -mpip install --user --break-system-packages -U --upgrade-strategy eager -r $(PYMOD)/requirements.txt
python-clean:
rm -rf *.egg-info dist build .mypy_cache
rm -rf "$(PYMOD)/__pycache__" "$(PYMOD)/deployments/__pycache__"
veryclean: clean
rm -rf "$(dir $(SOLC))"
rm -rf $(PYMOD)/deployments/*_sapphire-localnet.json $(PYMOD)/deployments/btc-regtest-*.json
python-wheel: python-clean solidity
$(PYTHON) setup.py -q bdist_wheel
$(REGTEST_LOCALNET_JSON): solidity
rm -f $@
$(PYTHON) -m$(PYMOD) deploy -y --sapphire localnet --chain btc-regtest --loglevel debug
deploy-localnet:
rm -f $(REGTEST_LOCALNET_JSON)
$(MAKE) $(REGTEST_LOCALNET_JSON)
debug-btc: $(REGTEST_LOCALNET_JSON)
$(PYTHON) -m$(PYMOD) fetchd --sapphire localnet --chain btc-regtest --loglevel debug
debug: solidity debug-btc
debug-release: solidity python-wheel
$(PYTHON) dist/*.whl deploy -y --sapphire localnet --chain btc-testnet --loglevel info
$(PYTHON) dist/*.whl fetchd --sapphire localnet --chain btc-testnet --loglevel info
python-mypy: python-clean
$(PYTHON) -mmypy --check-untyped-defs $(PYMOD)
python-mypy-strict: python-clean
$(PYTHON) -mmypy --strict $(PYMOD)