From 05cc6c3c04a99347b7374066c512b0b49a316e80 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 13 Feb 2023 08:10:52 +0100 Subject: [PATCH] build/sim: Change VIDEO define to VIDEO_MOD. --- litex/build/sim/core/Makefile | 4 ++-- litex/build/sim/core/modules/Makefile | 2 +- litex/build/sim/verilator.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/litex/build/sim/core/Makefile b/litex/build/sim/core/Makefile index 4866d3a87..400e20e76 100644 --- a/litex/build/sim/core/Makefile +++ b/litex/build/sim/core/Makefile @@ -10,11 +10,11 @@ ifeq ($(UNAME_S),Darwin) CFLAGS += -I/opt/homebrew/include LDFLAGS += -L/opt/homebrew/lib endif - LDFLAGS += -lpthread -ljson-c -lz -lm -lstdc++ -ldl -levent $(if $(VIDEO), -lSDL2) + LDFLAGS += -lpthread -ljson-c -lz -lm -lstdc++ -ldl -levent $(if $(VIDEO_MOD), -lSDL2) else CC ?= gcc CFLAGS += -ggdb - LDFLAGS += -lpthread -Wl,--no-as-needed -ljson-c -lz -lm -lstdc++ -Wl,--no-as-needed -ldl -levent $(if $(VIDEO), -lSDL2) + LDFLAGS += -lpthread -Wl,--no-as-needed -ljson-c -lz -lm -lstdc++ -Wl,--no-as-needed -ldl -levent $(if $(VIDEO_MOD), -lSDL2) endif CFLAGS += -Wall -$(OPT_LEVEL) $(if $(COVERAGE), -DVM_COVERAGE) $(if $(TRACE_FST), -DTRACE_FST) diff --git a/litex/build/sim/core/modules/Makefile b/litex/build/sim/core/modules/Makefile index d300e2367..c83af84d6 100644 --- a/litex/build/sim/core/modules/Makefile +++ b/litex/build/sim/core/modules/Makefile @@ -1,5 +1,5 @@ include ../variables.mak -MODULES = xgmii_ethernet ethernet serial2console serial2tcp clocker spdeeprom gmii_ethernet $(if $(VIDEO), video) +MODULES = xgmii_ethernet ethernet serial2console serial2tcp clocker spdeeprom gmii_ethernet $(if $(VIDEO_MOD), video) .PHONY: $(MODULES) $(EXTRA_MOD_LIST) all: $(MODULES) $(EXTRA_MOD_LIST) diff --git a/litex/build/sim/verilator.py b/litex/build/sim/verilator.py index 26149bb32..2a88ae096 100644 --- a/litex/build/sim/verilator.py +++ b/litex/build/sim/verilator.py @@ -115,7 +115,7 @@ def _generate_sim_variables(include_paths, extra_mods, extra_mods_path, video): SRC_DIR = {} INC_DIR = {} TAPCFG_DIRECTORY = {} -VIDEO = {} +VIDEO_MOD = {} """.format(core_directory, include, tapcfg_dir, int(video)) if extra_mods: @@ -151,7 +151,7 @@ make -C . -f {} {} {} {} {} {} {} "COVERAGE=1" if coverage else "", "OPT_LEVEL={}".format(opt_level), "TRACE_FST=1" if trace_fst else "", - "VIDEO=1" if video else "", + "VIDEO_MOD=1" if video else "", ) build_script_file = "build_" + build_name + ".sh" tools.write_to_file(build_script_file, build_script_contents, force_unix=True)