Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / arch / ppc / Makefile
blobd4172ed4a9b2f67463b28891554ffdd7a8667f0c
1 # This file is included by the global makefile so that you can add your own
2 # architecture-specific flags and dependencies. Remember to do have actions
3 # for "archclean" and "archdep" for cleaning up and making dependencies for
4 # this architecture
6 # This file is subject to the terms and conditions of the GNU General Public
7 # License. See the file "COPYING" in the main directory of this archive
8 # for more details.
10 # Copyright (C) 1994 by Linus Torvalds
11 # Changes for PPC by Gary Thomas
12 # Rewritten by Cort Dougan and Paul Mackerras
15 KERNELLOAD =0xc0000000
17 ifeq ($(shell uname -m),ppc)
18 CHECKS = checks
19 endif
21 ASFLAGS =
22 LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
23 CPPFLAGS := $(CPPFLAGS) -D__powerpc__
24 CFLAGS := $(CFLAGS) -D__powerpc__ -fsigned-char \
25 -msoft-float -pipe -ffixed-r2 -Wno-uninitialized \
26 -mmultiple -mstring
27 CPP = $(CC) -E $(CFLAGS)
29 ifdef CONFIG_4xx
30 CFLAGS := $(CFLAGS) -mcpu=403
31 endif
33 ifdef CONFIG_8xx
34 CFLAGS := $(CFLAGS) -mcpu=860 -I../8xx_io
35 endif
37 ifdef CONFIG_PPC64BRIDGE
38 CFLAGS := $(CFLAGS) -Wa,-mppc64bridge
39 endif
41 ifdef CONFIG_4xx
42 HEAD := arch/ppc/kernel/head_4xx.o
43 else
44 ifdef CONFIG_8xx
45 HEAD := arch/ppc/kernel/head_8xx.o
46 else
47 HEAD := arch/ppc/kernel/head.o
48 endif
49 endif
51 ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/mm arch/ppc/lib
52 SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS)
53 ARCHIVES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(ARCHIVES)
54 CORE_FILES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(CORE_FILES)
56 ifdef CONFIG_MATH_EMULATION
57 SUBDIRS += arch/ppc/math-emu
58 ARCHIVES += arch/ppc/math-emu/math-emu.o
59 CORE_FILES += arch/ppc/math-emu/math-emu.o
60 endif
62 ifdef CONFIG_XMON
63 SUBDIRS += arch/ppc/xmon
64 CORE_FILES += arch/ppc/xmon/x.o
65 endif
67 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
68 MAKECOFFBOOT = $(MAKE) -C arch/$(ARCH)/coffboot
69 MAKECHRPBOOT = $(MAKE) -C arch/$(ARCH)/chrpboot
70 MAKEMBXBOOT = $(MAKE) -C arch/$(ARCH)/mbxboot
71 MAKETREEBOOT = $(MAKE) -C arch/$(ARCH)/treeboot
73 ifdef CONFIG_8xx
74 SUBDIRS += arch/ppc/8xx_io
75 DRIVERS += arch/ppc/8xx_io/8xx_io.o
76 endif
78 ifdef CONFIG_8260
79 SUBDIRS += arch/ppc/8260_io
80 DRIVERS += arch/ppc/8260_io/8260_io.o
81 endif
83 ifdef CONFIG_APUS
84 SUBDIRS += arch/ppc/amiga
85 ARCHIVES += arch/ppc/amiga/amiga.o
86 CORE_FILES += arch/ppc/amiga/amiga.o
87 endif
89 checks:
90 @$(MAKE) -C arch/$(ARCH)/kernel checks
92 BOOT_TARGETS = zImage znetboot.initrd zImage.initrd
94 ifdef CONFIG_4xx
95 $(BOOT_TARGETS): $(CHECKS) vmlinux
96 @$(MAKETREEBOOT) $@
97 endif
99 ifdef CONFIG_8xx
100 $(BOOT_TARGETS): $(CHECKS) vmlinux
101 @$(MAKECOFFBOOT) $@
102 @$(MAKEMBXBOOT) $@
103 endif
105 ifdef CONFIG_6xx
106 ifndef CONFIG_8260
107 $(BOOT_TARGETS): $(CHECKS) vmlinux
108 @$(MAKECOFFBOOT) $@
109 @$(MAKEBOOT) $@
110 @$(MAKECHRPBOOT) $@
112 znetboot: $(CHECKS) vmlinux
113 ifdef CONFIG_ALL_PPC
114 ifdef CONFIG_SMP
115 cp -f vmlinux /tftpboot/vmlinux.smp
116 else
117 cp -f vmlinux /tftpboot/vmlinux
118 endif
119 endif
120 @$(MAKECOFFBOOT) $@
121 @$(MAKEBOOT) $@
122 @$(MAKECHRPBOOT) $@
123 else
124 # 8260 is custom 6xx
125 $(BOOT_TARGETS): $(CHECKS) vmlinux
126 @$(MAKECOFFBOOT) $@
127 @$(MAKEMBXBOOT) $@
128 endif
129 endif
131 ifdef CONFIG_PPC64BRIDGE
132 $(BOOT_TARGETS): $(CHECKS) vmlinux
133 @$(MAKECOFFBOOT) $@
134 @$(MAKEBOOT) $@
135 @$(MAKECHRPBOOT) $@
137 znetboot: $(CHECKS) vmlinux
138 cp -f vmlinux /tftpboot/vmlinux.64
139 @$(MAKECOFFBOOT) $@
140 @$(MAKEBOOT) $@
141 @$(MAKECHRPBOOT) $@
142 endif
144 .PHONY: clean_config
145 clean_config:
146 rm -f .config arch/ppc/defconfig
148 gemini_config: clean_config
149 cp -f arch/ppc/configs/gemini_defconfig arch/ppc/defconfig
151 pmac_config: clean_config
152 cp -f arch/ppc/configs/pmac_defconfig arch/ppc/defconfig
154 prep_config: clean_config
155 cp -f arch/ppc/configs/prep_defconfig arch/ppc/defconfig
157 chrp_config: clean_config
158 cp -f arch/ppc/configs/chrp_defconfig arch/ppc/defconfig
160 common_config: clean_config
161 cp -f arch/ppc/configs/common_defconfig arch/ppc/defconfig
163 mbx_config: clean_config
164 cp -f arch/ppc/configs/mbx_defconfig arch/ppc/defconfig
166 apus_config: clean_config
167 cp -f arch/ppc/configs/apus_defconfig arch/ppc/defconfig
169 oak_config: clean_config
170 cp -f arch/ppc/configs/oak_defconfig arch/ppc/defconfig
172 walnut_config: clean_config
173 cp -f arch/ppc/configs/walnut_defconfig arch/ppc/defconfig
175 rpxlite_config: clean_config
176 cp -f arch/ppc/configs/rpxlite_defconfig arch/ppc/defconfig
178 rpxcllf_config: clean_config
179 cp -f arch/ppc/configs/rpxcllf_defconfig arch/ppc/defconfig
181 bseip_config: clean_config
182 cp -f arch/ppc/configs/bseip_defconfig arch/ppc/defconfig
184 est8260_config: clean_config
185 cp -f arch/ppc/configs/est8260_defconfig arch/ppc/defconfig
187 archclean:
188 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
189 @$(MAKECOFFBOOT) clean
190 @$(MAKEBOOT) clean
191 @$(MAKECHRPBOOT) clean
192 @$(MAKEMBXBOOT) clean
193 @$(MAKETREEBOOT) clean
195 archmrproper:
197 archdep:
198 $(MAKEBOOT) fastdep
199 $(MAKECHRPBOOT) fastdep