Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
  9. #
  10. platform-$(CONFIG_CPU_H8300H) := h8300h
  11. platform-$(CONFIG_CPU_H8S) := h8s
  12. PLATFORM := $(platform-y)
  13. board-$(CONFIG_H8300H_GENERIC) := generic
  14. board-$(CONFIG_H8300H_AKI3068NET) := aki3068net
  15. board-$(CONFIG_H8300H_H8MAX) := h8max
  16. board-$(CONFIG_H8300H_SIM) := generic
  17. board-$(CONFIG_H8S_GENERIC) := generic
  18. board-$(CONFIG_H8S_EDOSK2674) := edosk2674
  19. board-$(CONFIG_H8S_SIM) := generic
  20. BOARD := $(board-y)
  21. model-$(CONFIG_RAMKERNEL) := ram
  22. model-$(CONFIG_ROMKERNEL) := rom
  23. MODEL := $(model-y)
  24. cflags-$(CONFIG_CPU_H8300H) := -mh
  25. ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf
  26. cflags-$(CONFIG_CPU_H8S) := -ms
  27. ldflags-$(CONFIG_CPU_H8S) := -mh8300self
  28. KBUILD_CFLAGS += $(cflags-y)
  29. KBUILD_CFLAGS += -mint32 -fno-builtin
  30. KBUILD_CFLAGS += -g
  31. KBUILD_CFLAGS += -D__linux__
  32. KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
  33. KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
  34. LDFLAGS += $(ldflags-y)
  35. CROSS_COMPILE = h8300-elf-
  36. LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  37. head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
  38. core-y += arch/$(ARCH)/kernel/ \
  39. arch/$(ARCH)/mm/
  40. ifdef PLATFORM
  41. core-y += arch/$(ARCH)/platform/$(PLATFORM)/ \
  42. arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/
  43. endif
  44. libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
  45. boot := arch/h8300/boot
  46. export MODEL PLATFORM BOARD
  47. archmrproper:
  48. archclean:
  49. $(Q)$(MAKE) $(clean)=$(boot)
  50. vmlinux.srec vmlinux.bin zImage: vmlinux
  51. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  52. define archhelp
  53. @echo 'vmlinux.bin - Create raw binary'
  54. @echo 'vmlinux.srec - Create srec binary'
  55. @echo 'zImage - Compressed kernel image'
  56. endef