Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. CFLAGS_BOOT :=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
  18. CFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
  19. AFLAGS +=-mapcs-26 -mcpu=arm3 -msoft-float
  20. ifeq ($(CONFIG_XIP_KERNEL),y)
  21. TEXTADDR := 0x03880000
  22. DATAADDR := 0x02080000
  23. else
  24. TEXTADDR := 0x02080000
  25. DATAADDR := .
  26. endif
  27. head-y := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o
  28. ifeq ($(incdir-y),)
  29. incdir-y :=
  30. endif
  31. INCDIR :=
  32. export MACHINE TEXTADDR GZFLAGS CFLAGS_BOOT
  33. # If we have a machine-specific directory, then include it in the build.
  34. core-y += arch/arm26/kernel/ arch/arm26/mm/ arch/arm26/machine/
  35. core-$(CONFIG_FPE_NWFPE) += arch/arm26/nwfpe/
  36. libs-y += arch/arm26/lib/
  37. # Default target when executing plain make
  38. all: zImage
  39. boot := arch/arm26/boot
  40. prepare: include/asm-$(ARCH)/asm_offsets.h
  41. CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
  42. .PHONY: maketools FORCE
  43. maketools: FORCE
  44. # Convert bzImage to zImage
  45. bzImage: vmlinux
  46. $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  47. zImage Image bootpImage xipImage: vmlinux
  48. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  49. zinstall install: vmlinux
  50. $(Q)$(MAKE) $(build)=$(boot) $@
  51. # We use MRPROPER_FILES and CLEAN_FILES now
  52. archclean:
  53. $(Q)$(MAKE) $(clean)=$(boot)
  54. # My testing targets (that short circuit a few dependencies)
  55. zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  56. Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
  57. bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
  58. i:; $(Q)$(MAKE) $(build)=$(boot) install
  59. zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
  60. #
  61. # Configuration targets. Use these to select a
  62. # configuration for your architecture
  63. %_config:
  64. @( \
  65. CFG=$(@:_config=); \
  66. if [ -f arch/arm26/def-configs/$$CFG ]; then \
  67. [ -f .config ] && mv -f .config .config.old; \
  68. cp arch/arm26/def-configs/$$CFG .config; \
  69. echo "*** Default configuration for $$CFG installed"; \
  70. echo "*** Next, you may run 'make oldconfig'"; \
  71. else \
  72. echo "$$CFG does not exist"; \
  73. fi; \
  74. )
  75. arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
  76. include/config/MARKER
  77. include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
  78. $(call filechk,gen-asm-offsets)
  79. define archhelp
  80. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  81. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  82. echo ' bootpImage - Combined zImage and initial RAM disk'
  83. echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
  84. echo ' initrd - Create an initial image'
  85. echo ' install - Install uncompressed kernel'
  86. echo ' zinstall - Install compressed kernel'
  87. echo ' Install using (your) ~/bin/installkernel or'
  88. echo ' (distribution) /sbin/installkernel or'
  89. echo ' install to $$(INSTALL_PATH) and run lilo'
  90. endef