-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
44 lines (34 loc) · 1.04 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
# import tests from submodule `chia-blockchain`
PY = PYTHONPATH=$(PYTHONPATH):./chia-blockchain:. python
PYTEST = MODE=dev $(PY) -m pytest
PYINSTALLER = $(PY) -m PyInstaller --clean
CHIALISP_DIR = ./app/core/chialisp
RUN = run --include $(CHIALISP_DIR)
OPC = opc
clsp_target_for_coin = $(1).min.clsp $(1).clsp.hex $(1).clsp.hex.sha256tree
clsp_target_for_scheme = $(foreach target,$(2),$(call clsp_target_for_coin,$(1)/$(target)))
.PRECIOUS: %.min.clsp %.clsp.hex %.clsp.hex.sha256tree
%.min.clsp: %.clsp
$(RUN) $^ > $@
%.clsp.hex: %.min.clsp
$(OPC) $^ > $@
%.clsp.hex.sha256tree: %.min.clsp
$(OPC) --script-hash $^ > $@
targets = $(call clsp_target_for_scheme,$(CHIALISP_DIR),\
delegated_tail_with_index \
mint_with_signature \
melt_all_with_signature \
melt_all_by_anyone \
gateway_with_conditions \
)
.PHONY: clean-clvm
clean-clvm:
rm $(targets)
.PHONY: compile-clvm
compile-clvm: $(targets)
.PHONY: test-app
test-app:
@$(PYTEST) ./tests
.PHONY: package-app
package-app: ## package python app via pyinstaller
@$(PYINSTALLER) pyinstaller.spec