Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. CFLAGS += $(cflags-y)
  29. CFLAGS += -mint32 -fno-builtin
  30. CFLAGS += -g
  31. CFLAGS += -D__linux__
  32. CFLAGS += -DUTS_SYSNAME=\"uClinux\"
  33. AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
  34. LDFLAGS += $(ldflags-y)
  35. CROSS_COMPILE = h8300-elf-
  36. LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
  37. head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).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. prepare: include/asm-$(ARCH)/asm-offsets.h
  51. include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
  52. include/asm include/linux/version.h
  53. $(call filechk,gen-asm-offsets)
  54. vmlinux.srec vmlinux.bin: vmlinux
  55. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  56. define archhelp
  57. echo 'vmlinux.bin - Create raw binary'
  58. echo 'vmlinux.srec - Create srec binary'
  59. endef
  60. CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h