You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
985 B

.PHONY: symbiyosys ghdl-formal riscv-gcc all NOCACHE clean copy
# Support for make environment variable NOCACHE
ifeq (NOCACHE,$(lastword $(MAKECMDGOALS)))
OPTIONS := --no-cache
$(info INFO: build without cache)
$(eval $(lastword$(MAKECMDGOALS)):dummy;@:)
ifndef TAG
TAG := latest
$(info INFO: Using predefined tag 'latest')
$(info INFO: Using user given tag '${TAG}')
all: symbiyosys ghdl-formal riscv-gcc
copy: copy-ghdl copy-riscv
copy-ghdl: ghdl-formal_${TAG}.tar.gz
copy-riscv: riscv-gcc_${TAG}.tar.gz
symbiyosys ghdl-formal riscv-gcc: $$@.Dockerfile
docker build ${OPTIONS} -t $@:${TAG} -f $@.Dockerfile .
mkdir -p artefacts
docker run --rm -dit --name=$*-dummy $*:${TAG} > /dev/null
docker cp $*-dummy:/opt/. artefacts
docker rm -f $*-dummy > /dev/null
tar -C artefacts -czf $@ .
shasum --algorithm 256 --UNIVERSAL $@ > $@.sha256
rm -rf artefacts
rm -f *.tar.*