Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
  9. #
  10. NM := $(CROSS_COMPILE)nm -B
  11. READELF := $(CROSS_COMPILE)readelf
  12. export AWK
  13. CHECKFLAGS += -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
  14. OBJCOPYFLAGS := --strip-all
  15. LDFLAGS_vmlinux := -static
  16. LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds
  17. AFLAGS_KERNEL := -mconstant-gp
  18. EXTRA :=
  19. cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
  20. -falign-functions=32 -frename-registers -fno-optimize-sibling-calls
  21. CFLAGS_KERNEL := -mconstant-gp
  22. GCC_VERSION := $(call cc-version)
  23. GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
  24. CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
  25. ifeq ($(GAS_STATUS),buggy)
  26. $(error Sorry, you need a newer version of the assember, one that is built from \
  27. a source-tree that post-dates 18-Dec-2002. You can find a pre-compiled \
  28. static binary of such an assembler at: \
  29. \
  30. ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
  31. endif
  32. ifneq ($(shell if [ $(GCC_VERSION) -lt 0300 ] ; then echo "bad"; fi ;),)
  33. $(error Sorry, your compiler is too old. GCC v2.96 is known to generate bad code.)
  34. endif
  35. ifeq ($(GCC_VERSION),0304)
  36. cflags-$(CONFIG_ITANIUM) += -mtune=merced
  37. cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
  38. endif
  39. CFLAGS += $(cflags-y)
  40. head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
  41. libs-y += arch/ia64/lib/
  42. core-y += arch/ia64/kernel/ arch/ia64/mm/
  43. core-$(CONFIG_IA32_SUPPORT) += arch/ia64/ia32/
  44. core-$(CONFIG_IA64_DIG) += arch/ia64/dig/
  45. core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/
  46. core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
  47. core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
  48. core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
  49. drivers-$(CONFIG_PCI) += arch/ia64/pci/
  50. drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
  51. drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
  52. drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
  53. drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/
  54. drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/
  55. boot := arch/ia64/hp/sim/boot
  56. .PHONY: boot compressed check
  57. all: compressed unwcheck
  58. compressed: vmlinux.gz
  59. vmlinux.gz: vmlinux
  60. $(Q)$(MAKE) $(build)=$(boot) $@
  61. unwcheck: vmlinux
  62. -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $<
  63. archclean:
  64. $(Q)$(MAKE) $(clean)=$(boot)
  65. archprepare: include/asm-ia64/.offsets.h.stamp
  66. include/asm-ia64/.offsets.h.stamp:
  67. mkdir -p include/asm-ia64
  68. [ -s include/asm-ia64/asm-offsets.h ] \
  69. || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/asm-offsets.h
  70. touch $@
  71. CLEAN_FILES += vmlinux.gz bootloader include/asm-ia64/.offsets.h.stamp
  72. boot: lib/lib.a vmlinux
  73. $(Q)$(MAKE) $(build)=$(boot) $@
  74. install: vmlinux.gz
  75. sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
  76. define archhelp
  77. echo '* compressed - Build compressed kernel image'
  78. echo ' install - Install compressed kernel image'
  79. echo ' boot - Build vmlinux and bootloader for Ski simulator'
  80. echo '* unwcheck - Check vmlinux for invalid unwind info'
  81. endef