Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #
  2. # arch/arm26/Makefile
  3. #
  4. # This file is included by the global makefile so that you can add your own
  5. # architecture-specific flags and dependencies.
  6. #
  7. # This file is subject to the terms and conditions of the GNU General Public
  8. # License. See the file "COPYING" in the main directory of this archive
  9. # for more details.
  10. #
  11. # Copyright (C) 1995-2001 by Russell King
  12. # Copyright (c) 2004 Ian Molton
  13. LDFLAGS_vmlinux :=-p -X
  14. CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
  15. OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
  16. GZFLAGS :=-9
  17. ifeq ($(CONFIG_FRAME_POINTER),y)
  18. CFLAGS +=-fno-omit-frame-pointer -mno-sched-prolog
  19. endif
  20. CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
  21. CFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
  22. AFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float
  23. ifeq ($(CONFIG_XIP_KERNEL),y)
  24. TEXTADDR := 0x03880000
  25. DATAADDR := 0x02080000
  26. else
  27. TEXTADDR := 0x02080000
  28. DATAADDR := .
  29. endif
  30. head-y := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o
  31. ifeq ($(incdir-y),)
  32. incdir-y :=
  33. endif
  34. INCDIR :=
  35. export MACHINE TEXTADDR GZFLAGS CFLAGS_BOOT
  36. # If we have a machine-specific directory, then include it in the build.
  37. core-y += arch/arm26/kernel/ arch/arm26/mm/ arch/arm26/machine/
  38. core-$(CONFIG_FPE_NWFPE) += arch/arm26/nwfpe/
  39. libs-y += arch/arm26/lib/
  40. # Default target when executing plain make
  41. all: zImage
  42. boot := arch/arm26/boot
  43. PHONY += maketools FORCE
  44. maketools: FORCE
  45. # Convert bzImage to zImage
  46. bzImage: vmlinux
  47. $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  48. zImage Image bootpImage xipImage: vmlinux
  49. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  50. zinstall install: vmlinux
  51. $(Q)$(MAKE) $(build)=$(boot) $@
  52. # We use MRPROPER_FILES and CLEAN_FILES now
  53. archclean:
  54. $(Q)$(MAKE) $(clean)=$(boot)
  55. # My testing targets (that short circuit a few dependencies)
  56. zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  57. Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
  58. bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
  59. i:; $(Q)$(MAKE) $(build)=$(boot) install
  60. zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
  61. #
  62. # Configuration targets. Use these to select a
  63. # configuration for your architecture
  64. %_config:
  65. @( \
  66. CFG=$(@:_config=); \
  67. if [ -f arch/arm26/def-configs/$$CFG ]; then \
  68. [ -f .config ] && mv -f .config .config.old; \
  69. cp arch/arm26/def-configs/$$CFG .config; \
  70. echo "*** Default configuration for $$CFG installed"; \
  71. echo "*** Next, you may run 'make oldconfig'"; \
  72. else \
  73. echo "$$CFG does not exist"; \
  74. fi; \
  75. )
  76. define archhelp
  77. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  78. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  79. echo ' bootpImage - Combined zImage and initial RAM disk'
  80. echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
  81. echo ' initrd - Create an initial image'
  82. echo ' install - Install uncompressed kernel'
  83. echo ' zinstall - Install compressed kernel'
  84. echo ' Install using (your) ~/bin/installkernel or'
  85. echo ' (distribution) /sbin/installkernel or'
  86. echo ' install to $$(INSTALL_PATH) and run lilo'
  87. endef