2018-03-23 11:55:11 +00:00
|
|
|
####################################################################################
|
|
|
|
## Copyright 2018(c) Analog Devices, Inc.
|
|
|
|
####################################################################################
|
|
|
|
|
|
|
|
# Assumes this file is in library/scripts/library.mk
|
|
|
|
HDL_LIBRARY_PATH := $(subst scripts/library.mk,,$(lastword $(MAKEFILE_LIST)))
|
|
|
|
|
|
|
|
VIVADO := vivado -mode batch -source
|
|
|
|
|
|
|
|
CLEAN_TARGET := *.cache
|
|
|
|
CLEAN_TARGET += *.data
|
|
|
|
CLEAN_TARGET += *.xpr
|
|
|
|
CLEAN_TARGET += *.log
|
|
|
|
CLEAN_TARGET += component.xml
|
|
|
|
CLEAN_TARGET += *.jou
|
|
|
|
CLEAN_TARGET += xgui
|
|
|
|
CLEAN_TARGET += *.ip_user_files
|
|
|
|
CLEAN_TARGET += *.srcs
|
|
|
|
CLEAN_TARGET += *.hw
|
|
|
|
CLEAN_TARGET += *.sim
|
|
|
|
CLEAN_TARGET += .Xil
|
|
|
|
|
|
|
|
M_DEPS += $(HDL_LIBRARY_PATH)scripts/adi_env.tcl
|
|
|
|
M_DEPS += $(HDL_LIBRARY_PATH)scripts/adi_ip.tcl
|
|
|
|
|
2018-03-26 08:57:03 +00:00
|
|
|
M_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/component.xml)
|
2018-03-23 11:55:11 +00:00
|
|
|
|
|
|
|
.PHONY: all dep clean clean-all
|
2018-03-26 08:57:03 +00:00
|
|
|
all: dep component.xml
|
2018-03-23 11:55:11 +00:00
|
|
|
|
|
|
|
clean: clean-all
|
|
|
|
|
|
|
|
clean-all:
|
|
|
|
rm -rf $(CLEAN_TARGET)
|
|
|
|
|
2018-03-26 08:57:03 +00:00
|
|
|
component.xml: $(M_DEPS)
|
2018-03-23 11:55:11 +00:00
|
|
|
-rm -rf $(CLEAN_TARGET)
|
|
|
|
$(VIVADO) $(LIBRARY_NAME)_ip.tcl >> $(LIBRARY_NAME)_ip.log 2>&1
|
|
|
|
|
|
|
|
dep:
|
|
|
|
@for lib in $(LIB_DEPS); do \
|
|
|
|
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} || exit $$?; \
|
|
|
|
done
|
|
|
|
@for intf in $(INTERFACE_DEPS); do \
|
|
|
|
$(MAKE) -C $(HDL_LIBRARY_PATH)$${intf} || exit $$?; \
|
|
|
|
done
|