diff --git a/litex/build/sim/core/Makefile b/litex/build/sim/core/Makefile index c486e7782..b1c880280 100644 --- a/litex/build/sim/core/Makefile +++ b/litex/build/sim/core/Makefile @@ -1,8 +1,8 @@ include variables.mak -CC = gcc -CFLAGS = -Wall -$(OPT_LEVEL) -ggdb $(if $(COVERAGE), -DVM_COVERAGE) -LDFLAGS = -lpthread -Wl,--no-as-needed -ljson-c -lm -lstdc++ -Wl,--no-as-needed -ldl -levent +CC ?= gcc +CFLAGS += -Wall -$(OPT_LEVEL) -ggdb $(if $(COVERAGE), -DVM_COVERAGE) +LDFLAGS += -lpthread -Wl,--no-as-needed -ljson-c -lm -lstdc++ -Wl,--no-as-needed -ldl -levent CC_SRCS ?= "--cc dut.v" diff --git a/litex/build/sim/core/modules/variables.mak b/litex/build/sim/core/modules/variables.mak index 764417645..6c504f3c4 100644 --- a/litex/build/sim/core/modules/variables.mak +++ b/litex/build/sim/core/modules/variables.mak @@ -1,5 +1,5 @@ -CC = gcc -CFLAGS = -Wall -O3 -ggdb -fPIC -Werror -LDFLAGS = -levent -shared -fPIC +CC ?= gcc +CFLAGS += -Wall -O3 -ggdb -fPIC -Werror +LDFLAGS += -levent -shared -fPIC OBJ_DIR ?= .