From a0de9a0cfbbdc22aed9217111a7ca7b4b116067c Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 6 May 2021 20:36:28 -0700 Subject: [PATCH] Depend on build_dir --- common.mk | 3 +++ sims/vcs/Makefile | 2 +- sims/verilator/Makefile | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index b876340e..6ab88d7e 100644 --- a/common.mk +++ b/common.mk @@ -87,6 +87,9 @@ endif ######################################################################################### # copy over bootrom files ######################################################################################### +$(build_dir): + mkdir -p $@ + $(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip/bootrom/bootrom.%.img | $(build_dir) cp -f $< $@ diff --git a/sims/vcs/Makefile b/sims/vcs/Makefile index f0fc90e5..cc4d2317 100644 --- a/sims/vcs/Makefile +++ b/sims/vcs/Makefile @@ -38,7 +38,7 @@ SIM_FILE_REQS += \ $(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v # copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir) -$(sim_files): $(SIM_FILE_REQS) +$(sim_files): $(SIM_FILE_REQS) | $(build_dir) mkdir -p $(dir $(sim_files)) cp -f $^ $(build_dir) $(foreach file,\ diff --git a/sims/verilator/Makefile b/sims/verilator/Makefile index 00c0f1bb..6510090e 100644 --- a/sims/verilator/Makefile +++ b/sims/verilator/Makefile @@ -63,7 +63,7 @@ SIM_FILE_REQS += \ $(ROCKETCHIP_RSRCS_DIR)/csrc/remote_bitbang.cc # copy files and add -FI for *.h files in *.f -$(sim_files): $(SIM_FILE_REQS) +$(sim_files): $(SIM_FILE_REQS) | $(build_dir) mkdir -p $(dir $(sim_files)) cp -f $^ $(build_dir) $(foreach file,\