Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. .PHONY: maketools FORCE
  41. maketools: FORCE
  42. # Convert bzImage to zImage
  43. bzImage: vmlinux
  44. $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  45. zImage Image bootpImage xipImage: vmlinux
  46. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  47. zinstall install: vmlinux
  48. $(Q)$(MAKE) $(build)=$(boot) $@
  49. # We use MRPROPER_FILES and CLEAN_FILES now
  50. archclean:
  51. $(Q)$(MAKE) $(clean)=$(boot)
  52. # My testing targets (that short circuit a few dependencies)
  53. zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
  54. Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
  55. bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
  56. i:; $(Q)$(MAKE) $(build)=$(boot) install
  57. zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
  58. #
  59. # Configuration targets. Use these to select a
  60. # configuration for your architecture
  61. %_config:
  62. @( \
  63. CFG=$(@:_config=); \
  64. if [ -f arch/arm26/def-configs/$$CFG ]; then \
  65. [ -f .config ] && mv -f .config .config.old; \
  66. cp arch/arm26/def-configs/$$CFG .config; \
  67. echo "*** Default configuration for $$CFG installed"; \
  68. echo "*** Next, you may run 'make oldconfig'"; \
  69. else \
  70. echo "$$CFG does not exist"; \
  71. fi; \
  72. )
  73. define archhelp
  74. echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
  75. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  76. echo ' bootpImage - Combined zImage and initial RAM disk'
  77. echo ' xipImage - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
  78. echo ' initrd - Create an initial image'
  79. echo ' install - Install uncompressed kernel'
  80. echo ' zinstall - Install compressed kernel'
  81. echo ' Install using (your) ~/bin/installkernel or'
  82. echo ' (distribution) /sbin/installkernel or'
  83. echo ' install to $$(INSTALL_PATH) and run lilo'
  84. endef