fpga: Add BUILD_BASE_DIR option to makefiles

Adds a BUILD_BASE_DIR makefile variable that allows you to specify the
base directory for FPGA build outputs. This allows you to put the
output from each run of make into a unique directory, or to run
multiple instances of make in parallel with each build's output being
put in a different directory. For example:

make X310_XG BUILD_BASE_DIR=/path/to/builds


Original-commit: bc6db8409ba756bbad0d0c158ffb00c614b58fd9
This commit is contained in:
Wade Fife
2023-02-09 07:38:49 -06:00
parent c525cba09c
commit eec959f814
8 changed files with 35 additions and 22 deletions
+3 -3
View File
@@ -23,12 +23,12 @@ endif
TOOLS_DIR = $(BASE_DIR)/../tools
LIB_DIR = $(BASE_DIR)/../lib
O ?= .
BUILD_BASE_DIR ?= .
ifdef NAME
BUILD_DIR = $(abspath $(O)/build-$(NAME))
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build-$(NAME))
else
BUILD_DIR = $(abspath $(O)/build)
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build)
endif
IP_BUILD_DIR = $(abspath ./build-ip/$(subst /,,$(PART_ID)))
+3 -3
View File
@@ -23,12 +23,12 @@ endif
TOOLS_DIR = $(BASE_DIR)/../tools
LIB_DIR = $(BASE_DIR)/../lib
O ?= .
BUILD_BASE_DIR ?= .
ifdef NAME
BUILD_DIR = $(abspath $(O)/build-$(NAME))
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build-$(NAME))
else
BUILD_DIR = $(abspath $(O)/build)
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build)
endif
IP_BUILD_DIR = $(abspath ./build-ip/$(subst /,,$(PART_ID)))
+3 -3
View File
@@ -24,12 +24,12 @@ SIMLIB_DIR = $(abspath $(BASE_DIR)/../sim)
LIB_IP_DIR = $(abspath $(LIB_DIR)/ip)
HLS_IP_DIR = $(abspath $(LIB_DIR)/hls)
O ?= .
BUILD_BASE_DIR ?= .
ifdef NAME
BUILD_DIR = $(abspath $(O)/build-$(NAME))
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build-$(NAME))
else
BUILD_DIR = $(abspath $(O)/build)
BUILD_DIR = $(abspath $(BUILD_BASE_DIR)/build)
endif
IP_BUILD_DIR = $(abspath ./build-ip/$(subst /,,$(PART_ID)))