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