Makefile
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #
  2. # ia64/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) 1998-2001 by David Mosberger-Tang <davidm@hpl.hp.com>
  9. #
  10. NM := $(CROSS_COMPILE)nm -B
  11. AWK := awk
  12. export AWK
  13. LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
  14. AFLAGS_KERNEL := -mconstant-gp
  15. EXTRA =
  16. CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 
  17.   -falign-functions=32
  18. # -ffunction-sections
  19. CFLAGS_KERNEL := -mconstant-gp
  20. GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
  21. ifneq ($(GCC_VERSION),2)
  22. CFLAGS += -frename-registers --param max-inline-insns=5000
  23. endif
  24. ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
  25. CFLAGS += -mb-step
  26. endif
  27. ifdef CONFIG_IA64_GENERIC
  28. CORE_FILES      :=      arch/$(ARCH)/hp/hp.o
  29. arch/$(ARCH)/dig/dig.a
  30. $(CORE_FILES)
  31. SUBDIRS := arch/$(ARCH)/hp
  32. arch/$(ARCH)/dig
  33. $(SUBDIRS)
  34. else # !GENERIC
  35. ifdef CONFIG_IA64_HP_SIM
  36.         SUBDIRS         :=      arch/$(ARCH)/hp
  37.                                 $(SUBDIRS)
  38.         CORE_FILES      :=      arch/$(ARCH)/hp/hp.o
  39.                                 $(CORE_FILES)
  40. endif
  41. ifdef CONFIG_IA64_HP_ZX1
  42.         SUBDIRS         :=      arch/$(ARCH)/hp
  43. arch/$(ARCH)/dig
  44.                                 $(SUBDIRS)
  45.         CORE_FILES      :=      arch/$(ARCH)/hp/hp.o
  46. arch/$(ARCH)/dig/dig.a
  47.                                 $(CORE_FILES)
  48. endif
  49. ifdef CONFIG_IA64_SGI_SN
  50. CFLAGS += -DBRINGUP
  51.         SUBDIRS         :=      arch/$(ARCH)/sn/kernel
  52. arch/$(ARCH)/sn/io
  53. arch/$(ARCH)/sn/fakeprom
  54. $(SUBDIRS)
  55.         CORE_FILES      :=      arch/$(ARCH)/sn/kernel/sn.o
  56. arch/$(ARCH)/sn/io/sgiio.o
  57. $(CORE_FILES)
  58. endif
  59. ifdef CONFIG_IA64_SOFTSDV
  60.         SUBDIRS         :=      arch/$(ARCH)/dig
  61. $(SUBDIRS)
  62.         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a
  63. $(CORE_FILES)
  64. endif
  65. ifdef CONFIG_IA64_DIG
  66.         SUBDIRS         :=      arch/$(ARCH)/dig
  67. $(SUBDIRS)
  68.         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a
  69. $(CORE_FILES)
  70. endif
  71. endif # !GENERIC
  72. ifdef CONFIG_IA32_SUPPORT
  73. SUBDIRS := arch/$(ARCH)/ia32 $(SUBDIRS)
  74. CORE_FILES := arch/$(ARCH)/ia32/ia32.o $(CORE_FILES)
  75. endif
  76. HEAD := arch/$(ARCH)/kernel/head.o arch/ia64/kernel/init_task.o
  77. SUBDIRS := arch/$(ARCH)/tools arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/lib $(SUBDIRS)
  78. CORE_FILES := arch/$(ARCH)/kernel/kernel.o arch/$(ARCH)/mm/mm.o $(CORE_FILES)
  79. LIBS := $(TOPDIR)/arch/$(ARCH)/lib/lib.a $(LIBS) 
  80. $(TOPDIR)/arch/$(ARCH)/lib/lib.a
  81. MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  82. vmlinux: arch/$(ARCH)/vmlinux.lds
  83. arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
  84. $(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) 
  85. -traditional arch/$(ARCH)/vmlinux.lds.S > $@
  86. FORCE: ;
  87. compressed: vmlinux
  88. $(OBJCOPY) --strip-all vmlinux vmlinux-tmp
  89. gzip vmlinux-tmp
  90. mv vmlinux-tmp.gz vmlinux.gz
  91. rawboot:
  92. @$(MAKEBOOT) rawboot
  93. #
  94. # My boot writes directly to a specific disk partition, I doubt most
  95. # people will want to do that without changes..
  96. #
  97. msb my-special-boot:
  98. @$(MAKEBOOT) msb
  99. bootimage:
  100. @$(MAKEBOOT) bootimage
  101. srmboot:
  102. @$(MAKEBOOT) srmboot
  103. archclean:
  104. @$(MAKEBOOT) clean
  105. archmrproper:
  106. rm -f arch/$(ARCH)/vmlinux.lds
  107. @$(MAKE) -C arch/$(ARCH)/tools mrproper
  108. archdep:
  109. @$(MAKEBOOT) dep
  110. bootpfile:
  111. @$(MAKEBOOT) bootpfile