cic-contracts/Makefile

44 lines
931 B
Makefile
Raw Normal View History

2020-12-11 07:48:54 +01:00
# Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
# SPDX-License-Identifier: GPL-3.0-or-later
2020-12-31 22:29:40 +01:00
# File-version: 5
2020-12-11 07:48:54 +01:00
2021-04-29 08:37:41 +02:00
INPUTS = $(wildcard solidity/*.sol)
2021-04-28 13:55:53 +02:00
OUTPUTS_JSON = $(patsubst %.sol, %.json, $(INPUTS))
OUTPUTS_INTERFACE = $(patsubst %.sol, %.interface, $(INPUTS))
2021-04-29 08:37:41 +02:00
OUTPUTS = $(OUTPUTS_JSON) $(OUTPUTS_INTERFACE)
2020-12-11 11:30:10 +01:00
PREFIX = /usr/local/share/cic/solidity/abi
2020-12-11 07:48:54 +01:00
2020-12-31 22:29:40 +01:00
#%.abi.json: $(wildcard *.sol)
# install -vDm0644 $@ $(PREFIX)/$@
2020-12-11 07:48:54 +01:00
2021-04-28 13:55:53 +02:00
.SUFFIXES: .sol .json .interface
2020-12-11 11:30:10 +01:00
2020-12-31 22:29:40 +01:00
.sol.json:
solc $(basename $@).sol --abi | awk 'NR>3' > $@
2020-12-11 11:30:10 +01:00
2021-04-28 13:55:53 +02:00
.sol.interface:
bash to_interface.sh $(basename $@).sol > $@
2021-04-28 13:55:53 +02:00
all: outs doc
outs: $(OUTPUTS)
2021-04-29 08:37:41 +02:00
echo $(OUTPUTS)
2020-12-31 22:29:40 +01:00
install-code: $(OUTPUTS)
2020-12-31 22:29:40 +01:00
install -vDm0644 -t $(PREFIX) $?
2020-12-11 07:48:54 +01:00
install-doc:
bash texify.sh
install: outs install-code install-doc doc
2020-12-11 07:48:54 +01:00
clean:
2021-04-29 08:37:41 +02:00
rm -vf solidity/*.json
rm -vf solidity/*.interface
2020-12-11 07:48:54 +01:00
doc:
bash texify.sh
make -C doc/texinfo
2020-12-11 11:30:10 +01:00
.PHONY: clean install