Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # arch/h8300/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. # (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp>
  9. #
  10. cflags-$(CONFIG_CPU_H8300H) := -mh
  11. aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h
  12. ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux
  13. cflags-$(CONFIG_CPU_H8S) := -ms
  14. aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s
  15. ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux
  16. KBUILD_CFLAGS += $(cflags-y)
  17. KBUILD_CFLAGS += -mint32 -fno-builtin
  18. KBUILD_CFLAGS += -D__linux__
  19. KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
  20. KBUILD_AFLAGS += $(aflags-y)
  21. LDFLAGS += $(ldflags-y)
  22. ifeq ($(CROSS_COMPILE),)
  23. CROSS_COMPILE := h8300-unknown-linux-
  24. endif
  25. core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
  26. ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
  27. core-y += arch/h8300/boot/dts/
  28. endif
  29. libs-y += arch/$(ARCH)/lib/
  30. boot := arch/h8300/boot
  31. %.dtb %.dtb.S %.dtb.o: | scripts
  32. $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
  33. PHONY += dtbs
  34. dtbs: scripts
  35. $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
  36. archmrproper:
  37. archclean:
  38. $(Q)$(MAKE) $(clean)=$(boot)
  39. vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
  40. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  41. define archhelp
  42. @echo 'vmlinux.bin - Create raw binary'
  43. @echo 'vmlinux.srec - Create srec binary'
  44. @echo 'zImage - Compressed kernel image'
  45. endef