make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / arch / ia64 / Makefile
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
11 NM := $(CROSS_COMPILE)nm -B
12 AWK := awk
13
14 export AWK
15
16 LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
17 AFLAGS_KERNEL := -mconstant-gp
18 EXTRA   =
19
20 CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \
21           -falign-functions=32
22 # -ffunction-sections
23 CFLAGS_KERNEL := -mconstant-gp
24
25 GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
26
27 ifneq ($(GCC_VERSION),2)
28         CFLAGS += -frename-registers --param max-inline-insns=5000
29 endif
30
31 ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
32         CFLAGS += -mb-step
33 endif
34
35 ifdef CONFIG_IA64_GENERIC
36         CORE_FILES      :=      arch/$(ARCH)/hp/hp.o                    \
37                                 arch/$(ARCH)/dig/dig.a                  \
38                                 $(CORE_FILES)
39         SUBDIRS         :=      arch/$(ARCH)/hp         \
40                                 arch/$(ARCH)/dig        \
41                                 $(SUBDIRS)
42
43 else # !GENERIC
44
45 ifdef CONFIG_IA64_HP_SIM
46         SUBDIRS         :=      arch/$(ARCH)/hp         \
47                                 $(SUBDIRS)
48         CORE_FILES      :=      arch/$(ARCH)/hp/hp.o    \
49                                 $(CORE_FILES)
50 endif
51
52 ifdef CONFIG_IA64_HP_ZX1
53         SUBDIRS         :=      arch/$(ARCH)/hp                         \
54                                 arch/$(ARCH)/dig                        \
55                                 $(SUBDIRS)
56         CORE_FILES      :=      arch/$(ARCH)/hp/hp.o                    \
57                                 arch/$(ARCH)/dig/dig.a                  \
58                                 $(CORE_FILES)
59 endif
60
61 ifdef CONFIG_IA64_SGI_SN
62         CFLAGS          += -DBRINGUP
63         SUBDIRS         :=      arch/$(ARCH)/sn/kernel  \
64                                 arch/$(ARCH)/sn/io      \
65                                 arch/$(ARCH)/sn/fakeprom        \
66                                 $(SUBDIRS)
67         CORE_FILES      :=      arch/$(ARCH)/sn/kernel/sn.o     \
68                                 arch/$(ARCH)/sn/io/sgiio.o      \
69                                 $(CORE_FILES)
70 endif
71
72 ifdef CONFIG_IA64_SOFTSDV
73         SUBDIRS         :=      arch/$(ARCH)/dig        \
74                                 $(SUBDIRS)
75         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a  \
76                                 $(CORE_FILES)
77 endif
78
79 ifdef CONFIG_IA64_DIG
80         SUBDIRS         :=      arch/$(ARCH)/dig        \
81                                 $(SUBDIRS)
82         CORE_FILES      :=      arch/$(ARCH)/dig/dig.a  \
83                                 $(CORE_FILES)
84 endif
85
86 endif # !GENERIC
87
88 ifdef CONFIG_IA32_SUPPORT
89         SUBDIRS         :=      arch/$(ARCH)/ia32 $(SUBDIRS)
90         CORE_FILES      :=      arch/$(ARCH)/ia32/ia32.o $(CORE_FILES)
91 endif
92
93 HEAD := arch/$(ARCH)/kernel/head.o arch/ia64/kernel/init_task.o
94
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)
97
98 LIBS := $(TOPDIR)/arch/$(ARCH)/lib/lib.a $(LIBS) \
99         $(TOPDIR)/arch/$(ARCH)/lib/lib.a
100
101 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
102
103 vmlinux: arch/$(ARCH)/vmlinux.lds
104
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 > $@
108
109 FORCE: ;
110
111 compressed: vmlinux
112         $(OBJCOPY) --strip-all vmlinux vmlinux-tmp
113         gzip vmlinux-tmp
114         mv vmlinux-tmp.gz vmlinux.gz
115
116 rawboot:
117         @$(MAKEBOOT) rawboot
118
119 #
120 # My boot writes directly to a specific disk partition, I doubt most
121 # people will want to do that without changes..
122 #
123 msb my-special-boot:
124         @$(MAKEBOOT) msb
125
126 bootimage:
127         @$(MAKEBOOT) bootimage
128
129 srmboot:
130         @$(MAKEBOOT) srmboot
131
132 archclean:
133         @$(MAKEBOOT) clean
134
135 archmrproper:
136         rm -f arch/$(ARCH)/vmlinux.lds
137         @$(MAKE) -C arch/$(ARCH)/tools mrproper
138
139 archdep:
140         @$(MAKEBOOT) dep
141
142 bootpfile:
143         @$(MAKEBOOT) bootpfile