Makefile 858 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # arch/xtensa/boot/Makefile
  3. #
  4. # This file is subject to the terms and conditions of the GNU General Public
  5. # License. See the file "COPYING" in the main directory of this archive
  6. # for more details.
  7. #
  8. #
  9. # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
  10. KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
  11. HOSTFLAGS += -Iarch/$(ARCH)/boot/include
  12. BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
  13. export ccflags-y
  14. export BIG_ENDIAN
  15. subdir-y := lib
  16. # Subdirs for the boot loader(s)
  17. bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
  18. bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf
  19. zImage zImage.initrd Image Image.initrd: $(bootdir-y)
  20. $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
  21. $(addprefix $(obj)/,$(host-progs))
  22. $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)