Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #
  2. # arch/arm26/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. # Copyright (C) 1995-2001 by Russell King
  9. # Copyright (c) 2004 Ian Molton
  10. LDFLAGS_vmlinux :=-p -X
  11. CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
  12. OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
  13. GZFLAGS :=-9
  14. ifeq ($(CONFIG_FRAME_POINTER),y)
  15. CFLAGS +=-fno-omit-frame-pointer -mno-sched-prolog
  16. endif
  17. ifeq ($(CONFIG_DEBUG_INFO),y)
  18. CFLAGS +=-g
  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. prepare: include/asm-$(ARCH)/asm_offsets.h
  44. CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
  45. .PHONY: maketools FORCE
  46. maketools: FORCE
  47. # Convert bzImage to zImage
  48. bzImage: vmlinux
  49. $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  50. zImage Image bootpImage xipImage: vmlinux
  51. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  52. zinstall install: vmlinux
  53. $(Q)$(MAKE) $(build)=$(boot) $@
  54. # We use MRPROPER_FILES and CLEAN_FILES now
  55. archclean:
  56. $(Q)$(MAKE) $(clean)=$(boot)
  57. # My testing targets (that short circuit a few dependencies)
  58. zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  59. Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
  60. bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
  61. i:; $(Q)$(MAKE) $(build)=$(boot) install
  62. zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
  63. #
  64. # Configuration targets. Use these to select a
  65. # configuration for your architecture
  66. %_config:
  67. @( \
  68. CFG=$(@:_config=); \
  69. if [ -f arch/arm26/def-configs/$$CFG ]; then \
  70. [ -f .config ] && mv -f .config .config.old; \
  71. cp arch/arm26/def-configs/$$CFG .config; \
  72. echo "*** Default configuration for $$CFG installed"; \
  73. echo "*** Next, you may run 'make oldconfig'"; \
  74. else \
  75. echo "$$CFG does not exist"; \
  76. fi; \
  77. )
  78. arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
  79. include/config/MARKER
  80. include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
  81. $(call filechk,gen-asm-offsets)
  82. define archhelp
  83. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  84. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  85. echo ' bootpImage - Combined zImage and initial RAM disk'
  86. echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
  87. echo ' initrd - Create an initial image'
  88. echo ' install - Install uncompressed kernel'
  89. echo ' zinstall - Install compressed kernel'
  90. echo ' Install using (your) ~/bin/installkernel or'
  91. echo ' (distribution) /sbin/installkernel or'
  92. echo ' install to $$(INSTALL_PATH) and run lilo'
  93. endef