xref: /openbmc/u-boot/board/xilinx/zynqmp/Makefile (revision e6a9ed04)
184c7204bSMichal Simek#
2*e6a9ed04SMichal Simek# (C) Copyright 2014 - 2016 Xilinx, Inc.
384c7204bSMichal Simek# Michal Simek <michal.simek@xilinx.com>
484c7204bSMichal Simek#
584c7204bSMichal Simek# SPDX-License-Identifier:	GPL-2.0+
684c7204bSMichal Simek#
784c7204bSMichal Simek
884c7204bSMichal Simekobj-y	:= zynqmp.o
9*e6a9ed04SMichal Simek
10*e6a9ed04SMichal Simekhw-platform-y :=$(shell echo $(CONFIG_SYS_CONFIG_NAME))
11*e6a9ed04SMichal Simek
12*e6a9ed04SMichal Simekinit-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\
13*e6a9ed04SMichal Simek	$(hw-platform-y)/psu_init_gpl.o)
14*e6a9ed04SMichal Simek
15*e6a9ed04SMichal Simekifeq ($(init-objs),)
16*e6a9ed04SMichal Simekifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),)
17*e6a9ed04SMichal Simekinit-objs := psu_init_gpl.o
18*e6a9ed04SMichal Simek$(if $(CONFIG_SPL_BUILD),\
19*e6a9ed04SMichal Simek$(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/))
20*e6a9ed04SMichal Simekendif
21*e6a9ed04SMichal Simekendif
22*e6a9ed04SMichal Simek
23*e6a9ed04SMichal Simekobj-$(CONFIG_SPL_BUILD) += $(init-objs)
24*e6a9ed04SMichal Simek
25*e6a9ed04SMichal Simek# Suppress "warning: function declaration isn't a prototype"
26*e6a9ed04SMichal SimekCFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
27*e6a9ed04SMichal Simek
28*e6a9ed04SMichal Simek# To include xil_io.h
29*e6a9ed04SMichal SimekCFLAGS_psu_init_gpl.o := -I$(srctree)/$(src)
30