Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
  26. core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
  27. # If we have a machine-specific directory, then include it in the build.
  28. ifneq ($(machine-y),)
  29. core-y += arch/$(ARCH)/mach-$(MACHINE)/
  30. core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
  31. endif
  32. libs-y += arch/$(ARCH)/lib/
  33. drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
  34. # Update machine arch symlinks if something which affects
  35. # them changed. We use .mach to indicate when they were updated
  36. # last, otherwise make uses the target directory mtime.
  37. include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
  38. @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
  39. ifneq ($(KBUILD_SRC),)
  40. $(Q)mkdir -p include/asm-$(ARCH)
  41. $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
  42. else
  43. $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
  44. endif
  45. @touch $@
  46. CLEAN_FILES += \
  47. include/asm-$(ARCH)/asm-offsets.h \
  48. arch/$(ARCH)/kernel/asm-offsets.s \
  49. include/asm-$(ARCH)/mach \
  50. include/asm-$(ARCH)/.mach
  51. archprepare: include/asm-blackfin/.mach
  52. archclean:
  53. $(Q)$(MAKE) $(clean)=$(boot)
  54. all: vmImage
  55. boot := arch/$(ARCH)/boot
  56. BOOT_TARGETS = vmImage
  57. .PHONY: $(BOOT_TARGETS)
  58. $(BOOT_TARGETS): vmlinux
  59. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  60. define archhelp
  61. echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
  62. endef