GNUmakefile
3.14 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
#!smake -k
#
# Makefile for RDP verification application test suite.
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
TEXDIR = $(ROOT)/PR/apps/rdpatt/Texture
APP = rdpvector
OPTIMIZER = -g
TARGETS = rom rdpascii2rdram getimages
HFILES = rdpvector.h controller.h
GENHFILES = map_a5.h map_5a.h map_rand.h map_rand_comp.h
CODEFILES = main.c controller.c toplevel.c \
cs.c ew.c st.c tm.c tc.c tf.c cc.c bl.c ms.c
CODEOBJECTS = $(CODEFILES:.c=.o)
BOOTFILES = boot.c
BOOTOBJECTS = $(BOOTFILES:.c=.o)
BOOTSEGMENT = bootsegment.o
DATAFILES = zbuffer.c init.c cfb.c \
cs_static.c ew_static.c st_static.c tm_static.c tc_static.c \
tf_static.c cc_static.c bl_static.c ms_static.c texture.c
DATAOBJECTS = $(GENHFILES) $(DATAFILES:.c=.o)
CODESEGMENT = codesegment.o
OBJECTS = $(CODESEGMENT) $(DATAOBJECTS)
LCINCS = -I. -I$(ROOT)/usr/include/PR -I $(ROOT)/usr/include -D_LANGUAGE_C
LCOPTS = -Wall -non_shared -G 0 -mips2
LDIRT = $(APP) boot load.map $(GENHFILES) \
cases $(TEXHFILES)
#LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
# -lultra_d -lgcc
LDFLAGS = -V --verbose $(MKDEPOPT) -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
-lultra_d -lgcc
LCDEFS =
default: $(TARGETS)
include $(COMMONRULES)
install: default
# Doesn't really make sense to install this to /usr/src/PR...
# $(INSTALL) -m 444 -F /usr/src/PR/rdpvector Makefile spec \
# $(HFILES) $(CODEFILES) $(DATAFILES)
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
$(BOOTSEGMENT): $(BOOTOBJECTS)
$(LD) -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) $(LDFLAGS)
$(OBJECTS): $(HFILES)
rom $(APP): spec $(OBJECTS) $(MAKEROM) $(BOOTSEGMENT)
$(MAKEROM) -r rom spec
#
# Tool to translate ascii dump of rdp into separately named .rdp binary files
#
rdpascii2rdram: rdpascii2rdram.c
cc -O $(LCINCS) -o rdpascii2rdram rdpascii2rdram.c
#
# Tool to extract image files from the running rdpvector application.
#
getimages: getimages.c
cc -O $(LCINCS) -L$(ROOT)/usr/lib \
-o getimages getimages.c -lultrahost -L $(ROOT)/host_lib -limage
main.o: main.c
$(CC) $(CFLAGS) $(LCDEFS) -c $<
rdpvector.o: rdpvector.c
$(CC) $(CFLAGS) $(LCDEFS) -c $<
toplevel.o: toplevel.c
$(CC) $(CFLAGS) $(LCDEFS) -c $<
cs_static.o: cs_static.c cs.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
ew_static.o: ew_static.c ew.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
st_static.o: st_static.c st.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
tm_static.o: tm_static.c tm.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
tc_static.o: tc_static.c tc.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
tf_static.o: tf_static.c tf.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
cc_static.o: cc_static.c cc.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
bl_static.o: bl_static.c bl.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
ms_static.o: ms_static.c ms.h
$(CC) $(CFLAGS) $(LCDEFS) -c $<
texture.o: texture.c RGBA16checkerMM.h $(GENHFILES)
$(CC) $(CFLAGS) $(LCDEFS) -c $<
#
# Header file build rules
#
# mka5tex makes both map_a5.h and map_5a.h
map_a5.h: mka5tex.c
$(HOST_CC) -o mka5tex mka5tex.c
./mka5tex
rm -rf mka5tex
#k mkrandtex makes both map_rand and map_rand_comp.h
map_rand.h: mkrandtex.c
$(HOST_CC) -o mkrandtex mkrandtex.c
./mkrandtex
rm -rf mkrandtex