From c18830a5e5188cb662a02f52aea84ba8412be375 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 21 Jan 2020 13:03:50 +1100 Subject: [PATCH] Add an option to use Docker Some distros don't have a version of ghdl with the LLVM or GCC backend, so add a Docker image as an alternative. Signed-off-by: Anton Blanchard --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 4f45633..ce08c33 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,20 @@ GHDL=ghdl GHDLFLAGS=--std=08 -Psim-unisim CFLAGS=-O2 -Wall +# We need a version of GHDL built with either the LLVM or gcc backend. +# Fedora provides this, but other distros may not. Another option, although +# rather slow, is to use the Docker image. +# +# Uncomment one of these to build with Docker or podman +#DOCKER=docker +#DOCKER=podman +# +# Uncomment these lines to build with Docker/podman +#PWD = $(shell pwd) +#DOCKERARGS = run --rm -v $(PWD):/src -w /src +#GHDL = $(DOCKER) $(DOCKERARGS) ghdl/ghdl:buster-llvm-7 ghdl +#CC = $(DOCKER) $(DOCKERARGS) ghdl/ghdl:buster-llvm-7 gcc + all = core_tb soc_reset_tb icache_tb dcache_tb multiply_tb dmi_dtm_tb divider_tb \ rotator_tb countzero_tb wishbone_bram_tb