Makefile 2.8 KB

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