--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Makefile.in Sat Nov 17 01:30:01 2007 +0000 @@ -0,0 +1,138 @@ +# host compiler and flags +HOSTCC = @CC@ +HOSTCFLAGS = @CFLAGS@ +SH4CC = @SHCC@ +SH4INC = -Iinclude +SH4CFLAGS = $(SH4INC) -D_arch_dreamcast -D_arch_sub_pristine \ + -O2 -fno-builtin -fno-strict-aliasing -ml -m4-single-only \ + -fno-optimize-sibling-calls +SH4LD = @SHLD@ +SH4LDFLAGS = -fno-builtin -fno-strict-aliasing -ml -m4-single-only \ + -Wl,-Tdc.x -nostartfiles -nostdlib -Llib +SH4LIBS = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group +SH4OBJCOPY = @SHOBJCOPY@ -O binary +ARMCC = @ARMCC@ +ARMCFLAGS = -O2 +ARMLD = @ARMLD@ +ARMOBJCOPY = @ARMOBJCOPY@ + +RUNTEST = ../src/lxdream -c ./lxdream.rc -puh + + +# cygwin +# these must point to your sh-elf bfd, not the system one +#BFDLIB = -L/usr/local/lib -lbfd -liberty -lintl +#BFDINCLUDE = /usr/local/include + +#SHARED_OBJECTS = crt0.so dcload-syscall.so dcload-syscalls.so memcpy.so lib.so +SHARED_OBJECTS = + +%.ao: %.c + $(ARMCC) $(ARMCFLAGS) -o $@ -c $< + +%.ao: %.s + $(ARMCC) $(ARMCFLAGS) -o $@ -c $< + +%.so: %.c + $(SH4CC) $(SH4CFLAGS) -o $@ -c $< + +%.so: %.ac + $(SH4CC) $(SH4CFLAGS) -o $@ -c $< + +%.so: %.s + $(SH4CC) $(SH4CFLAGS) -o $@ -c $< + +%.so: %.S + $(SH4CC) $(SH4CFLAGS) -o $@ -c $< + +%.o: %.c + $(HOSTCC) $(HOSTCFLAGS) -o $@ -c $< + +%.arm: %.ao arm_crt0.ao + $(ARMCC) -Wl,-Ttext,0x00000000 -nostartfiles -nostdlib -e reset -o $@ arm_crt0.ao $< -lgcc + + +%.bin: %.arm + $(ARMOBJCOPY) -O binary $< $@ + +%.aso: %.bin bin2c + ./bin2c $< $<.c + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<.c + +all: build-tests + +check: build-tests + cat testta.data testta2.data testta3.data testta4.data testta5.data | $(RUNTEST) testta + $(RUNTEST) testsh4 + $(RUNTEST) testregs + $(RUNTEST) testmath + $(RUNTEST) testide -d ../disc/test.nrg + + +build-tests: testsh4 testmath testide testta testregs testrend testdisp testspu + +testsh4: crt0.so sh4/testsh4.so timer.so interrupt.so \ + sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \ + sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \ + sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \ + sh4/mac.s \ + sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \ + sh4/tas.so sh4/xtrct.so \ + sh4/excslot.so sh4/undef.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testsh4 testsh4.bin + +testide: crt0.so testide.so ide.so lib.so testdata.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testide testide.bin + +testmath: crt0.so $(SHARED_OBJECTS) testmath.so math.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + +testregs: crt0.so $(SHARED_OBJECTS) testregs.so ide.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testregs testregs.bin + +testta: crt0.so $(SHARED_OBJECTS) testta.so pvr.so dmac.so asic.so lib.so testdata.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testta testta.bin + +testrend: crt0.so $(SHARED_OBJECTS) testrend.so pvr.so dmac.so asic.so lib.so testdata.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testrend testrend.bin + +testblend: crt0.so $(SHARED_OBJECTS) testblend.so pvr.so dmac.so asic.so lib.so testdata.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testblend testblend.bin + +testdisp: crt0.so $(SHARED_OBJECTS) testdisp.so pvr.so asic.so lib.so testdata.so timer.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testdisp testdisp.bin + +testyuv: crt0.so $(SHARED_OBJECTS) testyuv.so pvr.so asic.so lib.so testdata.so timer.so dmac.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testyuv testyuv.bin + +testspu: crt0.so $(SHARED_OBJECTS) testspu.so asic.so lib.so testdata.so timer.so dmac.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testspu testspu.bin + +testg2: crt0.so $(SHARED_OBJECTS) testg2.so asic.so lib.so testdata.so timer.so dmac.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testg2 testg2.bin + +readdata: crt0.so readdata.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + +rend: crt0.so rendload.so asic.so lib.so timer.so pvr.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) rend rend.bin + +testFF10: crt0.so testFF10.so lib.so + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS) + $(SH4OBJCOPY) testFF10 testFF10.bin + +.PHONY : clean +clean: + rm -f *.o *.so *.ao *.ac *.bin mapleid ide readmem dumpasic +