Optimize andes_clear_page() and andes_copy_page() with prefetch
[linux-2.6/linux-mips.git] / arch / sh / Makefile
blob7be14e89948392216ca1e64e10beee63d537db9e
1 # $Id: Makefile,v 1.6 2000/06/10 03:03:52 gniibe Exp $
3 # This file is subject to the terms and conditions of the GNU General Public
4 # License. See the file "COPYING" in the main directory of this archive
5 # for more details.
7 # Copyright (C) 1999 Kaz Kojima
9 # This file is included by the global makefile so that you can add your own
10 # architecture-specific flags and dependencies. Remember to do have actions
11 # for "archclean" and "archdep" for cleaning up and making dependencies for
12 # this architecture
16 # Select the object file format to substitute into the linker script.
18 tool_prefix = sh-linux-gnu-
20 ifdef CONFIG_CPU_LITTLE_ENDIAN
21 CFLAGS += -ml
22 AFLAGS += -ml
23 # LINKFLAGS += -EL
24 LDFLAGS := -EL
25 else
26 CFLAGS += -mb
27 AFLAGS += -mb
28 # LINKFLAGS += -EB
29 LDFLAGS := -EB
30 endif
32 # ifdef CONFIG_CROSSCOMPILE
33 CROSS_COMPILE = $(tool_prefix)
34 # endif
36 LD =$(CROSS_COMPILE)ld $(LDFLAGS)
37 OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S
39 MODFLAGS +=
44 ifdef CONFIG_CPU_SH3
45 CFLAGS += -m3
46 AFLAGS += -m3
47 endif
48 ifdef CONFIG_CPU_SH4
49 CFLAGS += -m4
50 AFLAGS += -m4
51 endif
54 # Choosing incompatible machines durings configuration will result in
55 # error messages during linking. Select a default linkscript if
56 # none has been choosen above.
58 LINKSCRIPT = arch/sh/vmlinux.lds
59 LINKFLAGS += -T $(word 1,$(LINKSCRIPT)) -e _stext
61 ifdef LOADADDR
62 LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
63 endif
66 CFLAGS += -pipe
68 HEAD := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
70 SUBDIRS := $(SUBDIRS) $(addprefix arch/sh/, kernel mm lib)
71 CORE_FILES := arch/sh/kernel/kernel.o arch/sh/mm/mm.o $(CORE_FILES)
72 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
73 LIBS := $(TOPDIR)/arch/sh/lib/lib.a $(LIBS) $(TOPDIR)/arch/sh/lib/lib.a \
74 $(LIBGCC)
76 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
78 vmlinux: arch/sh/vmlinux.lds
80 arch/sh/vmlinux.lds: arch/sh/vmlinux.lds.S FORCE
81 $(CPP) -C -P -I$(HPATH) -Ush arch/sh/vmlinux.lds.S >arch/sh/vmlinux.lds
83 FORCE: ;
85 zImage: vmlinux
86 @$(MAKEBOOT) zImage
88 compressed: zImage
90 zdisk: vmlinux
91 @$(MAKEBOOT) zdisk
93 archclean:
94 @$(MAKEBOOT) clean
95 $(MAKE) -C arch/$(ARCH)/kernel clean
96 # $(MAKE) -C arch/$(ARCH)/tools clean
98 archmrproper:
99 rm -f arch/sh/vmlinux.lds
101 archdep:
102 @$(MAKEBOOT) dep