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:
+5
-2
@@ -14,6 +14,9 @@
|
||||
## build/usrp_<product>_fpga_<image_type>.dts: Device tree source file
|
||||
## build/usrp_<product>_fpga_<image_type>.rpt: Build report (includes utilization and timing summary)
|
||||
|
||||
# Base output directory for all builds
|
||||
BUILD_BASE_DIR ?= .
|
||||
|
||||
# Initialize a build seed. This can be changed to randomly affect build results.
|
||||
BUILD_SEED ?= 0
|
||||
|
||||
@@ -45,9 +48,9 @@ ifeq ($(TARGET),bin)
|
||||
post_build = @\
|
||||
mkdir -p build; \
|
||||
echo "Exporting bitstream file..."; \
|
||||
cp build-$(1)_$(2)/e320.bit build/usrp_`echo $(1) | tr A-Z a-z`_fpga_$(2).bit; \
|
||||
cp $(BUILD_BASE_DIR)/build-$(1)_$(2)/e320.bit build/usrp_`echo $(1) | tr A-Z a-z`_fpga_$(2).bit; \
|
||||
echo "Exporting build report..."; \
|
||||
cp build-$(1)_$(2)/build.rpt build/usrp_`echo $(1) | tr A-Z a-z`_fpga_$(2).rpt; \
|
||||
cp $(BUILD_BASE_DIR)/build-$(1)_$(2)/build.rpt build/usrp_`echo $(1) | tr A-Z a-z`_fpga_$(2).rpt; \
|
||||
echo "Build DONE ... $(1)_$(2)";
|
||||
else
|
||||
post_build = @echo "Skipping bitfile export."
|
||||
|
||||
Reference in New Issue
Block a user