GNUmakefile
3.21 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!smake -k
#
# Makefile for Go/No-go diagnostic
#
include $(ROOT)/usr/include/make/PRdefs
include ../gngdefs
APP = gng
OPTIMIZER = -g -O2
TARGETS = bbgng
HFILES = controller.h gng.h
ifdef dvt_board
LCINCS += -DDVT_BOARD
endif
ifdef dvt_burn
LCINCS += -DDVT_BURN
endif
ifdef dvt_system
LCINCS += -DDVT_SYSTEM
endif
ifdef bb_breakout
LCINCS += -DBB_BREAKOUT
endif
ifdef bb_dummy
LCINCS += -DBB_DUMMY
endif
#RDRAMTEST_LASOPTS=-Wab,-mips3 -Wab,-diag -non_shared -coff -G 0
#RDRAMTEST_LDFLAGS =-allow_jump_at_eop -coff -N -T A4000000 -G 0
RDRAMTEST_LASOPTS=-Wab,$(MIPSI) -Wab,-diag -non_shared -G 0
RDRAMTEST_LDFLAGS =-N -Ttext A4000000 -G 0
#
# main.c MUST be first, so that the boot() function is the first function in
# the module.
#
CODEFILES = main.c controller.c testDriver.c \
audiotest.c intcheck.c bb_test.c bb_dummy.c graph.c asci.c
CODEOBJECTS = $(CODEFILES:.c=.o) int1.o
OTHEROBJS = ../audio/audio.o \
../gng_report/gng_report.o \
../gng_report/font.o \
../rdp/rdpCodeSegment.o \
../rsp/rsp.o \
../uji/ujiCodeSegment.o \
../video/vi.o
CODESEGMENT = testDriverCodeSegment.o
DATAFILES = cfb.c cfb_dash.c cfb_testarea.c
DATAOBJECTS = $(DATAFILES:.c=.o) rdp/rdpStaticSegment.o
BOOTFILES = boot.c
BOOTOBJECTS = $(BOOTFILES:.c=.o)
BOOTSEGMENT = bootsegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS) rdramTest.o
LASINCS = -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include
LDIRT = $(APP) boot load.map \
#LCOPTS += -woff 835
#LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
# -l$(ULTRALIB)
LDFLAGS = $(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-l$(ULTRALIB) -lgcc --no-warn-mismatch
default: $(TARGETS)
include $(COMMONRULES)
install: default
$(CODESEGMENT): $(CODEOBJECTS) $(OTHEROBJS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) \
$(OTHEROBJS) $(LDFLAGS)
$(BOOTSEGMENT): $(BOOTOBJECTS)
# $(LD) -m -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) $(LDFLAGS) > load.map
$(LD) --print-map -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) $(LDFLAGS) > load.map
$(OBJECTS): $(HFILES)
boot.o:
rom $(APP): spec $(OBJECTS) $(MAKEROM) $(BOOTSEGMENT)
# $(MAKEROM) $(MAKEROMDEFS) -o -m spec >load.map
$(MAKEROM) $(MAKEROMDEFS) -o -m spec >load.map
pvt: rom
make clobber
make
./skrom rom _rom
dd if=_rom of=../00000000.rom bs=16384 conv=sync
../../boot/bundleBootapp ../00000000.rom bbgng.aes bbgng.tik
cat ../../sk/sk.aes > ../00000000.app
cat bbgng.tik >> ../00000000.app
cat bbgng.aes >> ../00000000.app
bbgng: rom
make clobber
make dvt_board=1 rom
cp rom ../bb_manf_board.n64
./skrom rom _rom
dd if=_rom of=../bb_manf_board.rom bs=16384 conv=sync
make clobber
make dvt_burn=1 rom
cp rom ../bb_manf_sys.n64
./skrom rom _rom
dd if=_rom of=../bb_manf_sys.rom bs=16384 conv=sync
rm -rf _rom
make clobber
make dvt_system=1 rom
cp rom ../bb_manf_oqc.n64
./skrom rom _rom
dd if=_rom of=../bb_manf_oqc.rom bs=16384 conv=sync
rm -rf _rom
make clobber
make bb_breakout=1 rom
cp rom ../breakout_manf_sys.n64
./skrom rom _rom
dd if=_rom of=../breakout_manf_sys.rom bs=16384 conv=sync
rm -rf _rom
make clobber
make bb_dummy=1 rom
cp rom ../dummy_manf_sys.n64
./skrom rom _rom
dd if=_rom of=../dummy_manf_sys.rom bs=16384 conv=sync
rm -rf _rom