Makefile
2.53 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
##########################################################################
#
# Makefile for RSP graphics microcode
#
# There are several different microcode targets, each set
# of microcode is for a slightly different purpose; a game developer
# might use several per frame.
#
# Microcode objects are built in their respective subdirectories;
# this directory contains common tools and common microcode source
# code files.
#
# Ideally, all these different executables would share as much
# source code as possible. In order to do that, the following
# #defines are used:
#
# FASTLIGHT3D - the 'default', lighting swaps over clipping.
# TURBO3D - turbo 3D ucode.
# LINE3D - line ucode.
# SPRITE2D - sprite ucode.
# OUTPUT_DRAM - modifies any of the above targets, sending
# RDP data to DRAM rather than XBUS.
# OUTPUT_FIFO - modifies any of the above targets, sending
# RDP data to DRAM in FIFO mode.
#
##########################################################################
PRDEPTH=../../
include $(ROOT)/usr/include/make/PRdefs
OPTIMIZER = -g
# local defs
LCDEFS =
# local includes
LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR
LDOPTS = -L. -L$(ROOT)/usr/lib/PR
LDLIBS = -ll -lm
LDIRT =
TARGETS = fillnops
SUBDIRS = Fast3D F3DNoN Turbo3D Line3D Sprite2D
COMMON_UCODE = gdmem.h gboot.s gclip.s gcliptest.s gdma.s gdone.s \
gflight.s gfx_regs.h gimm.s ginit.s gmain.s gmtx.s \
goutdram.s goutfifo.s goutxbus.s goverlays.s grdp.s \
gsetup.s gsetup1.s gvtx.s gyield.s newt.s
COMMONPREF = graphics
include $(COMMONRULES)
default: $(_FORCE) ${TARGETS}
$(SUBDIRS_MAKERULE)
install exports: $(_FORCE) ${TARGETS}
$(SUBDIRS_MAKERULE)
$(INSTALL) -m 555 -F /usr/src/PR/rspcode/graphics labeltest sizecheck Makefile fillnops.c $(COMMON_UCODE)
clobber: clean rmtargets $(_FORCE)
$(SUBDIRS_MAKERULE)
rm -rf $(MKDEPFILE)
clean: $(_FORCE)
$(SUBDIRS_MAKERULE)
rm -rf $(DIRT)
rmtargets: $(_FORCE)
$(SUBDIRS_MAKERULE)
rm -rf $(TARGETS)
include $(ROOT)/usr/include/make/commonrules
##############################################################################
#
# utility (tool) programs...
#
fillnops: fillnops.c
$(CC) -o fillnops fillnops.c
MBI2BIN_OBJS = mbi2bin.o
MBI2READ_OBJS = mbi2read.o
mbi2bin: ${MBI2BIN_OBJS}
$(CC) -o $@ ${MBI2BIN_OBJS} ${LDFLAGS}
mbi2read: ${MBI2READ_OBJS}
$(CC) -o $@ ${MBI2READ_OBJS} ${LDFLAGS}
gbi2read: parse_gbi.c
$(CC) -o $@ parse_gbi.c -DGBI_STANDALONE ${LCINCS} ${LDFLAGS}
setup: setup.o
$(CC) -o $@ setup.o ${LDFLAGS} -limage
# DO NOT DELETE THIS LINE -- make depend depends on it.