Makefile 1.0 KB

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