Makefile 2.2 KB

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