build/sim: allow to use environment's {C,LD}FLAGS

There are use cases where additional flags should be added to CFLAGS or
LDFLAGS, e.g. when using Conda environment.
This commit is contained in:
Mariusz Glebocki 2020-02-03 21:48:51 +01:00
parent bd6fd3da55
commit 90fe585003
2 changed files with 6 additions and 6 deletions

View file

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

View file

@ -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 ?= .