Search
lxdream.org :: lxdream/test/Makefile.in
lxdream 0.9.1
released Jun 29
Download Now
filename test/Makefile.in
changeset 680:e237d43e011d
prev586:2a3ba82cf243
next699:d9ba9a9e5d14
author nkeynes
date Sun Jun 01 00:46:15 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Build tests as part of make check, not make all
file annotate diff log raw
nkeynes@521
     1
# host compiler and flags
nkeynes@521
     2
HOSTCC		= @CC@
nkeynes@521
     3
HOSTCFLAGS	= @CFLAGS@
nkeynes@521
     4
SH4CC		= @SHCC@
nkeynes@521
     5
SH4INC          = -Iinclude
nkeynes@521
     6
SH4CFLAGS	= $(SH4INC) -D_arch_dreamcast -D_arch_sub_pristine \
nkeynes@521
     7
                  -O2 -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
nkeynes@521
     8
                  -fno-optimize-sibling-calls
nkeynes@521
     9
SH4LD		= @SHLD@
nkeynes@521
    10
SH4LDFLAGS      = -fno-builtin -fno-strict-aliasing  -ml -m4-single-only \
nkeynes@521
    11
                  -Wl,-Tdc.x -nostartfiles -nostdlib -Llib
nkeynes@521
    12
SH4LIBS         = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
nkeynes@521
    13
SH4OBJCOPY      = @SHOBJCOPY@ -O binary
nkeynes@521
    14
ARMCC		= @ARMCC@
nkeynes@521
    15
ARMCFLAGS	= -O2
nkeynes@521
    16
ARMLD		= @ARMLD@
nkeynes@521
    17
ARMOBJCOPY	= @ARMOBJCOPY@
nkeynes@521
    18
nkeynes@550
    19
RUNTEST		= ../src/lxdream -c ./lxdream.rc -puh -A null
nkeynes@586
    20
RUNTESTX	= ../src/lxdream -c ./lxdream.rc -xpuh -A null
nkeynes@521
    21
nkeynes@521
    22
nkeynes@521
    23
# cygwin
nkeynes@521
    24
# these must point to your sh-elf bfd, not the system one
nkeynes@521
    25
#BFDLIB		= -L/usr/local/lib -lbfd -liberty -lintl
nkeynes@521
    26
#BFDINCLUDE	= /usr/local/include
nkeynes@521
    27
nkeynes@521
    28
#SHARED_OBJECTS	= crt0.so dcload-syscall.so dcload-syscalls.so memcpy.so lib.so
nkeynes@521
    29
SHARED_OBJECTS	=
nkeynes@521
    30
nkeynes@521
    31
%.ao: %.c
nkeynes@521
    32
	$(ARMCC) $(ARMCFLAGS) -o $@ -c $< 
nkeynes@521
    33
nkeynes@521
    34
%.ao: %.s
nkeynes@521
    35
	$(ARMCC) $(ARMCFLAGS) -o $@ -c $< 
nkeynes@521
    36
nkeynes@521
    37
%.so: %.c
nkeynes@521
    38
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    39
nkeynes@521
    40
%.so: %.ac
nkeynes@521
    41
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    42
nkeynes@521
    43
%.so: %.s
nkeynes@521
    44
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    45
nkeynes@521
    46
%.so: %.S
nkeynes@521
    47
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    48
nkeynes@521
    49
%.o: %.c
nkeynes@521
    50
	$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
nkeynes@521
    51
nkeynes@521
    52
%.arm: %.ao arm_crt0.ao
nkeynes@521
    53
	$(ARMCC) -Wl,-Ttext,0x00000000 -nostartfiles -nostdlib -e reset -o $@ arm_crt0.ao $< -lgcc
nkeynes@521
    54
nkeynes@521
    55
nkeynes@521
    56
%.bin: %.arm
nkeynes@521
    57
	$(ARMOBJCOPY) -O binary $< $@
nkeynes@521
    58
nkeynes@521
    59
%.aso: %.bin bin2c
nkeynes@521
    60
	./bin2c $< $<.c
nkeynes@521
    61
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $<.c
nkeynes@521
    62
nkeynes@680
    63
all:
nkeynes@521
    64
nkeynes@521
    65
check: build-tests
nkeynes@521
    66
	$(RUNTEST) testsh4
nkeynes@586
    67
	$(RUNTESTX) testsh4
nkeynes@550
    68
	$(RUNTEST) testmmu
nkeynes@521
    69
	$(RUNTEST) testregs
nkeynes@586
    70
	cat testta.data testta2.data testta3.data testta4.data testta5.data | $(RUNTEST) testta
nkeynes@550
    71
#	$(RUNTEST) testide -d ../disc/test.nrg
nkeynes@521
    72
nkeynes@521
    73
nkeynes@550
    74
build-tests: testsh4 testmath testide testta testregs testrend testdisp testspu testmmu
nkeynes@521
    75
nkeynes@521
    76
testsh4: crt0.so sh4/testsh4.so timer.so interrupt.so \
nkeynes@521
    77
	 sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \
nkeynes@521
    78
	 sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \
nkeynes@521
    79
	 sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \
nkeynes@521
    80
	 sh4/mac.s \
nkeynes@521
    81
	 sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \
nkeynes@533
    82
	 sh4/trapa.so sh4/tas.so sh4/xtrct.so \
nkeynes@586
    83
	 sh4/excslot.so sh4/undef.so sh4/tlb.so
nkeynes@521
    84
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
    85
	$(SH4OBJCOPY) testsh4 testsh4.bin
nkeynes@521
    86
nkeynes@521
    87
testide: crt0.so testide.so ide.so lib.so testdata.so
nkeynes@521
    88
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
    89
	$(SH4OBJCOPY) testide testide.bin
nkeynes@521
    90
nkeynes@550
    91
testmmu: crt0.so testmmu.so lib.so 
nkeynes@550
    92
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@550
    93
	$(SH4OBJCOPY) testmmu testmmu.bin
nkeynes@550
    94
nkeynes@521
    95
testmath: crt0.so $(SHARED_OBJECTS) testmath.so math.so
nkeynes@521
    96
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
    97
nkeynes@521
    98
testregs: crt0.so $(SHARED_OBJECTS) testregs.so ide.so
nkeynes@521
    99
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   100
	$(SH4OBJCOPY) testregs testregs.bin
nkeynes@521
   101
nkeynes@521
   102
testta: crt0.so $(SHARED_OBJECTS) testta.so pvr.so dmac.so asic.so lib.so testdata.so
nkeynes@521
   103
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   104
	$(SH4OBJCOPY) testta testta.bin
nkeynes@521
   105
nkeynes@521
   106
testrend: crt0.so $(SHARED_OBJECTS) testrend.so pvr.so dmac.so asic.so lib.so testdata.so
nkeynes@521
   107
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   108
	$(SH4OBJCOPY) testrend testrend.bin
nkeynes@521
   109
nkeynes@521
   110
testblend: crt0.so $(SHARED_OBJECTS) testblend.so pvr.so dmac.so asic.so lib.so testdata.so
nkeynes@521
   111
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   112
	$(SH4OBJCOPY) testblend testblend.bin
nkeynes@521
   113
nkeynes@521
   114
testdisp: crt0.so $(SHARED_OBJECTS) testdisp.so pvr.so asic.so lib.so testdata.so timer.so
nkeynes@521
   115
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   116
	$(SH4OBJCOPY) testdisp testdisp.bin
nkeynes@521
   117
nkeynes@521
   118
testyuv: crt0.so $(SHARED_OBJECTS) testyuv.so pvr.so asic.so lib.so testdata.so timer.so dmac.so
nkeynes@521
   119
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   120
	$(SH4OBJCOPY) testyuv testyuv.bin
nkeynes@521
   121
nkeynes@521
   122
testspu: crt0.so $(SHARED_OBJECTS) testspu.so asic.so lib.so testdata.so timer.so dmac.so
nkeynes@521
   123
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   124
	$(SH4OBJCOPY) testspu testspu.bin
nkeynes@521
   125
nkeynes@521
   126
testg2: crt0.so $(SHARED_OBJECTS) testg2.so asic.so lib.so testdata.so timer.so dmac.so
nkeynes@521
   127
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   128
	$(SH4OBJCOPY) testg2 testg2.bin
nkeynes@521
   129
nkeynes@521
   130
readdata: crt0.so readdata.so
nkeynes@521
   131
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
   132
nkeynes@521
   133
rend: crt0.so rendload.so asic.so lib.so timer.so pvr.so
nkeynes@521
   134
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
   135
	$(SH4OBJCOPY) rend rend.bin
nkeynes@521
   136
nkeynes@521
   137
testFF10: crt0.so testFF10.so lib.so
nkeynes@521
   138
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   139
	$(SH4OBJCOPY) testFF10 testFF10.bin
nkeynes@521
   140
nkeynes@521
   141
.PHONY : clean
nkeynes@521
   142
clean:
nkeynes@521
   143
	rm -f *.o *.so *.ao *.ac *.bin mapleid ide readmem dumpasic
nkeynes@521
   144
.