Import 2.3.28
[davej-history.git] / arch / ppc / Makefile
blob82bdb59ed0d901337333aef08ece8ab458a0a27b
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 -I../8xx_io
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_MATH_EMULATION
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_8xx
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_ALL_PPC
92 ifdef CONFIG_SMP
93 ifdef CONFIG_PPC64
94 cp -f vmlinux /tftpboot/vmlinux.smp.64
95 else
96 cp -f vmlinux /tftpboot/vmlinux.smp
97 endif
98 else
99 ifdef CONFIG_PPC64
100 cp -f vmlinux /tftpboot/vmlinux.64
101 else
102 cp -f vmlinux /tftpboot/vmlinux
103 endif
104 endif
105 endif
106 @$(MAKECOFFBOOT) $@
107 @$(MAKEBOOT) $@
108 @$(MAKECHRPBOOT) $@
109 endif
111 gemini_config:
112 rm -f .config arch/ppc/defconfig
113 ln -s gemini_defconfig arch/ppc/defconfig
115 pmac_config:
116 rm -f .config arch/ppc/defconfig
117 ln -s pmac_defconfig arch/ppc/defconfig
119 prep_config:
120 rm -f .config arch/ppc/defconfig
121 ln -s prep_defconfig arch/ppc/defconfig
123 chrp_config:
124 rm -f .config arch/ppc/defconfig
125 ln -s chrp_defconfig arch/ppc/defconfig
127 common_config:
128 rm -f .config arch/ppc/defconfig
129 ln -s common_defconfig arch/ppc/defconfig
131 mbx_config:
132 rm -f .config arch/ppc/defconfig
133 ln -s mbx_defconfig arch/ppc/defconfig
135 apus_config:
136 rm -f .config arch/ppc/defconfig
137 ln -s apus_defconfig arch/ppc/defconfig
139 tags:
140 etags */*.c include/{asm,linux}/*.h arch/ppc/kernel/*.{c,h}
142 archclean:
143 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
144 @$(MAKECOFFBOOT) clean
145 @$(MAKEBOOT) clean
146 @$(MAKECHRPBOOT) clean
147 @$(MAKEMBXBOOT) clean
149 archmrproper:
151 archdep:
152 $(MAKEBOOT) fastdep
153 $(MAKECHRPBOOT) fastdep