patch-1.3.48 linux/arch/mips/Makefile
Next file: linux/arch/mips/boot/Makefile
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 113
- Date:
Wed Dec 13 12:39:42 1995
- Orig file:
v1.3.47/linux/arch/mips/Makefile
- Orig date:
Tue Aug 15 20:39:00 1995
diff -u --recursive --new-file v1.3.47/linux/arch/mips/Makefile linux/arch/mips/Makefile
@@ -10,38 +10,84 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
-# Copyright (C) 1994, 1995 by Waldorf Electronics,
-# written by Ralf Baechle
+# Copyright (C) 1994, 1995 by Ralf Baechle
#
-AS = mips-linux-as
-#ASFLAGS = -mips3 -mcpu=r4000
-LD = mips-linux-ld
-LINKFLAGS = -Ttext 0xa0000000
+ifdef CONFIG_CPU_LITTLE_ENDIAN
+prefix = mipsel-
+oformat = a.out-mips-little-linux
+else
+prefix = mips-
+oformat = a.out-mips-big-linux
+endif
+
+ifdef CONFIG_EXTRA_ELF_COMPILER
+prefix := $(prefix)linuxelf-
+else
+prefix := $(prefix)linux-
+endif
+
+AS = $(prefix)as
+LD = $(prefix)ld
+LINKFLAGS = -N -Ttext 0x80000000
+#LINKFLAGS = -oformat=$(oformat) -N -Ttext 0x80000000
#HOSTCC = gcc
-#
-# KERNELBASE is quite useless, but I need it to work
-# around a hardware bug in my Wreckstation board. Other people
-# would burn that @#!%# thing...
-#
-CC = mips-linux-gcc -V 2.5.8 -D__KERNEL__ -I$(TOPDIR)/include
+CC = $(prefix)gcc -D__KERNEL__ -I$(TOPDIR)/include
CPP = $(CC) -E $(CFLAGS)
-AR = mips-linux-ar
-RANLIB = mips-linux-ranlib
-STRIP = mips-linux-strip
+AR = $(prefix)ar
+RANLIB = $(prefix)ranlib
+OBJCOPY = $(prefix)objcopy
+OBJDUMP = $(prefix)objdump
+STRIP = $(prefix)strip
+NM = $(prefix)nm
-CFLAGS := $(CFLAGS) #-pipe
+#
+# 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 optimizations.
+#
+ifdef CONFIG_ELF_KERNEL
+CFLAGS := $(CFLAGS) -G0 -mno-abicalls -fno-pic
+LINKFLAGS += -T arch/mips/ld.script
+endif
-CFLAGS := $(CFLAGS) -DKERNELBASE=0xa0000000
+ifdef CONFIG_REMOTE_DEBUG
+CFLAGS := $(CFLAGS) -g
+endif
-ifdef CONFIG_R4X00
-CFLAGS := $(CFLAGS) -Wa,-mips3 -mcpu=r4000 -D__R4000__
+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
+
+CFLAGS := $(CFLAGS) -pipe
HEAD := arch/mips/kernel/head.o
-SUBDIRS := $(SUBDIRS) arch/mips/kernel arch/mips/mm
+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
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
@@ -55,6 +101,7 @@
archclean:
@$(MAKEBOOT) clean
+ $(MAKE) -C arch/$(ARCH)/kernel clean
archdep:
@$(MAKEBOOT) dep
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this