2020-10-27 12:15:52 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
SHELL=bash
|
2020-03-30 13:59:54 +00:00
|
|
|
NEOGO?=neo-go
|
|
|
|
|
2020-10-27 12:15:52 +00:00
|
|
|
.PHONY: all build sidechain
|
|
|
|
build: all
|
|
|
|
all: sidechain mainnet
|
2021-07-22 09:46:38 +00:00
|
|
|
sidechain: alphabet morph nns
|
2020-10-27 12:15:52 +00:00
|
|
|
|
2020-12-15 12:19:13 +00:00
|
|
|
alphabet_sc = alphabet
|
2021-02-19 14:47:41 +00:00
|
|
|
morph_sc = audit balance container neofsid netmap proxy reputation
|
2021-04-20 14:40:18 +00:00
|
|
|
mainnet_sc = neofs processing
|
2021-07-22 09:46:38 +00:00
|
|
|
nns_sc = nns
|
2020-10-27 12:15:52 +00:00
|
|
|
|
|
|
|
define sc_template
|
|
|
|
$(2)$(1)/$(1)_contract.nef: $(2)$(1)/$(1)_contract.go
|
2021-07-22 13:12:59 +00:00
|
|
|
$(NEOGO) contract compile -i $(2)$(1) -c $(if $(2),$(2),$(1)/)config.yml -m $(2)$(1)/config.json -o $(2)$(1)/$(1)_contract.nef
|
2020-10-27 12:15:52 +00:00
|
|
|
|
|
|
|
$(if $(2),$(2)$(1)/$(1)_contract.go: alphabet/alphabet.go alphabet/alphabet.tpl
|
|
|
|
go run alphabet/alphabet.go
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2020-12-15 12:19:13 +00:00
|
|
|
$(foreach sc,$(alphabet_sc),$(eval $(call sc_template,$(sc))))
|
2020-10-27 12:15:52 +00:00
|
|
|
$(foreach sc,$(morph_sc),$(eval $(call sc_template,$(sc))))
|
|
|
|
$(foreach sc,$(mainnet_sc),$(eval $(call sc_template,$(sc))))
|
2021-07-22 09:46:38 +00:00
|
|
|
$(foreach sc,$(nns_sc),$(eval $(call sc_template,$(sc))))
|
2020-10-27 12:15:52 +00:00
|
|
|
|
2020-12-15 12:19:13 +00:00
|
|
|
alphabet: $(foreach sc,$(alphabet_sc),$(sc)/$(sc)_contract.nef)
|
2020-10-27 12:15:52 +00:00
|
|
|
morph: $(foreach sc,$(morph_sc),$(sc)/$(sc)_contract.nef)
|
|
|
|
mainnet: $(foreach sc,$(mainnet_sc),$(sc)/$(sc)_contract.nef)
|
2021-07-22 09:46:38 +00:00
|
|
|
nns: $(foreach sc,$(nns_sc),$(sc)/$(sc)_contract.nef)
|
2020-03-30 13:59:54 +00:00
|
|
|
|
2020-10-27 12:15:52 +00:00
|
|
|
clean:
|
|
|
|
find . -name '*.nef' -exec rm -rf {} \;
|
|
|
|
find . -name 'config.json' -exec rm -rf {} \;
|
2020-03-30 13:59:54 +00:00
|
|
|
|
2020-10-27 12:15:52 +00:00
|
|
|
mr_proper: clean
|
|
|
|
for sc in $(alphabet_sc); do\
|
|
|
|
rm -rf alphabet/$$sc; \
|
|
|
|
done
|