Back to home page

LXR

 
 

    


0001 #
0002 # ia64/Makefile
0003 #
0004 # This file is included by the global makefile so that you can add your own
0005 # architecture-specific flags and dependencies.
0006 #
0007 # This file is subject to the terms and conditions of the GNU General Public
0008 # License.  See the file "COPYING" in the main directory of this archive
0009 # for more details.
0010 #
0011 # Copyright (C) 1998-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
0012 #
0013 
0014 KBUILD_DEFCONFIG := generic_defconfig
0015 
0016 NM := $(CROSS_COMPILE)nm -B
0017 READELF := $(CROSS_COMPILE)readelf
0018 
0019 export AWK
0020 
0021 CHECKFLAGS      += -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
0022 
0023 OBJCOPYFLAGS    := --strip-all
0024 LDFLAGS_vmlinux := -static
0025 KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds
0026 KBUILD_AFLAGS_KERNEL := -mconstant-gp
0027 EXTRA           :=
0028 
0029 cflags-y        := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
0030                    -falign-functions=32 -frename-registers -fno-optimize-sibling-calls
0031 KBUILD_CFLAGS_KERNEL := -mconstant-gp
0032 
0033 GAS_STATUS      = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
0034 KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
0035 
0036 ifeq ($(GAS_STATUS),buggy)
0037 $(error Sorry, you need a newer version of the assember, one that is built from \
0038         a source-tree that post-dates 18-Dec-2002.  You can find a pre-compiled \
0039         static binary of such an assembler at:                                  \
0040                                                                                 \
0041                 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
0042 endif
0043 
0044 KBUILD_CFLAGS += $(cflags-y)
0045 head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
0046 
0047 libs-y                          += arch/ia64/lib/
0048 core-y                          += arch/ia64/kernel/ arch/ia64/mm/
0049 core-$(CONFIG_IA64_DIG)         += arch/ia64/dig/
0050 core-$(CONFIG_IA64_DIG_VTD)     += arch/ia64/dig/
0051 core-$(CONFIG_IA64_GENERIC)     += arch/ia64/dig/
0052 core-$(CONFIG_IA64_HP_ZX1)      += arch/ia64/dig/
0053 core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
0054 core-$(CONFIG_IA64_SGI_SN2)     += arch/ia64/sn/
0055 core-$(CONFIG_IA64_SGI_UV)      += arch/ia64/uv/
0056 
0057 drivers-$(CONFIG_PCI)           += arch/ia64/pci/
0058 drivers-$(CONFIG_IA64_HP_SIM)   += arch/ia64/hp/sim/
0059 drivers-$(CONFIG_IA64_HP_ZX1)   += arch/ia64/hp/common/ arch/ia64/hp/zx1/
0060 drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
0061 drivers-$(CONFIG_IA64_GENERIC)  += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/ arch/ia64/uv/
0062 drivers-$(CONFIG_OPROFILE)      += arch/ia64/oprofile/
0063 
0064 boot := arch/ia64/hp/sim/boot
0065 
0066 PHONY += boot compressed check
0067 
0068 all: compressed unwcheck
0069 
0070 compressed: vmlinux.gz
0071 
0072 vmlinuz: vmlinux.gz
0073 
0074 vmlinux.gz: vmlinux
0075         $(Q)$(MAKE) $(build)=$(boot) $@
0076 
0077 unwcheck: vmlinux
0078         -$(Q)READELF=$(READELF) $(PYTHON) $(srctree)/arch/ia64/scripts/unwcheck.py $<
0079 
0080 archclean:
0081         $(Q)$(MAKE) $(clean)=$(boot)
0082 
0083 CLEAN_FILES += vmlinux.gz bootloader
0084 
0085 boot:   lib/lib.a vmlinux
0086         $(Q)$(MAKE) $(build)=$(boot) $@
0087 
0088 install: vmlinux.gz
0089         sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
0090 
0091 define archhelp
0092   echo '* compressed    - Build compressed kernel image'
0093   echo '  install       - Install compressed kernel image'
0094   echo '  boot          - Build vmlinux and bootloader for Ski simulator'
0095   echo '* unwcheck      - Check vmlinux for invalid unwind info'
0096 endef
0097 
0098 archprepare: make_nr_irqs_h
0099 PHONY += make_nr_irqs_h
0100 
0101 make_nr_irqs_h:
0102         $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h