diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1995-11-14 08:00:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1995-11-14 08:00:00 +0000 |
commit | e7c2a72e2680827d6a733931273a93461c0d8d1b (patch) | |
tree | c9abeda78ef7504062bb2e816bcf3e3c9d680112 /arch/mips/Makefile | |
parent | ec6044459060a8c9ce7f64405c465d141898548c (diff) |
Import of Linux/MIPS 1.3.0
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 140 |
1 files changed, 85 insertions, 55 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 0dc133749..baec00d70 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -1,71 +1,101 @@ # -# Makefile.mips +# arch/mips/Makefile +# +# This file is included by the global makefile so that you can add your own +# architecture-specific flags and dependencies. Remember to do have actions +# for "archclean" and "archdep" for cleaning up and making dependencies for +# this architecture # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # -# Copyright (C) 1994 by Waldorf GMBH, +# Copyright (C) 1994, 1995 by Waldorf Electronics, # written by Ralf Baechle # -AS = mips-linux-as -ASFLAGS = -mips3 -mcpu=r4000 -LD = mips-linux-ld -HOSTCC = gcc -CC = mips-linux-gcc -V 2.5.8 -Wa,-mips3 -mcpu=r4000 -D__KERNEL__ -I$(TOPDIR)/include -#CC = mips-linux-gcc -V 2.6.2 -Wa,-mips3 -mcpu=r4600 -D__KERNEL__ -I$(TOPDIR)/include -MAKE = make -CPP = $(CC) -E -AR = mips-linux-ar -RANLIB = mips-linux-ranlib -STRIP = strip -KERNELHDRS = /home/ralf/src/linux +ifdef CONFIG_ELF_COMPILER +ifdef CONFIG_CPU_LITTLE_ENDIAN +prefix = mipsel-linuxelf- +else +prefix = mips-linuxelf- +endif +else +ifdef CONFIG_CPU_LITTLE_ENDIAN +prefix = mipsel-linux- +else +prefix = mips-linux- +endif +endif + +AS = $(prefix)as +LD = $(prefix)ld +LINKFLAGS = -N -Ttext 0x80000000 +#HOSTCC = gcc +CC = $(prefix)gcc -D__KERNEL__ -I$(TOPDIR)/include +CPP = $(CC) -E $(CFLAGS) +AR = $(prefix)ar +RANLIB = $(prefix)ranlib +STRIP = $(prefix)strip +NM = $(prefix)nm + +# +# The new ELF GCC uses -G0 -mabicalls -fpic as default. We don't need PIC +# code in the kernel since it only slows down the whole thing. For the +# old GCC these options are just the defaults. At some point we might +# make use of global pointer optimaztions. +# +ifdef CONFIG_OBJECT_ELF +CFLAGS := $(CFLAGS) -G0 -mno-abicalls -fno-pic #-pipe +endif + +ifdef CONFIG_REMOTE_DEBUG +CFLAGS := $(CFLAGS) -g +endif + +ifdef CONFIG_CPU_R3000 +CFLAGS := $(CFLAGS) -mcpu=r3000 -mips1 +ASFLAGS := $(ASFLAGS) -mcpu=r3000 -mips1 +endif +ifdef CONFIG_CPU_R6000 +CFLAGS := $(CFLAGS) -mcpu=r6000 -mips2 +ASFLAGS := $(ASFLAGS) -mcpu=r6000 -mips2 +endif +ifdef CONFIG_CPU_R4X00 +CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r4400 -mips2 +ASFLAGS := $(ASFLAGS) -mcpu=r4400 -mips2 +endif +ifdef CONFIG_CPU_R4600 +CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r4600 -mips2 +ASFLAGS := $(ASFLAGS) -mcpu=r4600 -mips2 +endif +ifdef CONFIG_CPU_R8000 +CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r8000 -mips2 +ASFLAGS := $(ASFLAGS) -mcpu=r8000 -mips2 +endif +ifdef CONFIG_CPU_R10000 +CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r8000 -mips2 +ASFLAGS := $(ASFLAGS) -mcpu=r8000 -mips2 +endif + +HEAD := arch/mips/kernel/head.o -zBoot/zSystem: zBoot/*.c zBoot/*.S tools/zSystem - $(MAKE) -C zBoot +SUBDIRS := $(SUBDIRS) arch/mips/kernel arch/mips/mm arch/mips/lib +ARCHIVES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(ARCHIVES) +LIBS := arch/mips/lib/lib.a $(LIBS) arch/mips/lib/lib.a -zImage: $(CONFIGURE) tools/zSystem - cp tools/System zImage - sync +MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot -#zImage: $(CONFIGURE) zBoot/zSystem tools/build -# tools/build zBoot/zSystem $(ROOT_DEV) > zImage -# sync +zImage: vmlinux + @$(MAKEBOOT) zImage -zdisk: zImage - mcopy -n zImage a:vmlinux +compressed: zImage -tools/zSystem: boot/head.o init/main.o init/init.o tools/version.o linuxsubdirs - $(LD) $(LOWLDFLAGS) boot/head.o init/main.o init/init.o \ - tools/version.o \ - $(ARCHIVES) \ - $(FILESYSTEMS) \ - $(DRIVERS) \ - $(LIBS) \ - -N -Ttext 0x80000000 \ - -o tools/System - nm tools/System | grep -v '\(compiled\)\|\(\.o$$\)\|\( a \)' | \ - sort > System.map +zdisk: vmlinux + @$(MAKEBOOT) zdisk -#tools/system: boot/head.o init/main.o init/init.o tools/version.o linuxsubdirs -# $(LD) $(LOWLDFLAGS) boot/head.o init/main.o tools/version.o \ -# $(ARCHIVES) \ -# $(FILESYSTEMS) \ -# $(DRIVERS) \ -# $(LIBS) \ -# -N -Ttext 0x80000000 \ -# -o tools/system -# nm tools/zSystem | grep -v '\(compiled\)\|\(\.o$$\)\|\( a \)' | \ -# sort > System.map +archclean: + @$(MAKEBOOT) clean -#tools/zSystem: boot/head.o init/main.o tools/version.o linuxsubdirs -# $(LD) $(HIGHLDFLAGS) boot/head.o init/main.o tools/version.o \ -# $(ARCHIVES) \ -# $(FILESYSTEMS) \ -# $(DRIVERS) \ -# $(LIBS) \ -# -N -Ttext 0x80600000 \ -# -o tools/zSystem -# nm tools/zSystem | grep -v '\(compiled\)\|\(\.o$$\)\|\( a \)' | \ -# sort > zSystem.map +archdep: + @$(MAKEBOOT) dep |