xref: /openbmc/u-boot/board/xilinx/zynq/Makefile (revision 500ad54e)
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
7*9755e3dbSMichal Simekobj-y	+= ../common/board.o
866e6715cSMasahiro Yamada
96da4f67aSLuca Ceresoliifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
106da4f67aSLuca CeresoliPS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
116da4f67aSLuca Ceresoliinit-objs := ps_init_gpl.o
126da4f67aSLuca Ceresolispl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE)
136da4f67aSLuca Ceresoli	$(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
146da4f67aSLuca Ceresoliendif
1595b237ecSMasahiro Yamada
166da4f67aSLuca Ceresoliifeq ($(init-objs),)
176da4f67aSLuca Ceresolihw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
1895b237ecSMasahiro Yamadainit-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
1995b237ecSMasahiro Yamada	$(hw-platform-y)/ps7_init_gpl.o)
206da4f67aSLuca Ceresoliendif
2195b237ecSMasahiro Yamada
2295b237ecSMasahiro Yamadaifeq ($(init-objs),)
2395b237ecSMasahiro Yamadaifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
2495b237ecSMasahiro Yamadainit-objs := ps7_init_gpl.o
2595b237ecSMasahiro Yamada$(if $(CONFIG_SPL_BUILD),\
26260bdf07SMichal Simek$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/))
2795b237ecSMasahiro Yamadaendif
2895b237ecSMasahiro Yamadaendif
2995b237ecSMasahiro Yamada
3037e3a36aSSiva Durga Prasad Paladuguifndef CONFIG_SPL_BUILD
3137e3a36aSSiva Durga Prasad Paladuguobj-$(CONFIG_CMD_ZYNQ) += cmds.o
3237e3a36aSSiva Durga Prasad Paladuguobj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o
3337e3a36aSSiva Durga Prasad Paladuguendif
3437e3a36aSSiva Durga Prasad Paladugu
3595b237ecSMasahiro Yamadaobj-$(CONFIG_SPL_BUILD) += $(init-objs)
3632747491SMasahiro Yamada
3732747491SMasahiro Yamada# Suppress "warning: function declaration isn't a prototype"
38290f1f99SSoren BrinkmannCFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
399bd53b62SMasahiro Yamada
4095b237ecSMasahiro Yamada# To include xil_io.h
4195b237ecSMasahiro YamadaCFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src)
42