Files
embedded-autobuild/platform/xilinx/xilinx.mk
T
Gatsby 5fd695266f refactor(make): reorganize targets and improve locking mechanism
1.	Introduce a “project lock” mechanism alongside the existing “build lock”; the lock file is now generated within the platform-specific Makefile.
2.	Set `project` as the default Makefile goal for consistency.
3.	Remove the `standalone` target to improve compatibility, especially when invoked via `make -f`.
4.	Simplify target dependencies for better maintainability and clarity.
2025-05-09 22:27:52 +08:00

44 lines
1.3 KiB
Makefile

#------------------------------------------------------------------------------
# ENVIRONMENT VARIABLES
#------------------------------------------------------------------------------
define tcl_util
xsct -nodisp $(PLATFORM_TOOLS)/util.tcl \
$(1) \
$(CONFIG_FILE) $(BUILD_DIR)
endef
PHONY += xilinx_reset xilinx_project xilinx_sdkclean xilinx_sdkbuild
xilinx_sdkopen:
@$(call log,Launching IDE...)
@if [ "$(call check_command,vitis)" = "y" ]; then \
if [ "$(XILINX_VITIS_CLASSIC)" = "y" ]; then \
vitis -classic -workspace=$(BUILD_DIR); \
else \
vitis -workspace=$(BUILD_DIR); \
fi; \
elif [ "$(call check_command,xsdk)" = "y" ]; then \
xsdk -workspace=$(BUILD_DIR); \
else \
echo "No IDE found!" && exit 1; \
fi
xilinx_sdkbuild:
@$(call log,[Build] SDK projects in $(BUILD_DIR))
$(call tcl_util, build) $(HIDE)
@echo "$(TIMESTAMP): Build lock." > $(BUILD_LOCK)
xilinx_sdkclean:
@$(call log,[Delete] SDK artefacts from $(BUILD_DIR))
$(call tcl_util, clean_project) $(HIDE)
$(XILINX_PROJECT_LOCK):
@$(call log,Creating and configuring the IDE project)
@$(call cmd_mkdir,$(BUILD_DIR))
$(call tcl_util, create_project) $(HIDE)
@echo "$(TIMESTAMP): Project lock." > $@
xilinx_project: $(PROJECT_LOCK)
xilinx_reset:
$(call cmd_remove,.Xil) $(HIDE)