Skip to content

Commit 76ef714

Browse files
committed
fix: use absolute PWD include paths for mac and linux cross-compatibility
1 parent d722ec8 commit 76ef714

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
# Verification tool configuration
22
VERILATOR = verilator
33
CXX = g++
4-
FLAGS = -Wall -Wno-fatal --trace --cc -CFLAGS "-I../../tb -I../../src"
4+
FLAGS = -Wall -Wno-fatal --trace --cc
55

66
# Project directories
77
SRC_DIR = src
88
TB_DIR = tb
99
SIM_DIR = sim
1010

11-
# Default target
1211
.PHONY: all compile run view clean
1312

1413
all: run
1514

1615
compile:
1716
@mkdir -p $(SIM_DIR)
1817
$(VERILATOR) $(FLAGS) \
18+
-I$(SRC_DIR) \
19+
-I$(TB_DIR) \
20+
-CFLAGS "-I$(PWD)/$(TB_DIR) -I$(PWD)/$(SRC_DIR)" \
1921
$(SRC_DIR)/top_accelerator.sv \
2022
$(SRC_DIR)/mac_unit.sv \
2123
$(SRC_DIR)/sync_fifo.sv \
2224
--exe $(TB_DIR)/tb_top.cpp \
2325
--Mdir $(SIM_DIR)/obj_dir
24-
$(MAKE) -C $(SIM_DIR)/obj_dir -f Vtop_accelerator.mk
26+
$(MAKE) -C $(SIM_DIR)/obj_dir -f Vtop_accelerator.mk Vtop_accelerator
2527

2628
run: compile
2729
@echo "--- Running Simulation ---"

0 commit comments

Comments
 (0)