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
8 # Copyright (C) 1998-2001 by David Mosberger-Tang <davidm@hpl.hp.com>
11 NM := $(CROSS_COMPILE)nm -B
16 LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
17 AFLAGS_KERNEL := -mconstant-gp
20 CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \
23 CFLAGS_KERNEL := -mconstant-gp
25 GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
27 ifneq ($(GCC_VERSION),2)
28 CFLAGS += -frename-registers --param max-inline-insns=5000
31 ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
35 ifdef CONFIG_IA64_GENERIC
36 CORE_FILES := arch/$(ARCH)/hp/hp.o \
37 arch/$(ARCH)/dig/dig.a \
39 SUBDIRS := arch/$(ARCH)/hp \
45 ifdef CONFIG_IA64_HP_SIM
46 SUBDIRS := arch/$(ARCH)/hp \
48 CORE_FILES := arch/$(ARCH)/hp/hp.o \
52 ifdef CONFIG_IA64_HP_ZX1
53 SUBDIRS := arch/$(ARCH)/hp \
56 CORE_FILES := arch/$(ARCH)/hp/hp.o \
57 arch/$(ARCH)/dig/dig.a \
61 ifdef CONFIG_IA64_SGI_SN
63 SUBDIRS := arch/$(ARCH)/sn/kernel \
65 arch/$(ARCH)/sn/fakeprom \
67 CORE_FILES := arch/$(ARCH)/sn/kernel/sn.o \
68 arch/$(ARCH)/sn/io/sgiio.o \
72 ifdef CONFIG_IA64_SOFTSDV
73 SUBDIRS := arch/$(ARCH)/dig \
75 CORE_FILES := arch/$(ARCH)/dig/dig.a \
80 SUBDIRS := arch/$(ARCH)/dig \
82 CORE_FILES := arch/$(ARCH)/dig/dig.a \
88 ifdef CONFIG_IA32_SUPPORT
89 SUBDIRS := arch/$(ARCH)/ia32 $(SUBDIRS)
90 CORE_FILES := arch/$(ARCH)/ia32/ia32.o $(CORE_FILES)
93 HEAD := arch/$(ARCH)/kernel/head.o arch/ia64/kernel/init_task.o
95 SUBDIRS := arch/$(ARCH)/tools arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/lib $(SUBDIRS)
96 CORE_FILES := arch/$(ARCH)/kernel/kernel.o arch/$(ARCH)/mm/mm.o $(CORE_FILES)
98 LIBS := $(TOPDIR)/arch/$(ARCH)/lib/lib.a $(LIBS) \
99 $(TOPDIR)/arch/$(ARCH)/lib/lib.a
101 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
103 vmlinux: arch/$(ARCH)/vmlinux.lds
105 arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
106 $(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) \
107 -traditional arch/$(ARCH)/vmlinux.lds.S > $@
112 $(OBJCOPY) --strip-all vmlinux vmlinux-tmp
114 mv vmlinux-tmp.gz vmlinux.gz
120 # My boot writes directly to a specific disk partition, I doubt most
121 # people will want to do that without changes..
127 @$(MAKEBOOT) bootimage
136 rm -f arch/$(ARCH)/vmlinux.lds
137 @$(MAKE) -C arch/$(ARCH)/tools mrproper
143 @$(MAKEBOOT) bootpfile