1 # $Id: Makefile,v 1.1.1.1.2.5 2003/10/23 22:08:56 yoshii 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
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
15 ifdef CONFIG_CPU_LITTLE_ENDIAN
32 CFLAGS :=$(CFLAGS:-fomit-frame-pointer=) -g
34 ifdef CONFIG_KGDB_MORE
35 CFLAGS += $(shell echo $(CONFIG_KGDB_OPTIONS) | sed -e 's/"//g')
39 LD =$(CROSS_COMPILE)ld $(LDFLAGS)
40 OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S
52 CFLAGS += -m4 -mno-implicit-fp
53 AFLAGS += -m4 -mno-implicit-fp
57 # Choosing incompatible machines durings configuration will result in
58 # error messages during linking. Select a default linkscript if
59 # none has been choosen above.
61 LINKSCRIPT = arch/sh/vmlinux.lds
62 LINKFLAGS += -T $(word 1,$(LINKSCRIPT)) -e _stext
65 LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
71 HEAD := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
73 SUBDIRS := $(SUBDIRS) $(addprefix arch/sh/, kernel mm lib)
74 CORE_FILES := arch/sh/kernel/kernel.o arch/sh/mm/mm.o $(CORE_FILES)
75 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
76 LIBS := $(TOPDIR)/arch/sh/lib/lib.a $(LIBS) $(TOPDIR)/arch/sh/lib/lib.a \
79 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
81 ifneq ($(CONFIG_SH_GENERIC)$(CONFIG_SH_STB1_HARP)$(CONFIG_SH_STB1_OVERDRIVE),)
82 SUBDIRS += arch/sh/stboards
83 CORE_FILES += arch/sh/stboards/stboards.o
86 vmlinux: arch/sh/vmlinux.lds
88 arch/sh/vmlinux.lds: arch/sh/vmlinux.lds.S FORCE
89 $(CPP) -traditional -C -P -I$(HPATH) -Ush arch/sh/vmlinux.lds.S >arch/sh/vmlinux.lds
103 $(MAKE) -C arch/$(ARCH)/kernel clean
104 $(MAKE) -C arch/$(ARCH)/stboards clean
105 # $(MAKE) -C arch/$(ARCH)/tools clean
108 rm -f arch/sh/vmlinux.lds