GNUmakefile
2.77 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
##########################################################################
#
# Makefile for Manufacturing Test Vectors microcode
#
##########################################################################
PRDEPTH=../../
include $(PRDEPTH)/PRdefs
OPTIMIZER = -g
# local defs
LCDEFS = $(HW_FLAGS)
# uncomment this to show the bow-tie polygons...
# local includes
LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR
LDOPTS = -L. -L$(ROOT)/usr/lib/PR
LDLIBS = -ll -lm
LDIRT = *.dat *.lst *.sym *.dbg *.elf *.tvd tdmem_init.h tdmem_label.h \
sortdata
TST_INCL = tdmem_label.h tdmem_init.h tst_regs.h
TST_CODE = tmain.s tdma.s timm.s trdp.s tdone.s \
toutxbus.s toutdram.s tinit.s tbl.s
INST_TOOL_TARGETS =
INST_LIB_TARGETS = tspManTest1.o tspManTest1.dram.o
TARGETS = tspManTest1 tspManTest1.dram \
tspManTest1.u.tvd tspManTest1.dram.u.tvd \
${INST_LIB_TARGETS} \
${INST_TOOL_TARGETS}
default: ${TARGETS} checksize
install exports: ${TARGETS} checksize
./labeltest
$(INSTALL) -m 555 -F /usr/lib/PR $(INST_LIB_TARGETS)
# $(INSTALL) -m 555 -F /usr/sbin $(INST_TOOL_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.
#
#
# the regular 3D polygon ucode:
#
tspManTest1: tspManTest1.u
${BUILDTASK} -f 1 -o $@ tspManTest1.u
tspManTest1.o: tspManTest1
${RSP2ELF} -p -r $?
tspManTest1.u.tvd: tspManTest1
# uniquelabel tspManTest1.u.dbg
${RSP2ELF} -p tspManTest1.u
#
# the 3D polygon ucode with output back to DRAM:
#
tspManTest1.dram: tspManTest1.dram.u
${BUILDTASK} -f 1 -o $@ tspManTest1.dram.u
tspManTest1.dram.o: tspManTest1.dram
${RSP2ELF} -p -r $?
tspManTest1.dram.u.tvd: tspManTest1.dram
# uniquelabel tspManTest1.dram.u.dbg
${RSP2ELF} -p tspManTest1.dram.u
#
# Ensure IMEM size does not overflow
#
checksize: ${INST_LIB_TARGETS}
./sizecheck ${INST_LIB_TARGETS}
#############################################################################
#
# build the individual objects.
#
tspManTest1.u: ${TST_INCL} ${TST_CODE}
@echo "****"
@echo "**** Building $@:"
@echo "****"
${RSPASM} ${LCINCS} ${LCDEFS} -o $@ tmain.s
@echo " "
tspManTest1.dram.u: ${TST_INCL} ${TST_CODE}
@echo "****"
@echo "**** Building $@:"
@echo "****"
${RSPASM} ${LCINCS} ${LCDEFS} -DOUTPUT_DRAM -o $@ tmain.s
@echo " "
sortdata: sortdata.c
$(HOST_CCF) -o sortdata sortdata.c
tdmem_label.h tdmem_init.h: tdmem.h sortdata
./sortdata -l < tdmem.h > tdmem_label.h
./sortdata -i < tdmem.h > tdmem_init.h
##############################################################################
#
# utility (tool) programs...
#
# DO NOT DELETE THIS LINE -- make depend depends on it.