cic-contracts/Makefile
2020-12-11 16:09:35 +01:00

23 lines
527 B
Makefile

# Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
# SPDX-License-Identifier: GPL-3.0-or-later
# File-version: 4
INPUTS = $(wildcard *.sol)
PREFIX = /usr/local/share/cic/solidity/abi
%.abi.json: $(wildcard *.sol)
install -vDm0644 $@ $(PREFIX)/$@
%.sol:
solc $@ --abi | awk 'NR>3' > $(basename $@).abi.json
# TODO: improve, does not detect changes in sol files (I suck at writing makefiles)
all: $(INPUTS)
install: $(wildcard *.abi.json)
clean:
rm -vf *.abi.json
.PHONY: clean install