From 39b70c676387bfe06bcc931d3795afc11fd8f137 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 23 Mar 2021 21:18:21 -0700 Subject: Changes for Windows-friendly builds. --- Makefile | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9eff3ef..f532ce2 100644 --- a/Makefile +++ b/Makefile @@ -1,38 +1,15 @@ -VERILOG := $(wildcard **.sv) -HEADERS := $(wildcard **.svh) -CPPSRCS := $(wildcard **.cpp) -COLLATERAL := $(wildcard **.hex) +SOURCES := $(wildcard **.sv **.cpp) +COLLATERAL := $(wildcard **.hex **.svh) OPTS ?= -QUARTUS ?= /opt/quartus-lite/20.1.1.720/ - -QUARTUS_SH := $(QUARTUS)/quartus/bin/quartus_sh - sim: build/Vtop $< .PHONY: sim -gui: build/toycpu.qpf - cd build; $(QUARTUS_SH) --gui toycpu -.PHONY: gui - -qpf: build/toycpu.qpf -.PHONY: qpf - -pof: build/toycpu.pof -.PHONY: pof - -build/Vtop: $(VERILOG) $(HEADERS) $(CPPSRCS) $(COLLATERAL) - @mkdir -p build - verilator +1800-2017ext+sv -Wall -Wno-BLKSEQ -O3 $(OPTS) --Mdir build --trace --cc --build --exe --top-module top $(VERILOG) $(CPPSRCS) - -build/toycpu.pof: build/toycpu.qpf $(VERILOG) $(COLLATERAL) - cd build; $(QUARTUS_SH) --flow compile toycpu - -build/toycpu.qpf: init.tcl +build/Vtop: $(SOURCES) $(COLLATERAL) @mkdir -p build - cd build; $(QUARTUS_SH) -t ../$< $(addprefix $(PWD),$(VERILOG)) + verilator +1800-2017ext+sv -Wall -Wno-BLKSEQ -O3 $(OPTS) --Mdir build --trace --cc --build --exe --top-module top $(SOURCES) clean: rm -rf build -- cgit v1.2.3