xref: /openbmc/u-boot/board/xilinx/zynq/Makefile (revision 37e3a36a)
183d290c5STom Rini# SPDX-License-Identifier: GPL-2.0+
2f22651cfSMichal Simek#
3f22651cfSMichal Simek# (C) Copyright 2000-2006
4f22651cfSMichal Simek# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5f22651cfSMichal Simek
6a79854a9SMasahiro Yamadaobj-y	:= board.o
766e6715cSMasahiro Yamada
86da4f67aSLuca Ceresoliifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
96da4f67aSLuca CeresoliPS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
106da4f67aSLuca Ceresoliinit-objs := ps_init_gpl.o
116da4f67aSLuca Ceresolispl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE)
126da4f67aSLuca Ceresoli	$(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
136da4f67aSLuca Ceresoliendif
1495b237ecSMasahiro Yamada
156da4f67aSLuca Ceresoliifeq ($(init-objs),)
166da4f67aSLuca Ceresolihw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
1795b237ecSMasahiro Yamadainit-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
1895b237ecSMasahiro Yamada	$(hw-platform-y)/ps7_init_gpl.o)
196da4f67aSLuca Ceresoliendif
2095b237ecSMasahiro Yamada
2195b237ecSMasahiro Yamadaifeq ($(init-objs),)
2295b237ecSMasahiro Yamadaifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
2395b237ecSMasahiro Yamadainit-objs := ps7_init_gpl.o
2495b237ecSMasahiro Yamada$(if $(CONFIG_SPL_BUILD),\
25260bdf07SMichal Simek$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/))
2695b237ecSMasahiro Yamadaendif
2795b237ecSMasahiro Yamadaendif
2895b237ecSMasahiro Yamada
29*37e3a36aSSiva Durga Prasad Paladuguifndef CONFIG_SPL_BUILD
30*37e3a36aSSiva Durga Prasad Paladuguobj-$(CONFIG_CMD_ZYNQ) += cmds.o
31*37e3a36aSSiva Durga Prasad Paladuguobj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o
32*37e3a36aSSiva Durga Prasad Paladuguendif
33*37e3a36aSSiva Durga Prasad Paladugu
3495b237ecSMasahiro Yamadaobj-$(CONFIG_SPL_BUILD) += $(init-objs)
3532747491SMasahiro Yamada
3632747491SMasahiro Yamada# Suppress "warning: function declaration isn't a prototype"
37290f1f99SSoren BrinkmannCFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
389bd53b62SMasahiro Yamada
3995b237ecSMasahiro Yamada# To include xil_io.h
4095b237ecSMasahiro YamadaCFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src)
41