cic-contracts/Makefile

33 lines
785 B
Makefile
Raw Permalink 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
2020-12-31 22:29:40 +01:00
all: $(OUTPUTS)
2021-04-29 08:37:41 +02:00
echo $(OUTPUTS)
2020-12-31 22:29:40 +01:00
install: $(OUTPUTS)
install -vDm0644 -t $(PREFIX) $?
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
2020-12-11 11:30:10 +01:00
.PHONY: clean install