Makefile
2.12 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
#!smake -k
#
# Makefile for Go/No-go diagnostic
#
include $(ROOT)/usr/include/make/PRdefs
include ../gngdefs
APP = gng
OPTIMIZER = -g
TARGETS = rom rdramTest
HFILES = controller.h gng.h
RDRAMTEST_LASOPTS=-Wab,-mips3 -Wab,-diag -non_shared -coff -G 0
RDRAMTEST_LDFLAGS =-allow_jump_at_eop -coff -N -T 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 sys_misc.c testDriver.c zaru.c \
audiotest.c intcheck.c
CODEOBJECTS = $(CODEFILES:.c=.o) int1.o
OTHEROBJS = ../audio/audio.o \
../gng_report/gng_report.o \
../gng_report/font.o \
../pi/pi.o \
../pif/pif.o \
../rdp/rdpCodeSegment.o \
../rsp/rsp.o \
../cpu/cpuseg.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 rdramTest2c rdramTest_data.c \
rdramTest_data.h
LCOPTS += -woff 835
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-l$(ULTRALIB)
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
$(OBJECTS): $(HFILES)
rdramTest.o: rdramTest.s
$(AS) $(RDRAMTEST_LASOPTS) $(LASINCS) rdramTest.s -o rdramTest.o
rdramTest: rdramTest.o Makefile
$(LD) $(RDRAMTEST_LDFLAGS) rdramTest.o -o rdramTest
$(SIZE) -x rdramTest | grep "Size of rdramTest"
rdramTest_data.h: rdramTest rdramTest2c
./rdramTest2c rdramTest > rdramTest_data.h
rdramTest2c: rdramTest2c.c
cc -O -L $(ROOT)/usr/lib rdramTest2c.c -o $@ -lmld
boot.o: rdramTest_data.h
rom $(APP): spec $(OBJECTS) $(MAKEROM) $(BOOTSEGMENT) ../rsp/rspcode
$(MAKEROM) $(MAKEROMDEFS) -o -m spec >load.map