Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. CROSS_COMPILE := h8300-unknown-linux-
  23. core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
  24. ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
  25. core-y += arch/h8300/boot/dts/
  26. endif
  27. libs-y += arch/$(ARCH)/lib/
  28. boot := arch/h8300/boot
  29. %.dtb %.dtb.S %.dtb.o: | scripts
  30. $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
  31. PHONY += dtbs
  32. dtbs: scripts
  33. $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
  34. archmrproper:
  35. archclean:
  36. $(Q)$(MAKE) $(clean)=$(boot)
  37. vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
  38. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  39. define archhelp
  40. @echo 'vmlinux.bin - Create raw binary'
  41. @echo 'vmlinux.srec - Create srec binary'
  42. @echo 'zImage - Compressed kernel image'
  43. endef