Makefile 1.6 KB

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