Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Michal Simek | f22651c | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 2 | # |
| 3 | # (C) Copyright 2000-2006 |
| 4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
Michal Simek | f22651c | 2012-09-28 09:56:37 +0000 | [diff] [blame] | 5 | |
Masahiro Yamada | a79854a | 2013-10-21 11:53:37 +0900 | [diff] [blame] | 6 | obj-y := board.o |
Michal Simek | 9755e3d | 2019-01-21 15:25:02 +0100 | [diff] [blame] | 7 | obj-y += ../common/board.o |
Masahiro Yamada | 66e6715 | 2014-05-12 12:18:30 +0900 | [diff] [blame] | 8 | |
Luca Ceresoli | 6da4f67 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 9 | ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"") |
| 10 | PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE)) |
| 11 | init-objs := ps_init_gpl.o |
| 12 | spl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE) |
| 13 | $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^ |
| 14 | endif |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 15 | |
Luca Ceresoli | 6da4f67 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 16 | ifeq ($(init-objs),) |
| 17 | hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 18 | init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\ |
| 19 | $(hw-platform-y)/ps7_init_gpl.o) |
Luca Ceresoli | 6da4f67 | 2018-06-22 12:40:16 +0200 | [diff] [blame] | 20 | endif |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 21 | |
| 22 | ifeq ($(init-objs),) |
| 23 | ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),) |
| 24 | init-objs := ps7_init_gpl.o |
| 25 | $(if $(CONFIG_SPL_BUILD),\ |
Michal Simek | 260bdf0 | 2015-07-21 11:05:31 +0200 | [diff] [blame] | 26 | $(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custom_hw_platform/)) |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 27 | endif |
| 28 | endif |
| 29 | |
Siva Durga Prasad Paladugu | 37e3a36 | 2018-06-26 15:02:19 +0530 | [diff] [blame] | 30 | ifndef CONFIG_SPL_BUILD |
| 31 | obj-$(CONFIG_CMD_ZYNQ) += cmds.o |
| 32 | obj-$(CONFIG_CMD_ZYNQ_RSA) += bootimg.o |
| 33 | endif |
| 34 | |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 35 | obj-$(CONFIG_SPL_BUILD) += $(init-objs) |
Masahiro Yamada | 3274749 | 2014-05-29 14:46:13 +0900 | [diff] [blame] | 36 | |
| 37 | # Suppress "warning: function declaration isn't a prototype" |
Soren Brinkmann | 290f1f9 | 2014-10-30 10:52:43 -0700 | [diff] [blame] | 38 | CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes |
Masahiro Yamada | 9bd53b6 | 2015-05-18 15:31:51 +0900 | [diff] [blame] | 39 | |
Masahiro Yamada | 95b237e | 2015-05-18 15:31:52 +0900 | [diff] [blame] | 40 | # To include xil_io.h |
| 41 | CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src) |