Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #
  2. # linux/arch/c6x/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. cflags-y += -mno-dsbt -msdata=none
  9. cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
  10. CFLAGS_MODULE += -mlong-calls -mno-dsbt -msdata=none
  11. CHECKFLAGS +=
  12. KBUILD_CFLAGS += $(cflags-y)
  13. KBUILD_AFLAGS += $(cflags-y)
  14. ifdef CONFIG_CPU_BIG_ENDIAN
  15. KBUILD_CFLAGS += -mbig-endian
  16. KBUILD_AFLAGS += -mbig-endian
  17. LINKFLAGS += -mbig-endian
  18. KBUILD_LDFLAGS += -mbig-endian
  19. LDFLAGS += -EB
  20. endif
  21. head-y := arch/c6x/kernel/head.o
  22. core-y += arch/c6x/kernel/ arch/c6x/mm/ arch/c6x/platforms/
  23. libs-y += arch/c6x/lib/
  24. # Default to vmlinux.bin, override when needed
  25. all: vmlinux.bin
  26. boot := arch/$(ARCH)/boot
  27. # Are we making a dtbImage.<boardname> target? If so, crack out the boardname
  28. DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
  29. export DTB
  30. ifneq ($(DTB),)
  31. core-y += $(boot)/
  32. endif
  33. # With make 3.82 we cannot mix normal and wildcard targets
  34. vmlinux.bin: vmlinux
  35. $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
  36. dtbImage.%: vmlinux
  37. $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
  38. archclean:
  39. $(Q)$(MAKE) $(clean)=$(boot)
  40. define archhelp
  41. @echo ' vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
  42. @echo ' dtbImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
  43. @echo ' - stripped elf with fdt blob'
  44. endef