2018-03-22 16:15:14 +00:00
|
|
|
####################################################################################
|
2021-09-13 20:50:01 +00:00
|
|
|
## Copyright (c) 2020 - 2021 Analog Devices, Inc.
|
|
|
|
## SPDX short identifier: BSD-1-Clause
|
2018-03-22 16:15:14 +00:00
|
|
|
####################################################################################
|
|
|
|
|
2018-08-13 13:59:02 +00:00
|
|
|
# Assumes this file is in projects/scripts/project-intel.mk
|
|
|
|
HDL_PROJECT_PATH := $(subst scripts/project-intel.mk,,$(lastword $(MAKEFILE_LIST)))
|
2018-03-27 09:21:09 +00:00
|
|
|
HDL_LIBRARY_PATH := $(HDL_PROJECT_PATH)../library/
|
2018-03-22 16:15:14 +00:00
|
|
|
|
2018-03-25 07:21:37 +00:00
|
|
|
include $(HDL_PROJECT_PATH)../quiet.mk
|
|
|
|
|
2018-03-22 16:15:14 +00:00
|
|
|
ifeq ($(NIOS2_MMU),)
|
|
|
|
NIOS2_MMU := 1
|
|
|
|
endif
|
|
|
|
|
2018-08-14 14:40:42 +00:00
|
|
|
export NIOS_MMU_ENABLED := $(NIOS2_MMU)
|
2018-03-22 16:15:14 +00:00
|
|
|
|
2018-08-13 13:59:02 +00:00
|
|
|
INTEL := quartus_sh --64bit -t
|
2018-03-22 16:15:14 +00:00
|
|
|
|
|
|
|
CLEAN_TARGET += *.log
|
|
|
|
CLEAN_TARGET += *_INFO.txt
|
|
|
|
CLEAN_TARGET += *_dump.txt
|
|
|
|
CLEAN_TARGET += db
|
|
|
|
CLEAN_TARGET += *.asm.rpt
|
|
|
|
CLEAN_TARGET += *.done
|
|
|
|
CLEAN_TARGET += *.eda.rpt
|
|
|
|
CLEAN_TARGET += *.fit.*
|
|
|
|
CLEAN_TARGET += *.map.*
|
|
|
|
CLEAN_TARGET += *.sta.*
|
2020-03-31 09:18:21 +00:00
|
|
|
CLEAN_TARGET += *.syn.*
|
|
|
|
CLEAN_TARGET += *.retime.*
|
|
|
|
CLEAN_TARGET += *.flow.*
|
2018-03-22 16:15:14 +00:00
|
|
|
CLEAN_TARGET += *.qsf
|
|
|
|
CLEAN_TARGET += *.qpf
|
|
|
|
CLEAN_TARGET += *.qws
|
|
|
|
CLEAN_TARGET += *.sof
|
|
|
|
CLEAN_TARGET += *.cdf
|
|
|
|
CLEAN_TARGET += *.sld
|
|
|
|
CLEAN_TARGET += *.qdf
|
2020-03-31 09:18:21 +00:00
|
|
|
CLEAN_TARGET += *.bin
|
2018-03-22 16:15:14 +00:00
|
|
|
CLEAN_TARGET += hc_output
|
|
|
|
CLEAN_TARGET += system_bd
|
|
|
|
CLEAN_TARGET += hps_isw_handoff
|
|
|
|
CLEAN_TARGET += hps_sdram_*.csv
|
|
|
|
CLEAN_TARGET += *ddr3_*.csv
|
|
|
|
CLEAN_TARGET += incremental_db
|
|
|
|
CLEAN_TARGET += reconfig_mif
|
|
|
|
CLEAN_TARGET += *.sopcinfo
|
|
|
|
CLEAN_TARGET += *.jdi
|
|
|
|
CLEAN_TARGET += *.pin
|
2020-03-31 09:18:21 +00:00
|
|
|
CLEAN_TARGET += qdb
|
|
|
|
CLEAN_TARGET += ip
|
|
|
|
CLEAN_TARGET += synth_dumps
|
|
|
|
CLEAN_TARGET += tmp-clearbox
|
2018-03-22 16:15:14 +00:00
|
|
|
CLEAN_TARGET += *_summary.csv
|
|
|
|
CLEAN_TARGET += *.dpf
|
2018-03-28 09:44:21 +00:00
|
|
|
CLEAN_TARGET += system_qsys_script.tcl
|
|
|
|
CLEAN_TARGET += system_bd.qsys
|
|
|
|
CLEAN_TARGET += .qsys_edit
|
2020-03-05 12:56:43 +00:00
|
|
|
CLEAN_TARGET += *.rpt
|
|
|
|
CLEAN_TARGET += *.smsg
|
|
|
|
CLEAN_TARGET += *.summary
|
|
|
|
CLEAN_TARGET += ip
|
|
|
|
CLEAN_TARGET += qdb
|
|
|
|
CLEAN_TARGET += tmp-clearbox
|
2018-03-22 16:15:14 +00:00
|
|
|
|
|
|
|
M_DEPS += system_top.v
|
|
|
|
M_DEPS += system_qsys.tcl
|
|
|
|
M_DEPS += system_project.tcl
|
|
|
|
M_DEPS += system_constr.sdc
|
|
|
|
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_tquest.tcl
|
2018-08-14 08:44:56 +00:00
|
|
|
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_project_intel.tcl
|
2018-03-22 16:15:14 +00:00
|
|
|
M_DEPS += $(HDL_PROJECT_PATH)scripts/adi_env.tcl
|
|
|
|
|
2018-08-14 08:44:56 +00:00
|
|
|
M_DEPS += $(foreach dep,$(LIB_DEPS),$(HDL_LIBRARY_PATH)$(dep)/.timestamp_intel)
|
2018-03-27 09:21:09 +00:00
|
|
|
|
2018-03-22 16:15:14 +00:00
|
|
|
.PHONY: all lib clean clean-all
|
|
|
|
all: lib $(PROJECT_NAME).sof
|
|
|
|
|
|
|
|
|
2018-03-27 09:21:09 +00:00
|
|
|
clean:
|
2018-03-25 07:21:37 +00:00
|
|
|
$(call clean, \
|
|
|
|
$(CLEAN_TARGET), \
|
|
|
|
$(HL)$(PROJECT_NAME)$(NC) project)
|
2018-03-22 16:15:14 +00:00
|
|
|
|
2018-03-27 09:21:09 +00:00
|
|
|
clean-all: clean
|
|
|
|
@for lib in $(LIB_DEPS); do \
|
|
|
|
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} clean; \
|
|
|
|
done
|
|
|
|
|
2018-03-22 16:15:14 +00:00
|
|
|
$(PROJECT_NAME).sof: $(M_DEPS)
|
|
|
|
-rm -rf $(CLEAN_TARGET)
|
2018-03-25 07:21:37 +00:00
|
|
|
$(call build,\
|
2018-08-13 13:59:02 +00:00
|
|
|
$(INTEL) system_project.tcl, \
|
2018-03-25 07:21:37 +00:00
|
|
|
$(PROJECT_NAME)_quartus.log, \
|
|
|
|
$(HL)$(PROJECT_NAME)$(NC))
|
2018-03-27 09:21:09 +00:00
|
|
|
|
|
|
|
lib:
|
|
|
|
@for lib in $(LIB_DEPS); do \
|
2018-08-13 13:59:02 +00:00
|
|
|
$(MAKE) -C $(HDL_LIBRARY_PATH)$${lib} intel || exit $$?; \
|
2018-03-27 09:21:09 +00:00
|
|
|
done
|