Makefile 893 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # (C) Copyright 2014 - 2016 Xilinx, Inc.
  3. # Michal Simek <michal.simek@xilinx.com>
  4. #
  5. # SPDX-License-Identifier: GPL-2.0+
  6. #
  7. obj-y := zynqmp.o
  8. hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
  9. init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\
  10. $(hw-platform-y)/psu_init_gpl.o)
  11. ifeq ($(init-objs),)
  12. ifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),)
  13. init-objs := psu_init_gpl.o
  14. $(if $(CONFIG_SPL_BUILD),\
  15. $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/))
  16. endif
  17. endif
  18. obj-$(CONFIG_SPL_BUILD) += $(init-objs)
  19. # Suppress "warning: function declaration isn't a prototype"
  20. CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
  21. # To include xil_io.h
  22. CFLAGS_psu_init_gpl.o := -I$(srctree)/$(src)
  23. # To suppress "warning: cast to pointer from integer of different size"
  24. CFLAGS_psu_init_gpl.o += -Wno-int-to-pointer-cast