Import 2.3.18pre1
[davej-history.git] / arch / ppc / Makefile
blob9977db20405ba5a00763cce6f425235d0751288a
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 CFLAGSINC = -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__
24 CFLAGS := $(CFLAGS) -I$(HPATH) -D__powerpc__ -fsigned-char -msoft-float \
25 -pipe -fno-builtin -ffixed-r2 -Wno-uninitialized -mmultiple \
26 -mstring
27 CPP = $(CC) -E $(CFLAGS)
29 ifdef CONFIG_8xx
30 CFLAGS := $(CFLAGS) -mcpu=860
31 endif
33 ifdef CONFIG_PPC64
34 CFLAGS := $(CFLAGS) -Wa,-mppc64bridge #-mpowerpc64
35 endif
37 ifndef CONFIG_8xx
38 HEAD := arch/ppc/kernel/head.o
39 else
40 HEAD := arch/ppc/kernel/head_8xx.o
41 endif
43 ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/mm arch/ppc/lib
44 SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS)
45 ARCHIVES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(ARCHIVES)
46 CORE_FILES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(CORE_FILES)
48 ifdef CONFIG_8xx
49 SUBDIRS += arch/ppc/math-emu
50 ARCHIVES += arch/ppc/math-emu/math-emu.o
51 CORE_FILES += arch/ppc/math-emu/math-emu.o
52 endif
54 ifdef CONFIG_XMON
55 SUBDIRS += arch/ppc/xmon
56 CORE_FILES += arch/ppc/xmon/x.o
57 endif
59 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
60 MAKECOFFBOOT = $(MAKE) -C arch/$(ARCH)/coffboot
61 MAKECHRPBOOT = $(MAKE) -C arch/$(ARCH)/chrpboot
62 MAKEMBXBOOT = $(MAKE) -C arch/$(ARCH)/mbxboot
64 ifdef CONFIG_8xx
65 SUBDIRS += arch/ppc/8xx_io
66 DRIVERS += arch/ppc/8xx_io/8xx_io.a drivers/net/net.a
67 endif
69 ifdef CONFIG_APUS
70 SUBDIRS += arch/ppc/amiga
71 ARCHIVES += arch/ppc/amiga/amiga.o
72 CORE_FILES += arch/ppc/amiga/amiga.o
73 endif
75 checks:
76 @$(MAKE) -C arch/$(ARCH)/kernel checks
78 BOOT_TARGETS = zImage znetboot.initrd zImage.initrd
80 ifdef CONFIG_MBX
81 $(BOOT_TARGETS): $(CHECKS) vmlinux
82 @$(MAKECOFFBOOT) $@
83 @$(MAKEMBXBOOT) $@
84 else
85 $(BOOT_TARGETS): $(CHECKS) vmlinux
86 @$(MAKECOFFBOOT) $@
87 @$(MAKEBOOT) $@
88 @$(MAKECHRPBOOT) $@
90 znetboot: $(CHECKS) vmlinux
91 ifdef CONFIG_SMP
92 ifdef CONFIG_PPC64
93 cp -f vmlinux /tftpboot/vmlinux.smp.64
94 else
95 cp -f vmlinux /tftpboot/vmlinux.smp
96 endif
97 else
98 ifdef CONFIG_PPC64
99 cp -f vmlinux /tftpboot/vmlinux.64
100 else
101 cp -f vmlinux /tftpboot/vmlinux
102 endif
103 endif
104 @$(MAKECOFFBOOT) $@
105 @$(MAKEBOOT) $@
106 @$(MAKECHRPBOOT) $@
107 endif
109 gemini_config:
110 rm -f .config arch/ppc/defconfig
111 ln -s gemini_defconfig arch/ppc/defconfig
113 pmac_config:
114 rm -f .config arch/ppc/defconfig
115 ln -s pmac_defconfig arch/ppc/defconfig
117 prep_config:
118 rm -f .config arch/ppc/defconfig
119 ln -s prep_defconfig arch/ppc/defconfig
121 chrp_config:
122 rm -f .config arch/ppc/defconfig
123 ln -s chrp_defconfig arch/ppc/defconfig
125 common_config:
126 rm -f .config arch/ppc/defconfig
127 ln -s common_defconfig arch/ppc/defconfig
129 mbx_config:
130 rm -f .config arch/ppc/defconfig
131 ln -s mbx_defconfig arch/ppc/defconfig
133 apus_config:
134 rm -f .config arch/ppc/defconfig
135 ln -s apus_defconfig arch/ppc/defconfig
137 tags:
138 etags */*.c include/{asm,linux}/*.h arch/ppc/kernel/*.{c,h}
140 archclean:
141 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
142 @$(MAKECOFFBOOT) clean
143 @$(MAKEBOOT) clean
144 @$(MAKECHRPBOOT) clean
145 @$(MAKEMBXBOOT) clean
147 archmrproper:
149 archdep:
150 $(MAKEBOOT) fastdep
151 $(MAKECHRPBOOT) fastdep