cic-contracts/Makefile

26 lines
534 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-11 18:05:00 +01:00
# File-version: 5
2020-12-11 07:48:54 +01:00
INPUTS = $(wildcard *.sol)
2020-12-11 18:04:32 +01:00
OUTPUTS = $(patsubst %.sol, %.json, $(INPUTS))
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-11 18:04:32 +01:00
#%.abi.json: $(wildcard *.sol)
# install -vDm0644 $@ $(PREFIX)/$@
2020-12-11 07:48:54 +01:00
2020-12-11 18:04:32 +01:00
.SUFFIXES: .sol .json
2020-12-11 11:30:10 +01:00
2020-12-11 18:04:32 +01:00
.sol.json:
solc $@ --abi | awk 'NR>3' > $(basename $@).json
2020-12-11 11:30:10 +01:00
2020-12-11 18:04:32 +01:00
all: $(OUTPUTS)
install: $(OUTPUTS)
install -vDm0644 -t $(PREFIX) $?
2020-12-11 07:48:54 +01:00
clean:
2020-12-11 18:04:32 +01:00
rm -vf *.json
2020-12-11 07:48:54 +01:00
2020-12-11 11:30:10 +01:00
.PHONY: clean install