patch-2.4.19 linux-2.4.19/arch/mips64/Makefile
Next file: linux-2.4.19/arch/mips64/arc/arc_con.c
Previous file: linux-2.4.19/arch/mips/vr4181/osprey/setup.c
Back to the patch index
Back to the overall index
- Lines: 229
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/mips64/Makefile
- Orig date:
Sun Sep 9 10:43:02 2001
diff -urN linux-2.4.18/arch/mips64/Makefile linux-2.4.19/arch/mips64/Makefile
@@ -3,6 +3,8 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
+# Copyright (C) 2002 Maciej W. Rozycki
+#
# 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
@@ -12,7 +14,6 @@
#
# Select the object file format to substitute into the linker script.
#
-CPP=$(CC) -E
ifdef CONFIG_CPU_LITTLE_ENDIAN
tool-prefix = mips64el-linux-
else
@@ -20,7 +21,7 @@
endif
ifdef CONFIG_CROSSCOMPILE
-CROSS_COMPILE = $(tool-prefix)
+CROSS_COMPILE = $(tool-prefix)
endif
#
@@ -33,91 +34,162 @@
# machines may also. Since BFD is incredibly buggy with respect to
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
-CFLAGS += -I $(TOPDIR)/include/asm/gcc $(CFLAGS)
-CFLAGS += -mabi=64 -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe
+GCCFLAGS := -I $(TOPDIR)/include/asm/gcc
+GCCFLAGS += -mabi=64 -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe
LINKFLAGS += -G 0 -static # -N
MODFLAGS += -mlong-calls
ifdef CONFIG_REMOTE_DEBUG
-CFLAGS := $(CFLAGS) -g
+GCCFLAGS += -g
endif
#
# CPU-dependent compiler/assembler options for optimization.
#
ifdef CONFIG_CPU_R4300
-CFLAGS := $(CFLAGS) -mcpu=r4300 -mips3
+GCCFLAGS += -mcpu=r4300 -mips3
endif
ifdef CONFIG_CPU_R4X00
-CFLAGS := $(CFLAGS) -mcpu=r4600 -mips3
+GCCFLAGS += -mcpu=r4600 -mips3
endif
ifdef CONFIG_CPU_R5000
-CFLAGS := $(CFLAGS) -mcpu=r8000 -mips4
+GCCFLAGS += -mcpu=r8000 -mips4
endif
ifdef CONFIG_CPU_NEVADA
-CFLAGS := $(CFLAGS) -mcpu=r8000 -mips3 -mmad
+GCCFLAGS += -mcpu=r8000 -mips3 -mmad
endif
ifdef CONFIG_CPU_R8000
-CFLAGS := $(CFLAGS) -mcpu=r8000 -mips4
+GCCFLAGS += -mcpu=r8000 -mips4
endif
ifdef CONFIG_CPU_R10000
-CFLAGS := $(CFLAGS) -mcpu=r8000 -mips4
+GCCFLAGS += -mcpu=r8000 -mips4
endif
-
-ifdef CONFIG_MIPS_FPU_EMULATOR
-CORE_FILES += arch/mips64/math-emu/fpu_emulator.o
-SUBDIRS += arch/mips64/math-emu
+ifdef CONFIG_CPU_SB1
+GCCFLAGS += -mcpu=r8000 -mips4
endif
+AFLAGS += $(GCCFLAGS)
+CFLAGS += $(GCCFLAGS)
+
+
+#
+# We unconditionally build the math emulator
+#
+CORE_FILES += arch/mips/math-emu/fpu_emulator.o
+SUBDIRS += arch/mips/math-emu
+
+
#
# Board-dependent options and extra files
#
+
+#
+# MIPS Atlas board
+#
+ifdef CONFIG_MIPS_ATLAS
+LIBS += arch/mips/mips-boards/atlas/atlas.o \
+ arch/mips/mips-boards/generic/mipsboards.o
+SUBDIRS += arch/mips/mips-boards/generic arch/mips/mips-boards/atlas
+LOADADDR := 0x80100000
+endif
+
+#
+# MIPS Malta board
+#
+ifdef CONFIG_MIPS_MALTA
+LIBS += arch/mips/mips-boards/malta/malta.o \
+ arch/mips/mips-boards/generic/mipsboards.o
+SUBDIRS += arch/mips/mips-boards/malta arch/mips/mips-boards/generic
+LOADADDR := 0x80100000
+endif
+
+#
+# SGI IP22 (Indy/Indigo2)
+#
ifdef CONFIG_SGI_IP22
-LIBS += arch/mips64/sgi-ip22/ip22.a arch/mips64/arc/arclib.a
-SUBDIRS += arch/mips64/sgi-ip22 arch/mips64/arc
+CORE_FILES += arch/mips/sgi-ip22/ip22-kern.o
+LIBS += arch/mips64/arc/arclib.a
+SUBDIRS += arch/mips/sgi-ip22 arch/mips64/arc
#
# Set LOADADDR to >= 0x88069000 if you want to leave space for symmon,
# 0x88004000 for production kernels. Note that the value must be
# 16kb aligned or the handling of the current variable will break.
#
-LOADADDR += 0x88004000
+LOADADDR := 0x88004000
endif
+#
+# SGI-IP27 (Origin200/2000)
+#
ifdef CONFIG_SGI_IP27
-CORE_FILES += arch/mips64/sgi-ip27/ip27.o
-LIBS += arch/mips64/arc/arclib.a
-SUBDIRS += arch/mips64/sgi-ip27 arch/mips64/arc
+CORE_FILES += arch/mips64/sgi-ip27/ip27.o
+LIBS += arch/mips64/arc/arclib.a
+SUBDIRS += arch/mips64/sgi-ip27 arch/mips64/arc
#
# Set LOADADDR to >= 0xc000000000300000 if you want to leave space for
# symmon, 0xc00000000001c000 for production kernels. Note that the value
# must be 16kb aligned or the handling of the current variable will break.
#
-#LOADADDR += 0xa80000000001c000
+#LOADADDR := 0xa80000000001c000
ifdef CONFIG_MAPPED_KERNEL
-LOADADDR += 0xc001c000
+LOADADDR := 0xc001c000
else
-LOADADDR += 0x8001c000
+LOADADDR := 0x8001c000
endif
endif
+#
+# SGI-IP32 (O2)
+#
ifdef CONFIG_SGI_IP32
-LIBS += arch/mips64/sgi-ip32/ip32-kern.a arch/mips64/arc/arclib.a
+CORE_FILES += arch/mips64/sgi-ip32/ip32-kern.a
+LIBS += arch/mips64/arc/arclib.a
SUBDIRS += arch/mips64/sgi-ip32 arch/mips64/arc
#
# Set LOADADDR to >= 0x????????? if you want to leave space for symmon,
# 0x80002000 for production kernels. Note that the value must be
# 16kb aligned or the handling of the current variable will break.
#
-LOADADDR += 0x80002000
+LOADADDR := 0x80002000
+endif
+
+#
+# Sibyte SB1250 SOC
+#
+ifdef CONFIG_SIBYTE_SB1250
+# This is a LIB so that it links at the end, and initcalls are later
+# the sequence; but it is built as an object so that modules don't get
+# removed (as happens, even if they have __initcall/module_init)
+LIBS += arch/mips/sibyte/sb1250/sb1250.o
+SUBDIRS += arch/mips/sibyte/sb1250
endif
#
+# Sibyte SWARM board
+#
+ifdef CONFIG_SIBYTE_SWARM
+LIBS += arch/mips/sibyte/swarm/sbswarm.a
+SUBDIRS += arch/mips/sibyte/swarm
+LOADADDR := 0x80100000
+endif
+
+#
+# SB1 Cache Error handler
+#
+ifdef CONFIG_SB1_CACHE_ERROR
+LIBS += arch/mips/sibyte/sb1/sb1kern.a
+SUBDIRS += arch/mips/sibyte/sb1
+endif
+
+
+#
# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
# convert to ECOFF using elf2ecoff.
#
ifdef CONFIG_BOOT_ELF32
CFLAGS += -Wa,-32
+AFLAGS += -Wa,-32
LINKFLAGS += -T arch/mips64/ld.script.elf32
endif
#
@@ -126,6 +198,7 @@
#
ifdef CONFIG_BOOT_ELF64
CFLAGS += -Wa,-32
+AFLAGS += -Wa,-32
LINKFLAGS += -T arch/mips64/ld.script.elf32
#AS += -64
#LD += -m elf64bmip
@@ -179,6 +252,6 @@
archdep:
if [ ! -f $(TOPDIR)/include/asm-$(ARCH)/offset.h ]; then \
- touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \
+ touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \
fi;
@$(MAKEBOOT) dep
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)