GNUmakefile
768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
BBDEPTH = ../../..
include $(BBDEPTH)/BBdefs
LASINCS = -I$(ROOT)/usr/include/PR -I../..
LCINCS = -I$(ROOT)/usr/include/PR -I../..
OPTIMIZER = -O3 -g
LCFLAGS += -Wall
VPATH=../..
LDFLAGS = -Ttext 0xbfc00000 -N
TARGETS=start_rom.dat
LDIRT += $(TARGETS:.dat=.bin) $(TARGETS:.dat=.elf)
.SUFFIXES: .bin .dat .elf
include $(BBDEPTH)/BBrules
default: $(TARGETS)
.s.elf:
$(ASF) -o $*.o $<
$(LD) $(LDFLAGS) crt0.o $*.o -o $*.elf
.elf.bin:
mips-linux-objcopy -O binary -R .mdebug -R .reginfo $*.elf $*.bin
.bin.dat:
od -v -w4 -An -tx1 $*.bin | tr -d " " > $*.dat
.c.elf:
$(CCF) -c -o $*.o $<
$(LD) $(LDFLAGS) crt0.o $*.o -o $*.elf
start_rom.elf: crt0.o start_rom.o cache.o
$(LD) $(LDFLAGS) $^ -o $*.elf
$(TARGETS) : crt0.o ../../cpusim.h
install exports: