Import 2.3.9pre7
[davej-history.git] / arch / ppc / Makefile
blob25a2a0fb76772f62d060c31e32151ba33f2b4c4f
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) -D__powerpc__ -fsigned-char -msoft-float -pipe \
25 -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 HEAD := arch/ppc/kernel/head.o
39 ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/mm arch/ppc/lib
40 SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS)
41 ARCHIVES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(ARCHIVES)
42 CORE_FILES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(CORE_FILES)
44 ifdef CONFIG_XMON
45 SUBDIRS += arch/ppc/xmon
46 CORE_FILES += arch/ppc/xmon/x.o
47 endif
49 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
50 MAKECOFFBOOT = $(MAKE) -C arch/$(ARCH)/coffboot
51 MAKECHRPBOOT = $(MAKE) -C arch/$(ARCH)/chrpboot
52 MAKEMBXBOOT = $(MAKE) -C arch/$(ARCH)/mbxboot
54 ifdef CONFIG_8xx
55 SUBDIRS += arch/ppc/8xx_io
56 DRIVERS += arch/ppc/8xx_io/8xx_io.a drivers/net/net.a
57 endif
59 ifdef CONFIG_APUS
60 SUBDIRS += arch/ppc/amiga
61 ARCHIVES += arch/ppc/amiga/amiga.o
62 CORE_FILES += arch/ppc/amiga/amiga.o
63 endif
65 checks:
66 @$(MAKE) -C arch/$(ARCH)/kernel checks
68 BOOT_TARGETS = netboot znetboot zImage floppy install \
69 vmlinux.coff znetboot.initrd zImage.initrd vmlinux.coff.initrd
71 ifdef CONFIG_MBX
72 $(BOOT_TARGETS): $(CHECKS) vmlinux
73 @$(MAKECOFFBOOT) $@
74 @$(MAKEMBXBOOT) $@
75 else
76 $(BOOT_TARGETS): $(CHECKS) vmlinux
77 @$(MAKECOFFBOOT) $@
78 @$(MAKEBOOT) $@
79 @$(MAKECHRPBOOT) $@
80 endif
82 pmac_config:
83 rm -f .config arch/ppc/defconfig
84 ln -s pmac_defconfig arch/ppc/defconfig
86 prep_config:
87 rm -f .config arch/ppc/defconfig
88 ln -s prep_defconfig arch/ppc/defconfig
90 chrp_config:
91 rm -f .config arch/ppc/defconfig
92 ln -s chrp_defconfig arch/ppc/defconfig
94 common_config:
95 rm -f .config arch/ppc/defconfig
96 ln -s common_defconfig arch/ppc/defconfig
98 mbx_config:
99 rm -f .config arch/ppc/defconfig
100 ln -s mbx_defconfig arch/ppc/defconfig
102 apus_config:
103 rm -f .config arch/ppc/defconfig
104 ln -s apus_defconfig arch/ppc/defconfig
106 tags:
107 etags */*.c include/{asm,linux}/*.h arch/ppc/kernel/*.{c,h}
109 archclean:
110 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
111 @$(MAKECOFFBOOT) clean
112 @$(MAKEBOOT) clean
113 @$(MAKECHRPBOOT) clean
114 @$(MAKEMBXBOOT) clean
116 archmrproper:
118 archdep:
119 $(MAKEBOOT) fastdep
120 $(MAKECHRPBOOT) fastdep