Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 __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 boot-uboot
  19. bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
  20. zImage Image: $(bootdir-y)
  21. $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
  22. $(addprefix $(obj)/,$(host-progs))
  23. $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
  24. OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
  25. vmlinux.bin: vmlinux FORCE
  26. $(call if_changed,objcopy)
  27. vmlinux.bin.gz: vmlinux.bin FORCE
  28. $(call if_changed,gzip)
  29. boot-elf: vmlinux.bin
  30. boot-redboot: vmlinux.bin.gz
  31. boot-uboot: vmlinux.bin.gz