cic-contracts/Makefile

23 lines
507 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 11:30:10 +01:00
# File-version: 3
2020-12-11 07:48:54 +01:00
INPUTS = $(wildcard *.sol)
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 11:30:10 +01:00
%.abi: $(wildcard *.sol)
install -vDm0644 $@ $(PREFIX)/$@
2020-12-11 07:48:54 +01:00
2020-12-11 11:30:10 +01:00
%.sol:
solc $@ --abi | awk 'NR>3' > $(basename $@).abi
# TODO: improve, does not detect changes in sol files (I suck at writing makefiles)
all: $(INPUTS)
install: $(wildcard *.abi)
2020-12-11 07:48:54 +01:00
clean:
rm -vf *.abi
2020-12-11 11:30:10 +01:00
.PHONY: clean install