more debug output
[linux-2.4.git] / arch / i386 / Makefile
1 #
2 # i386/Makefile
3 #
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" and "archdep" for cleaning up and making dependencies for
7 # this architecture
8 #
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License.  See the file "COPYING" in the main directory of this archive
11 # for more details.
12 #
13 # Copyright (C) 1994 by Linus Torvalds
14 #
15 # 19990713  Artur Skawina <skawina@geocities.com>
16 #           Added '-march' and '-mpreferred-stack-boundary' support
17 #
18
19 LD=$(CROSS_COMPILE)ld -m elf_i386
20 OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
21 LDFLAGS=-e stext
22 LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds $(LDFLAGS)
23
24 CFLAGS += -pipe
25
26 # prevent gcc from keeping the stack 16 byte aligned
27 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
28
29 ifdef CONFIG_M386
30 CFLAGS += -march=i386
31 endif
32
33 ifdef CONFIG_M486
34 CFLAGS += -march=i486
35 endif
36
37 ifdef CONFIG_M586
38 CFLAGS += -march=i586
39 endif
40
41 ifdef CONFIG_M586TSC
42 CFLAGS += -march=i586
43 endif
44
45 ifdef CONFIG_M586MMX
46 CFLAGS += -march=i586
47 endif
48
49 ifdef CONFIG_M686
50 CFLAGS += -march=i686
51 endif
52
53 ifdef CONFIG_MPENTIUMIII
54 CFLAGS += -march=i686
55 endif
56
57 ifdef CONFIG_MPENTIUM4
58 CFLAGS += -march=i686
59 endif
60
61 ifdef CONFIG_MK6
62 CFLAGS += $(call check_gcc,-march=k6,-march=i586)
63 endif
64
65 ifdef CONFIG_MK7
66 CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
67 endif
68
69 ifdef CONFIG_MCRUSOE
70 CFLAGS += -march=i686
71 CFLAGS += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
72 endif
73
74 ifdef CONFIG_MWINCHIPC6
75 CFLAGS += -march=i586
76 endif
77
78 ifdef CONFIG_MWINCHIP2
79 CFLAGS += -march=i586
80 endif
81
82 ifdef CONFIG_MWINCHIP3D
83 CFLAGS += -march=i586
84 endif
85
86 ifdef CONFIG_MCYRIXIII
87 CFLAGS += $(call check_gcc,-march=c3,-march=i486)
88 CFLAGS += $(call check_gcc,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
89 endif
90
91 ifdef CONFIG_MVIAC3_2
92 CFLAGS += $(call check_gcc,-march=c3-2,-march=i686)
93 endif
94
95 # Disable unit-at-a-time mode, it makes gcc use a lot more stack
96 # due to the lack of sharing of stacklots.
97 CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
98
99 HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
100
101 SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib
102
103 CORE_FILES := arch/i386/kernel/kernel.o arch/i386/mm/mm.o $(CORE_FILES)
104 LIBS := $(TOPDIR)/arch/i386/lib/lib.a $(LIBS) $(TOPDIR)/arch/i386/lib/lib.a
105
106 ifdef CONFIG_MATH_EMULATION
107 SUBDIRS += arch/i386/math-emu
108 DRIVERS += arch/i386/math-emu/math.o
109 endif
110
111 arch/i386/kernel: dummy
112         $(MAKE) linuxsubdirs SUBDIRS=arch/i386/kernel
113
114 arch/i386/mm: dummy
115         $(MAKE) linuxsubdirs SUBDIRS=arch/i386/mm
116
117 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
118
119 vmlinux: arch/i386/vmlinux.lds
120
121 FORCE: ;
122
123 .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
124                 clean archclean archmrproper archdep
125
126 zImage: vmlinux
127         @$(MAKEBOOT) zImage
128
129 bzImage: vmlinux
130         @$(MAKEBOOT) bzImage
131
132 compressed: zImage
133
134 zlilo: vmlinux
135         @$(MAKEBOOT) BOOTIMAGE=zImage zlilo
136
137 tmp:
138         @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
139 bzlilo: vmlinux
140         @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
141
142 zdisk: vmlinux
143         @$(MAKEBOOT) BOOTIMAGE=zImage zdisk
144
145 bzdisk: vmlinux
146         @$(MAKEBOOT) BOOTIMAGE=bzImage zdisk
147
148 install: vmlinux
149         @$(MAKEBOOT) BOOTIMAGE=bzImage install
150
151 archclean:
152         @$(MAKEBOOT) clean
153
154 archmrproper:
155
156 archdep:
157         @$(MAKEBOOT) dep