Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #
  2. # arch/blackfin/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. CROSS_COMPILE ?= bfin-uclinux-
  9. LDFLAGS_vmlinux := -X
  10. OBJCOPYFLAGS := -O binary -R .note -R .comment -S
  11. GZFLAGS := -9
  12. CFLAGS_MODULE += -mlong-calls
  13. KALLSYMS += --symbol-prefix=_
  14. KBUILD_DEFCONFIG := BF537-STAMP_defconfig
  15. # setup the machine name and the machine dependent settings
  16. machine-$(CONFIG_BF522) := bf527
  17. machine-$(CONFIG_BF525) := bf527
  18. machine-$(CONFIG_BF527) := bf527
  19. machine-$(CONFIG_BF531) := bf533
  20. machine-$(CONFIG_BF532) := bf533
  21. machine-$(CONFIG_BF533) := bf533
  22. machine-$(CONFIG_BF534) := bf537
  23. machine-$(CONFIG_BF536) := bf537
  24. machine-$(CONFIG_BF537) := bf537
  25. machine-$(CONFIG_BF542) := bf548
  26. machine-$(CONFIG_BF544) := bf548
  27. machine-$(CONFIG_BF548) := bf548
  28. machine-$(CONFIG_BF549) := bf548
  29. machine-$(CONFIG_BF561) := bf561
  30. MACHINE := $(machine-y)
  31. export MACHINE
  32. cpu-$(CONFIG_BF522) := bf522
  33. cpu-$(CONFIG_BF525) := bf525
  34. cpu-$(CONFIG_BF527) := bf527
  35. cpu-$(CONFIG_BF531) := bf531
  36. cpu-$(CONFIG_BF532) := bf532
  37. cpu-$(CONFIG_BF533) := bf533
  38. cpu-$(CONFIG_BF534) := bf534
  39. cpu-$(CONFIG_BF536) := bf536
  40. cpu-$(CONFIG_BF537) := bf537
  41. cpu-$(CONFIG_BF542) := bf542
  42. cpu-$(CONFIG_BF544) := bf544
  43. cpu-$(CONFIG_BF548) := bf548
  44. cpu-$(CONFIG_BF549) := bf549
  45. cpu-$(CONFIG_BF561) := bf561
  46. rev-$(CONFIG_BF_REV_0_0) := 0.0
  47. rev-$(CONFIG_BF_REV_0_1) := 0.1
  48. rev-$(CONFIG_BF_REV_0_2) := 0.2
  49. rev-$(CONFIG_BF_REV_0_3) := 0.3
  50. rev-$(CONFIG_BF_REV_0_4) := 0.4
  51. rev-$(CONFIG_BF_REV_0_5) := 0.5
  52. rev-$(CONFIG_BF_REV_NONE) := none
  53. rev-$(CONFIG_BF_REV_ANY) := any
  54. KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  55. KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  56. head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
  57. core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
  58. # If we have a machine-specific directory, then include it in the build.
  59. ifneq ($(machine-y),)
  60. core-y += arch/$(ARCH)/mach-$(MACHINE)/
  61. core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
  62. endif
  63. libs-y += arch/$(ARCH)/lib/
  64. drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
  65. # Update machine arch symlinks if something which affects
  66. # them changed. We use .mach to indicate when they were updated
  67. # last, otherwise make uses the target directory mtime.
  68. include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
  69. @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
  70. ifneq ($(KBUILD_SRC),)
  71. $(Q)mkdir -p include/asm-$(ARCH)
  72. $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
  73. else
  74. $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
  75. endif
  76. @touch $@
  77. CLEAN_FILES += \
  78. include/asm-$(ARCH)/asm-offsets.h \
  79. arch/$(ARCH)/kernel/asm-offsets.s \
  80. include/asm-$(ARCH)/mach \
  81. include/asm-$(ARCH)/.mach
  82. archprepare: include/asm-blackfin/.mach
  83. archclean:
  84. $(Q)$(MAKE) $(clean)=$(boot)
  85. all: vmImage
  86. boot := arch/$(ARCH)/boot
  87. BOOT_TARGETS = vmImage
  88. .PHONY: $(BOOT_TARGETS)
  89. $(BOOT_TARGETS): vmlinux
  90. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  91. define archhelp
  92. echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
  93. endef