filename | test/Makefile.in |
changeset | 1124:aacaae9812ea |
prev | 1109:700c5ab26a63 |
next | 1162:a10d0d254f1f |
author | nkeynes |
date | Mon Jan 17 21:22:06 2011 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Avoid rebinding textures unnecessarily (actually saves a surprising amount of runtime) |
view | annotate | diff | log | raw |
1 srcdir = @srcdir@
2 top_srcdir = @top_srcdir@
3 VPATH = @srcdir@
4 SHELL = @SHELL@
5 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
6 mkdir_p = @mkdir_p@
8 # host compiler and flags
9 HOSTCC = @CC@
10 HOSTCFLAGS = @CFLAGS@
12 SH4CC = @SHCC@
13 SH4INC = -I$(srcdir)/include
14 SH4CFLAGS = $(SH4INC) -D_arch_dreamcast -D_arch_sub_pristine \
15 -O2 -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
16 -fno-optimize-sibling-calls
17 SH4LD = @SHLD@
18 SH4LDFLAGS = -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
19 -Wl,-T$(srcdir)/dc.x -nostartfiles -nostdlib -L$(srcdir)/lib
20 SH4LIBS = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
21 SH4OBJCOPY = @SHOBJCOPY@ -O binary
23 SHARED_OBJECTS = dmac.so asic.so lib.so timer.so testdata.so interrupt.so
25 ARMCC = @ARMCC@
26 ARMCFLAGS = -O2 -fno-builtin -fno-strict-aliasing -mlittle-endian
27 ARMLD = @ARMLD@
28 ARMLDFLAGS = -Wl,-T$(srcdir)/aica.x -nostartfiles -mlittle-endian \
29 -nostdlib -L$(srcdir)/lib-arm
30 ARMLIBS = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
31 ARMOBJCOPY = @ARMOBJCOPY@ -O binary
33 RUNTEST = ../src/lxdream -c $(srcdir)/lxdream.rc -puH -A null -e
34 RUNTESTX = ../src/lxdream -c $(srcdir)/lxdream.rc -xpuH -A null -e
36 BUILD_SYSTEST_FALSE = @BUILD_SYSTEST_FALSE@
37 BUILD_SYSTEST_TRUE = @BUILD_SYSTEST_TRUE@
39 %.ao: %.c
40 $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
42 %.ao: %.s
43 $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
45 %.so: %.c
46 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
48 %.so: %.ac
49 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
51 %.so: %.s
52 $(SH4CC) $(SH4CFLAGS) -o $@ -c $< -Wa,-I$(srcdir)
54 %.so: %.S
55 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
57 %.o: %.c
58 $(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
60 %.arm: %.ao arm_crt0.ao
61 $(ARMCC) -Wl,-Ttext,0x00000000 -nostartfiles -nostdlib -e reset -o $@ arm_crt0.ao $< -lgcc
64 %.bin: %.arm
65 $(ARMOBJCOPY) -O binary $< $@
67 %.aso: %.bin bin2c
68 ./bin2c $< $<.c
69 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<.c
71 all:
73 @BUILD_SYSTEST_TRUE@check: build-tests
74 @BUILD_SYSTEST_TRUE@ $(RUNTEST) testsh4
75 @BUILD_SYSTEST_TRUE@ $(RUNTESTX) testsh4
76 @BUILD_SYSTEST_TRUE@ $(RUNTEST) randmath < $(srcdir)/random.dat > randmath.out && diff -u randmath.out randmath.expect
77 @BUILD_SYSTEST_TRUE@ $(RUNTEST) testmmu
78 @BUILD_SYSTEST_TRUE@ $(RUNTEST) testregs
79 @BUILD_SYSTEST_TRUE@ cat $(srcdir)/testta.data $(srcdir)/testta2.data $(srcdir)/testta3.data $(srcdir)/testta4.data $(srcdir)/testta5.data | $(RUNTEST) testta
80 @BUILD_SYSTEST_TRUE@ cat $(srcdir)/testsort.data | $(RUNTEST) testta
81 # $(RUNTEST) testide -d ../disc/test.nrg
84 build-tests: testsh4 testmmu testmath testide testta testregs testrend testdisp testspu testmmu randmath randmath.expect
86 lib/crt0.so: lib/crt0.s
87 $(mkdir_p) lib
88 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
90 lib-arm/crt0.ao: lib-arm/crt0.s
91 $(mkdir_p) lib-arm
92 $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
95 testsh4: lib/crt0.so sh4/testsh4.so timer.so interrupt.so \
96 sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \
97 sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \
98 sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \
99 sh4/ldc.so sh4/mac.so \
100 sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so sh4/subv.so \
101 sh4/trapa.so sh4/tas.so sh4/xtrct.so \
102 sh4/excslot.so sh4/undef.so sh4/tlb.so sh4/vmexit.so
103 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
104 $(SH4OBJCOPY) testsh4 testsh4.bin
106 testmmu: lib/crt0.so sh4/testmmu.so sh4/utlb.so sh4/testutlb.so sh4/mmummio.so
107 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
108 $(SH4OBJCOPY) testmmu testmmu.bin
111 testide: lib/crt0.so $(SHARED_OBJECTS) testide.so ide.so
112 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
113 $(SH4OBJCOPY) testide testide.bin
115 testmath: lib/crt0.so $(SHARED_OBJECTS) testmath.so math.so
116 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
118 testregs: lib/crt0.so $(SHARED_OBJECTS) testregs.so ide.so
119 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
120 $(SH4OBJCOPY) testregs testregs.bin
122 testta: lib/crt0.so $(SHARED_OBJECTS) testta.so pvr.so
123 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
124 $(SH4OBJCOPY) testta testta.bin
126 testaica: lib/crt0.so $(SHARED_OBJECTS) testaica.so
127 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
128 $(SH4OBJCOPY) testaica testaica.bin
130 testrend: lib/crt0.so $(SHARED_OBJECTS) testrend.so pvr.so
131 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
132 $(SH4OBJCOPY) testrend testrend.bin
134 testblend: lib/crt0.so $(SHARED_OBJECTS) testblend.so pvr.so
135 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
136 $(SH4OBJCOPY) testblend testblend.bin
138 testdisp: lib/crt0.so $(SHARED_OBJECTS) testdisp.so pvr.so
139 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
140 $(SH4OBJCOPY) testdisp testdisp.bin
142 testyuv: lib/crt0.so $(SHARED_OBJECTS) testyuv.so pvr.so
143 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
144 $(SH4OBJCOPY) testyuv testyuv.bin
146 testspu: lib/crt0.so $(SHARED_OBJECTS) testspu.so
147 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
148 $(SH4OBJCOPY) testspu testspu.bin
150 testg2: lib/crt0.so $(SHARED_OBJECTS) testg2.so
151 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
152 $(SH4OBJCOPY) testg2 testg2.bin
154 readdata: lib/crt0.so $(SHARED_OBJECTS) readdata.so
155 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
157 rend: lib/crt0.so $(SHARED_OBJECTS) rendload.so pvr.so
158 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
159 $(SH4OBJCOPY) rend rend.bin
161 testFF10: lib/crt0.so $(SHARED_OBJECTS) testFF10.so
162 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
163 $(SH4OBJCOPY) testFF10 testFF10.bin
165 randmath: lib/crt0.so $(SHARED_OBJECTS) randmath.so
166 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
167 $(SH4OBJCOPY) randmath randmath.bin
169 randmath.expect: randmath.c
170 $(HOSTCC) $^ -o randmath.native
171 ./randmath.native < $(srcdir)/random.dat > $@
173 .PHONY : clean
174 clean:
175 rm -f *.o *.so *.ao *.ac *.bin sh4/*.so lib/*.so lib-arm/*.ao mapleid \
176 readmem dumpasic testsh4 testta testdisp testregs testide testmath \
177 testmmu testaica testrend testspu ide dcflash.rom
179 distclean: clean
180 rm -f Makefile
182 install:
184 installcheck:
186 uninstall:
188 DISTFILES = asic.c asic.h bin2c.c dma.h dmac.c ide.c ide.h interrupt.s \
189 lib.c lib.h math.s pvr.c pvr.h rendload.c sh4/add.s sh4/addc.s \
190 sh4/addv.s sh4/and.s sh4/andi.s sh4/bf.s sh4/bsr.s sh4/bt.s sh4/cmp.s \
191 sh4/cmpstr.s sh4/div0.s sh4/div1.s sh4/excslot.s sh4/float.s sh4/fmov.s sh4/ftrc.s \
192 sh4/inc.s sh4/mac.s sh4/ldc.s sh4/rot.s sh4/shl.s sh4/shld.s sh4/sub.s sh4/subc.s \
193 sh4/subv.s sh4/tas.s sh4/testsh4.c sh4/tlb.s sh4/vmexit.s sh4/trapa.s sh4/undef.s \
194 sh4/xtrct.s sh4/utlb.c sh4/utlb.h sh4/testutlb.s testdata.c testdata.h testdisp.c \
195 testide.c testmath.c testaica.c sh4/testmmu.c sh4/mmummio.c testregs.c testrend.c \
196 testspu.c testta.c testyuv.c timer.c timer.h randmath.c \
197 testta.data testta2.data testta3.data testta4.data testta5.data testsort.data \
198 lxdream.rc dc.x lib/crt0.s lib/libc.a lib/libm.a lib/newlib-1.8.2-dc.patch \
199 aica.x lib-arm/libc.a lib-arm/libm.a lib-arm/crt0.s random.dat \
200 include/_ansi.h include/_syslist.h include/ar.h include/assert.h include/ctype.h \
201 include/dirent.h include/errno.h include/fastmath.h include/fcntl.h include/grp.h \
202 include/ieeefp.h include/locale.h include/machine/fastmath.h include/machine/ieeefp.h \
203 include/machine/setjmp-dj.h include/machine/setjmp.h include/machine/time.h \
204 include/machine/types.h include/malloc.h include/math.h include/paths.h \
205 include/process.h include/pwd.h include/reent.h include/regdef.h include/setjmp.h \
206 include/signal.h include/stdio.h include/stdlib.h include/string.h include/sys/_types.h \
207 include/sys/config.h include/sys/dirent.h include/sys/errno.h include/sys/fcntl.h \
208 include/sys/file.h include/sys/param.h include/sys/reent.h include/sys/resource.h \
209 include/sys/signal.h include/sys/stat-dj.h include/sys/stat.h include/sys/time.h \
210 include/sys/timeb.h include/sys/times.h include/sys/types.h include/sys/unistd.h \
211 include/sys/utime.h include/sys/wait.h include/termios.h include/time.h \
212 include/unctrl.h include/unistd.h include/utime.h include/utmp.h \
213 @BUILD_SYSTEST_TRUE@ testsh4 testregs testmmu testta testaica
217 distdir: $(DISTFILES)
218 $(mkdir_p) $(distdir)/sh4 $(distdir)/lib $(distdir)/include
219 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
220 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
221 list='$(DISTFILES)'; for file in $$list; do \
222 case $$file in \
223 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
224 $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
225 esac; \
226 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
227 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
228 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
229 dir="/$$dir"; \
230 $(mkdir_p) "$(distdir)$$dir"; \
231 else \
232 dir=''; \
233 fi; \
234 if test -d $$d/$$file; then \
235 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
236 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
237 fi; \
238 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
239 else \
240 test -f $(distdir)/$$file \
241 || cp -p $$d/$$file $(distdir)/$$file \
242 || exit 1; \
243 fi; \
244 done
246 dvi:
.