source: mainline/arch/mips32/Makefile.inc@ 941d1e9

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 941d1e9 was c9ed176, checked in by Jakub Jermar <jakub@…>, 20 years ago

Move kernel build files one level up the directory tree.
Fix paths in your testing environment!

  • Property mode set to 100644
File size: 2.5 KB
Line 
1MIPS_TARGET=mipsel-linux-gnu
2MIPS_CC_DIR=/usr/local/mipsel/bin
3MIPS_BINUTILS_DIR=/usr/local/mipsel/bin
4
5CC=$(MIPS_CC_DIR)/$(MIPS_TARGET)-gcc
6AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as
7LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld
8OBJDUMP=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objdump
9OBJCOPY=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objcopy
10BFD_ARCH=mips
11
12DEFS=-DARCH=$(ARCH) -DMACHINE=${MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS}
13CFLAGS=$(DEFS) -mno-abicalls -G 0 -nostdlib -fno-builtin -O2 -fno-zero-initialized-in-bss
14LFLAGS=-M -N
15BFD_ARCH=mips
16
17# GCC 4.0.1 compiled for mipsEL has problems compiling in
18# BigEndian mode with the swl/swr/lwl/lwr instructions.
19# We have to compile it with mips-sgi-irix5 to get it right.
20ifeq (${MACHINE},indy)
21 MIPS_TARGET=mips-sgi-irix5
22 MIPS_CC_DIR=/usr/local/mips/bin
23 MIPS_BINUTILS_DIR=/usr/local/mips/bin
24
25 CFLAGS += -EB -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -march=r4600
26 BFD = ecoff-bigmips
27 KERNEL_LOAD_ADDRESS = 0x88002000
28 BFD_NAME=elf32-bigmips
29endif
30
31ifeq (${MACHINE},lgxemul)
32 CFLAGS += -DHAVE_FPU -DFPU_LAZY -mips3
33 BFD = ecoff-littlemips
34 KERNEL_LOAD_ADDRESS = 0x80100000
35 BFD_NAME=elf32-little
36endif
37
38ifeq (${MACHINE},bgxemul)
39 MIPS_TARGET=mips-sgi-irix5
40 MIPS_CC_DIR=/usr/local/mips/bin
41 MIPS_BINUTILS_DIR=/usr/local/mips/bin
42
43 CFLAGS += -EB -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -mips3
44 BFD = ecoff-bigmips
45 KERNEL_LOAD_ADDRESS = 0x80100000
46 BFD_NAME=elf32-bigmips
47endif
48
49# MSIM needs lwl/swl patch & 4kc instruction patch to work
50# otherwise add -mmemcpy -mips3
51ifeq (${MACHINE},msim4kc)
52 BFD = binary
53 CFLAGS += -msoft-float -march=4kc
54 KERNEL_LOAD_ADDRESS = 0x80100000
55 BFD_NAME=elf32-little
56endif
57
58ifeq (${MACHINE},msim)
59 BFD = binary
60 CFLAGS += -msoft-float -mips3
61 KERNEL_LOAD_ADDRESS = 0x80100000
62 BFD_NAME=elf32-little
63endif
64
65# SIMICS 4kc emulation is broken, although for instructions
66# that do not bother us
67ifeq (${MACHINE},simics)
68 BFD = elf32-little
69 CFLAGS += -msoft-float -mips3
70 KERNEL_LOAD_ADDRESS = 0x80100000
71 BFD_NAME=elf32-little
72endif
73
74arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
75 $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
76
77arch_sources= \
78 src/arch/start.S \
79 src/arch/context.S \
80 src/arch/panic.S \
81 src/arch/mips32.c \
82 src/arch/dummy.S \
83 src/arch/console.c \
84 src/arch/asm.S \
85 src/arch/exception.c \
86 src/arch/interrupt.c \
87 src/arch/cache.c \
88 src/arch/cpu/cpu.c \
89 src/arch/mm/frame.c \
90 src/arch/mm/page.c \
91 src/arch/mm/tlb.c \
92 src/arch/fpu_context.c \
93 src/arch/fmath.c \
94 src/arch/drivers/arc.c
Note: See TracBrowser for help on using the repository browser.