- pre6:
[davej-history.git] / arch / i386 / Makefile
blob7ef6959816747cb44ec21a0a47c524e21ca7609c
2 # i386/Makefile
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
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.
13 # Copyright (C) 1994 by Linus Torvalds
15 # 19990713 Artur Skawina <skawina@geocities.com>
16 # Added '-march' and '-mpreferred-stack-boundary' support
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)
24 CFLAGS += -pipe
26 # prevent gcc from keeping the stack 16 byte aligned
27 CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi)
29 ifdef CONFIG_M386
30 CFLAGS += -march=i386
31 endif
33 ifdef CONFIG_M486
34 CFLAGS += -march=i486
35 endif
37 ifdef CONFIG_M586
38 CFLAGS += -march=i586
39 endif
41 ifdef CONFIG_M586TSC
42 CFLAGS += -march=i586
43 endif
45 ifdef CONFIG_M586MMX
46 CFLAGS += -march=i586
47 endif
49 ifdef CONFIG_M686
50 CFLAGS += -march=i686
51 endif
53 ifdef CONFIG_M686FXSR
54 CFLAGS += -march=i686
55 endif
57 ifdef CONFIG_MPENTIUM4
58 CFLAGS += -march=i686
59 endif
61 ifdef CONFIG_MK6
62 CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; else echo "-march=i586"; fi)
63 endif
65 ifdef CONFIG_MK7
66 CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi)
67 endif
69 ifdef CONFIG_MCRUSOE
70 CFLAGS += -march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0
71 endif
73 ifdef CONFIG_MWINCHIPC6
74 CFLAGS += -march=i586
75 endif
77 ifdef CONFIG_MWINCHIP2
78 CFLAGS += -march=i586
79 endif
81 ifdef CONFIG_MWINCHIP3D
82 CFLAGS += -march=i586
83 endif
85 HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
87 SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib
88 CORE_FILES := arch/i386/kernel/kernel.o arch/i386/mm/mm.o $(CORE_FILES)
89 LIBS := $(TOPDIR)/arch/i386/lib/lib.a $(LIBS) $(TOPDIR)/arch/i386/lib/lib.a
91 ifdef CONFIG_MATH_EMULATION
92 SUBDIRS += arch/i386/math-emu
93 DRIVERS += arch/i386/math-emu/math.a
94 endif
96 arch/i386/kernel: dummy
97 $(MAKE) linuxsubdirs SUBDIRS=arch/i386/kernel
99 arch/i386/mm: dummy
100 $(MAKE) linuxsubdirs SUBDIRS=arch/i386/mm
102 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
104 vmlinux: arch/i386/vmlinux.lds
106 FORCE: ;
108 .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
109 clean archclean archmrproper archdep
111 zImage: vmlinux
112 @$(MAKEBOOT) zImage
114 bzImage: vmlinux
115 @$(MAKEBOOT) bzImage
117 compressed: zImage
119 zlilo: vmlinux
120 @$(MAKEBOOT) BOOTIMAGE=zImage zlilo
122 tmp:
123 @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
124 bzlilo: vmlinux
125 @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
127 zdisk: vmlinux
128 @$(MAKEBOOT) BOOTIMAGE=zImage zdisk
130 bzdisk: vmlinux
131 @$(MAKEBOOT) BOOTIMAGE=bzImage zdisk
133 install: vmlinux
134 @$(MAKEBOOT) BOOTIMAGE=bzImage install
136 archclean:
137 @$(MAKEBOOT) clean
139 archmrproper:
141 archdep:
142 @$(MAKEBOOT) dep