Makefile
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

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 $(CROSS_COMPILE)$(HOSTCC) -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=400
  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.a
  29. arch/$(ARCH)/sn/sn.o
  30. arch/$(ARCH)/dig/dig.a
  31. arch/$(ARCH)/sn/io/sgiio.o 
  32. $(CORE_FILES)
  33. SUBDIRS := arch/$(ARCH)/hp
  34. arch/$(ARCH)/sn/sn1
  35. arch/$(ARCH)/sn
  36. arch/$(ARCH)/dig
  37. arch/$(ARCH)/sn/io
  38. $(SUBDIRS)
  39. else # !GENERIC
  40. ifdef CONFIG_IA64_HP_SIM
  41.         SUBDIRS         :=      arch/$(ARCH)/hp
  42.                                 $(SUBDIRS)
  43.         CORE_FILES      :=      arch/$(ARCH)/hp/hp.a
  44.                                 $(CORE_FILES)
  45. endif
  46. ifdef CONFIG_IA64_SGI_SN
  47. CFLAGS += -DBRINGUP
  48.         SUBDIRS         :=      arch/$(ARCH)/sn/kernel
  49. arch/$(ARCH)/sn/io
  50. arch/$(ARCH)/sn/fprom
  51. $(SUBDIRS)
  52.         CORE_FILES      :=      arch/$(ARCH)/sn/kernel/sn.o
  53. arch/$(ARCH)/sn/io/sgiio.o
  54. $(CORE_FILES)
  55. endif
  56. ifdef CONFIG_IA64_SOFTSDV
  57.         SUBDIRS         :=      arch/$(ARCH)/dig
  58. $(SUBDIRS)
  59.         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a
  60. $(CORE_FILES)
  61. endif
  62. ifdef CONFIG_IA64_DIG
  63.         SUBDIRS         :=      arch/$(ARCH)/dig
  64. $(SUBDIRS)
  65.         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a
  66. $(CORE_FILES)
  67. endif
  68. endif # !GENERIC
  69. ifdef CONFIG_IA32_SUPPORT
  70. SUBDIRS := arch/$(ARCH)/ia32 $(SUBDIRS)
  71. CORE_FILES := arch/$(ARCH)/ia32/ia32.o $(CORE_FILES)
  72. endif
  73. HEAD := arch/$(ARCH)/kernel/head.o arch/ia64/kernel/init_task.o
  74. SUBDIRS := arch/$(ARCH)/tools arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/lib $(SUBDIRS)
  75. CORE_FILES := arch/$(ARCH)/kernel/kernel.o arch/$(ARCH)/mm/mm.o $(CORE_FILES)
  76. LIBS := $(TOPDIR)/arch/$(ARCH)/lib/lib.a $(LIBS) 
  77. $(TOPDIR)/arch/$(ARCH)/lib/lib.a
  78. MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  79. vmlinux: arch/$(ARCH)/vmlinux.lds
  80. arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
  81. $(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) 
  82. -traditional arch/$(ARCH)/vmlinux.lds.S > $@
  83. FORCE: ;
  84. compressed: vmlinux
  85. $(OBJCOPY) --strip-all vmlinux vmlinux-tmp
  86. gzip vmlinux-tmp
  87. mv vmlinux-tmp.gz vmlinux.gz
  88. rawboot:
  89. @$(MAKEBOOT) rawboot
  90. #
  91. # My boot writes directly to a specific disk partition, I doubt most
  92. # people will want to do that without changes..
  93. #
  94. msb my-special-boot:
  95. @$(MAKEBOOT) msb
  96. bootimage:
  97. @$(MAKEBOOT) bootimage
  98. srmboot:
  99. @$(MAKEBOOT) srmboot
  100. archclean:
  101. @$(MAKEBOOT) clean
  102. archmrproper:
  103. rm -f arch/$(ARCH)/vmlinux.lds
  104. @$(MAKE) -C arch/$(ARCH)/tools mrproper
  105. archdep:
  106. @$(MAKEBOOT) dep
  107. bootpfile:
  108. @$(MAKEBOOT) bootpfile