build/sim: Change VIDEO define to VIDEO_MOD.

This commit is contained in:
Florent Kermarrec 2023-02-13 08:10:52 +01:00
parent 44db314ddd
commit 05cc6c3c04
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)