GNUmakefile
2.25 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
BBDEPTH = ../..
include $(BBDEPTH)/BBdefs
LASINCS = -I$(ROOT)/usr/include/PR -I..
LCINCS = -I$(ROOT)/usr/include/PR -I.. -I.
OPTIMIZER = -O3 -g
LCFLAGS += -Wall
VPATH=..
LDFLAGS = -Ttext 0xbfc00000 -N
ifndef CPU_625
LCFLAGS += -DDBG_JTAG
endif
ifdef NO_DDR_TEST
LCFLAGS += -DNO_DDR_TEST
endif
ifdef NEC_IRAM_MARCH
LCFLAGS += -DNEC_IRAM_MARCH
endif
ifdef PLL_BYPASS
LCFLAGS += -DPLL_BYPASS
endif
ifdef NEC_IRAM_TEST
LCFLAGS += -DNEC_IRAM_TEST
endif
ifdef PATTERN_0
LCFLAGS += -DPATTERN_0
endif
ifdef TOSHIBA_FLASH
LCFLAGS += -DTOSHIBA_FLASH
endif
TARGETS= bus_error.dat sane.dat secure.dat interrupt.dat reset.dat cacheun.dat\
bandwidth.dat viragerw.dat ipcsane.dat emuwrite.dat bus_error2.dat \
ddr.dat vi32bar.dat vi16bar.dat vifill.dat atspeed_ddr.dat atspeed_sram.dat \
atspeed_comp.dat atspeed_comp_aisp.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
cacheun.elf: cacheun.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
ddr.elf: ddr.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
ddr.o: ddr.c ../cpusim.h
$(CCF) -c -o $*.o $<
vi32bar.elf: vi32bar.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
vi16bar.elf: vi16bar.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
vifill.elf: vifill.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
interrupt.elf: interrupt.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
bandwidth.elf: bandwidth.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
bus_error2.elf: bus_error2.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
##### Add for NEC at speed test vector #####
atspeed_ddr.elf: atspeed_ddr.o cache.o
$(LD) $(LDFLAGS) crt0.o $^ -o $*.elf
atspeed_sram.elf: atspeed_sram.o
$(LD) -Ttext 0x80201000 -N $^ -o $*.elf
atspeed_comp.elf: atspeed_comp.o cache.o
$(LD) -Ttext 0x80201000 -N $^ -o $*.elf
atspeed_comp_aisp.elf: atspeed_comp_aisp.o cache.o
$(LD) -Ttext 0x80201000 -N $^ -o $*.elf
$(TARGETS) : crt0.o ../cpusim.h
install exports: