Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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_BF531) := bf533
  17. machine-$(CONFIG_BF532) := bf533
  18. machine-$(CONFIG_BF533) := bf533
  19. machine-$(CONFIG_BF534) := bf537
  20. machine-$(CONFIG_BF536) := bf537
  21. machine-$(CONFIG_BF537) := bf537
  22. machine-$(CONFIG_BF542) := bf548
  23. machine-$(CONFIG_BF544) := bf548
  24. machine-$(CONFIG_BF548) := bf548
  25. machine-$(CONFIG_BF549) := bf548
  26. machine-$(CONFIG_BF561) := bf561
  27. MACHINE := $(machine-y)
  28. export MACHINE
  29. cpu-$(CONFIG_BF531) := bf531
  30. cpu-$(CONFIG_BF532) := bf532
  31. cpu-$(CONFIG_BF533) := bf533
  32. cpu-$(CONFIG_BF534) := bf534
  33. cpu-$(CONFIG_BF536) := bf536
  34. cpu-$(CONFIG_BF537) := bf537
  35. cpu-$(CONFIG_BF542) := bf542
  36. cpu-$(CONFIG_BF544) := bf544
  37. cpu-$(CONFIG_BF548) := bf548
  38. cpu-$(CONFIG_BF549) := bf549
  39. cpu-$(CONFIG_BF561) := bf561
  40. rev-$(CONFIG_BF_REV_0_0) := 0.0
  41. rev-$(CONFIG_BF_REV_0_1) := 0.1
  42. rev-$(CONFIG_BF_REV_0_2) := 0.2
  43. rev-$(CONFIG_BF_REV_0_3) := 0.3
  44. rev-$(CONFIG_BF_REV_0_4) := 0.4
  45. rev-$(CONFIG_BF_REV_0_5) := 0.5
  46. rev-$(CONFIG_BF_REV_NONE) := none
  47. rev-$(CONFIG_BF_REV_ANY) := any
  48. CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  49. AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
  50. head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
  51. core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
  52. # If we have a machine-specific directory, then include it in the build.
  53. ifneq ($(machine-y),)
  54. core-y += arch/$(ARCH)/mach-$(MACHINE)/
  55. core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
  56. endif
  57. libs-y += arch/$(ARCH)/lib/
  58. drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
  59. # Update machine arch symlinks if something which affects
  60. # them changed. We use .mach to indicate when they were updated
  61. # last, otherwise make uses the target directory mtime.
  62. include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
  63. @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
  64. ifneq ($(KBUILD_SRC),)
  65. $(Q)mkdir -p include/asm-$(ARCH)
  66. $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
  67. else
  68. $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
  69. endif
  70. @touch $@
  71. CLEAN_FILES += \
  72. include/asm-$(ARCH)/asm-offsets.h \
  73. arch/$(ARCH)/kernel/asm-offsets.s \
  74. include/asm-$(ARCH)/mach \
  75. include/asm-$(ARCH)/.mach
  76. archprepare: include/asm-blackfin/.mach
  77. archclean:
  78. $(Q)$(MAKE) $(clean)=$(boot)
  79. all: vmImage
  80. boot := arch/$(ARCH)/boot
  81. BOOT_TARGETS = vmImage
  82. .PHONY: $(BOOT_TARGETS)
  83. $(BOOT_TARGETS): vmlinux
  84. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  85. define archhelp
  86. echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
  87. endef