Makefile
2.6 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
##########################################################################
#
# Makefile for RSP line graphics microcode
#
##########################################################################
PRDEPTH=../../../../
include $(PRDEPTH)/PRdefs
#
UCODE = gspL3DPEX
GMAIN = ../../gmain.s
# local defs
LCDEFS = $(HW_FLAGS) -DLINE3D -DSMARTDLCOUNT -DSMARTINP -DMTXNOLMT \
-DMOREDLLNK -DF3DEX_GBI -DBRANCH_Z -DSWITCH_UCODE -DFORCE_MMTX_LOAD
# local includes
LCINCS = -I. -I../.. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR
LDIRT = *.dat *.lst *.sym *.dbg *.elf *.tvd *~ \
gfillnops.s gfillnops.dram.s gfillnops.fifo.s
GDIRT = *.u $(UCODE).fifo
GFX_INCL = ../../gdmem.h ../../gfx_regs.h
#
# this is the subset of the "common" graphics code we use here:
#
COMMON_GFX_CODE = $(GMAIN) ../../gyield.s ../../gdone.s \
../../ginit.s ../../gboot.s ../../newt.s \
../../goutfifo.s ../../gdma.s ../../gimm.s \
../../grdp.s ../../gmtx.s ../../gvtx.s \
../../gflight.s ../../goverlays.s ../../gloaduc.s
LINE_CODE = gline.s gclipl.s
INST_LIB_TARGETS = $(UCODE).fifo.o
TARGETS = $(UCODE).fifo \
$(UCODE).fifo.tvd \
${INST_LIB_TARGETS}
default: ${TARGETS} checksize
install exports: ${TARGETS} checksize
$(INSTALL) -m 555 -F /usr/lib/PR $(INST_LIB_TARGETS)
include $(PRDEPTH)/PRrules
##########################################################################
#
# use the RSP linker 'buildtask' to construct the tasks from the objects.
# use the rsp2elf program to construct the debug executables and library
# executables.
#
# 'dd' is used to chop the data section to the minimum required, in
# order to save ROM/RAM space.
#
#
# the 3D line ucode with output to circular DRAM fifo:
#
$(UCODE).fifo: $(UCODE).fifo.u newt.u
${BUILDTASK} -f 1 -o $@ $(UCODE).fifo.u newt.u
dd if=$@.dat of=tmp3.dat bs=1 count=2048
mv tmp3.dat $@.dat
$(UCODE).fifo.o: $(UCODE).fifo
${RSP2ELF} -p -r $?
$(UCODE).fifo.tvd: $(UCODE).fifo
${RSP2ELF} -p $?
#
# Ensure IMEM size does not overflow
#
checksize: ${INST_LIB_TARGETS}
../../sizecheck ${INST_LIB_TARGETS}
../../labeltest
#############################################################################
#
# build the individual objects.
#
newt.u: $(UCODE).fifo.u ../../newt.s ${COMMON_GFX_CODE}
@echo "****"
@echo "**** Building $@:"
@echo "****"
${RSPASM} ${LCINCS} ${LCDEFS} -DNEWT_ALONE -S $(UCODE).fifo.u -o $@ ../../newt.s
$(UCODE).fifo.u: ${COMMON_GFX_CODE} ${LINE_CODE} ${GFX_INCL}
@echo "****"
@echo "**** Building $@:"
@echo "****"
${RSPASM} ${LCINCS} ${LCDEFS} -DOUTPUT_FIFO -o $@ ../../gmain.s
@echo " "
# DO NOT DELETE THIS LINE -- make depend depends on it.