filename | test/Makefile.in |
changeset | 1083:34895c8bab20 |
prev | 1082:852fc1db460a |
next | 1085:0be1958dd207 |
author | nkeynes |
date | Wed Dec 02 10:36:49 2009 +1000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Add missing SUBV instruction to the emulation core (translation core is ok), along with test cases. Thanks to D. Jeff Dionne for pointing this out. |
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
34 RUNTESTX = ../src/lxdream -c $(srcdir)/lxdream.rc -xpuH -A null
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) testmmu
77 @BUILD_SYSTEST_TRUE@ $(RUNTEST) testregs
78 @BUILD_SYSTEST_TRUE@ cat $(srcdir)/testta.data $(srcdir)/testta2.data $(srcdir)/testta3.data $(srcdir)/testta4.data $(srcdir)/testta5.data | $(RUNTEST) testta
79 @BUILD_SYSTEST_TRUE@ cat $(srcdir)/testsort.data | $(RUNTEST) testta
80 # $(RUNTEST) testide -d ../disc/test.nrg
83 build-tests: testsh4 testmmu testmath testide testta testregs testrend testdisp testspu testmmu
85 lib/crt0.so: lib/crt0.s
86 $(mkdir_p) lib
87 $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
89 lib-arm/crt0.ao: lib-arm/crt0.s
90 $(mkdir_p) lib-arm
91 $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
94 testsh4: lib/crt0.so sh4/testsh4.so timer.so interrupt.so \
95 sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \
96 sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \
97 sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \
98 sh4/ldc.so sh4/mac.so \
99 sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so sh4/subv.so \
100 sh4/trapa.so sh4/tas.so sh4/xtrct.so \
101 sh4/excslot.so sh4/undef.so sh4/tlb.so sh4/vmexit.so
102 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
103 $(SH4OBJCOPY) testsh4 testsh4.bin
105 testmmu: lib/crt0.so sh4/testmmu.so sh4/utlb.so sh4/testutlb.so sh4/mmummio.so
106 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
107 $(SH4OBJCOPY) testmmu testmmu.bin
110 testide: lib/crt0.so $(SHARED_OBJECTS) testide.so ide.so
111 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
112 $(SH4OBJCOPY) testide testide.bin
114 testmath: lib/crt0.so $(SHARED_OBJECTS) testmath.so math.so
115 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
117 testregs: lib/crt0.so $(SHARED_OBJECTS) testregs.so ide.so
118 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
119 $(SH4OBJCOPY) testregs testregs.bin
121 testta: lib/crt0.so $(SHARED_OBJECTS) testta.so pvr.so
122 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
123 $(SH4OBJCOPY) testta testta.bin
125 testaica: lib/crt0.so $(SHARED_OBJECTS) testaica.so
126 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
127 $(SH4OBJCOPY) testaica testaica.bin
129 testrend: lib/crt0.so $(SHARED_OBJECTS) testrend.so pvr.so
130 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
131 $(SH4OBJCOPY) testrend testrend.bin
133 testblend: lib/crt0.so $(SHARED_OBJECTS) testblend.so pvr.so
134 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
135 $(SH4OBJCOPY) testblend testblend.bin
137 testdisp: lib/crt0.so $(SHARED_OBJECTS) testdisp.so pvr.so
138 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
139 $(SH4OBJCOPY) testdisp testdisp.bin
141 testyuv: lib/crt0.so $(SHARED_OBJECTS) testyuv.so pvr.so
142 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
143 $(SH4OBJCOPY) testyuv testyuv.bin
145 testspu: lib/crt0.so $(SHARED_OBJECTS) testspu.so
146 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
147 $(SH4OBJCOPY) testspu testspu.bin
149 testg2: lib/crt0.so $(SHARED_OBJECTS) testg2.so
150 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
151 $(SH4OBJCOPY) testg2 testg2.bin
153 readdata: lib/crt0.so $(SHARED_OBJECTS) readdata.so
154 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
156 rend: lib/crt0.so $(SHARED_OBJECTS) rendload.so pvr.so
157 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
158 $(SH4OBJCOPY) rend rend.bin
160 testFF10: lib/crt0.so $(SHARED_OBJECTS) testFF10.so
161 $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
162 $(SH4OBJCOPY) testFF10 testFF10.bin
164 .PHONY : clean
165 clean:
166 rm -f *.o *.so *.ao *.ac *.bin sh4/*.so lib/*.so lib-arm/*.ao mapleid \
167 readmem dumpasic testsh4 testta testdisp testregs testide testmath \
168 testmmu testaica testrend testspu ide dcflash.rom
170 distclean: clean
171 rm -f Makefile
173 install:
175 installcheck:
177 uninstall:
179 DISTFILES = asic.c asic.h bin2c.c dma.h dmac.c ide.c ide.h interrupt.s \
180 lib.c lib.h math.s pvr.c pvr.h rendload.c sh4/add.s sh4/addc.s \
181 sh4/addv.s sh4/and.s sh4/andi.s sh4/bf.s sh4/bsr.s sh4/bt.s sh4/cmp.s \
182 sh4/cmpstr.s sh4/div0.s sh4/div1.s sh4/excslot.s sh4/float.s sh4/fmov.s \
183 sh4/ftrc.s sh4/inc.s sh4/mac.s sh4/ldc.s sh4/rot.s sh4/shl.s sh4/shld.s sh4/sub.s \
184 sh4/subc.s sh4/tas.s sh4/testsh4.c sh4/tlb.s sh4/vmexit.s sh4/trapa.s sh4/undef.s \
185 sh4/xtrct.s sh4/utlb.c sh4/utlb.h sh4/testutlb.s testdata.c testdata.h testdisp.c \
186 testide.c testmath.c testaica.c sh4/testmmu.c sh4/mmummio.c testregs.c testrend.c \
187 testspu.c testta.c testyuv.c timer.c timer.h \
188 testta.data testta2.data testta3.data testta4.data testta5.data testsort.data \
189 lxdream.rc dc.x lib/crt0.s lib/libc.a lib/libm.a lib/newlib-1.8.2-dc.patch \
190 aica.x lib-arm/libc.a lib-arm/libm.a lib-arm/crt0.s \
191 include/_ansi.h include/_syslist.h include/ar.h include/assert.h include/ctype.h \
192 include/dirent.h include/errno.h include/fastmath.h include/fcntl.h include/grp.h \
193 include/ieeefp.h include/locale.h include/machine/fastmath.h include/machine/ieeefp.h \
194 include/machine/setjmp-dj.h include/machine/setjmp.h include/machine/time.h \
195 include/machine/types.h include/malloc.h include/math.h include/paths.h \
196 include/process.h include/pwd.h include/reent.h include/regdef.h include/setjmp.h \
197 include/signal.h include/stdio.h include/stdlib.h include/string.h include/sys/_types.h \
198 include/sys/config.h include/sys/dirent.h include/sys/errno.h include/sys/fcntl.h \
199 include/sys/file.h include/sys/param.h include/sys/reent.h include/sys/resource.h \
200 include/sys/signal.h include/sys/stat-dj.h include/sys/stat.h include/sys/time.h \
201 include/sys/timeb.h include/sys/times.h include/sys/types.h include/sys/unistd.h \
202 include/sys/utime.h include/sys/wait.h include/termios.h include/time.h \
203 include/unctrl.h include/unistd.h include/utime.h include/utmp.h \
204 @BUILD_SYSTEST_TRUE@ testsh4 testregs testmmu testta testaica
208 distdir: $(DISTFILES)
209 $(mkdir_p) $(distdir)/sh4 $(distdir)/lib $(distdir)/include
210 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
211 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
212 list='$(DISTFILES)'; for file in $$list; do \
213 case $$file in \
214 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
215 $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
216 esac; \
217 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
218 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
219 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
220 dir="/$$dir"; \
221 $(mkdir_p) "$(distdir)$$dir"; \
222 else \
223 dir=''; \
224 fi; \
225 if test -d $$d/$$file; then \
226 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
227 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
228 fi; \
229 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
230 else \
231 test -f $(distdir)/$$file \
232 || cp -p $$d/$$file $(distdir)/$$file \
233 || exit 1; \
234 fi; \
235 done
237 dvi:
.