Search
lxdream.org :: lxdream/test/Makefile.in
lxdream 0.9.1
released Jun 29
Download Now
filename test/Makefile.in
changeset 822:6e0536758465
prev816:2c3cf97de0f5
next823:8a592668322f
author nkeynes
date Sat Aug 23 12:08:01 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Mask off SR correctly when writing to it - this turns out to be important
in some cases
file annotate diff log raw
nkeynes@731
     1
srcdir = @srcdir@
nkeynes@731
     2
top_srcdir = @top_srcdir@
nkeynes@731
     3
VPATH = @srcdir@
nkeynes@748
     4
mkdir_p = @mkdir_p@
nkeynes@731
     5
nkeynes@521
     6
# host compiler and flags
nkeynes@521
     7
HOSTCC		= @CC@
nkeynes@521
     8
HOSTCFLAGS	= @CFLAGS@
nkeynes@731
     9
nkeynes@521
    10
SH4CC		= @SHCC@
nkeynes@731
    11
SH4INC          = -I$(srcdir)/include
nkeynes@521
    12
SH4CFLAGS	= $(SH4INC) -D_arch_dreamcast -D_arch_sub_pristine \
nkeynes@521
    13
                  -O2 -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
nkeynes@521
    14
                  -fno-optimize-sibling-calls
nkeynes@521
    15
SH4LD		= @SHLD@
nkeynes@521
    16
SH4LDFLAGS      = -fno-builtin -fno-strict-aliasing  -ml -m4-single-only \
nkeynes@731
    17
                  -Wl,-T$(srcdir)/dc.x -nostartfiles -nostdlib -L$(srcdir)/lib
nkeynes@521
    18
SH4LIBS         = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
nkeynes@521
    19
SH4OBJCOPY      = @SHOBJCOPY@ -O binary
nkeynes@731
    20
nkeynes@816
    21
SHARED_OBJECTS = dmac.so asic.so lib.so timer.so testdata.so interrupt.so
nkeynes@816
    22
nkeynes@521
    23
ARMCC		= @ARMCC@
nkeynes@812
    24
ARMCFLAGS	= -O2 -fno-builtin -fno-strict-aliasing -mlittle-endian
nkeynes@521
    25
ARMLD		= @ARMLD@
nkeynes@812
    26
ARMLDFLAGS      = -Wl,-T$(srcdir)/aica.x -nostartfiles -mlittle-endian \
nkeynes@812
    27
                  -nostdlib -L$(srcdir)/lib-arm
nkeynes@812
    28
ARMLIBS         = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
nkeynes@812
    29
ARMOBJCOPY	= @ARMOBJCOPY@ -O binary
nkeynes@521
    30
nkeynes@731
    31
RUNTEST		= ../src/lxdream -c $(srcdir)/lxdream.rc -puH -A null
nkeynes@731
    32
RUNTESTX	= ../src/lxdream -c $(srcdir)/lxdream.rc -xpuH -A null
nkeynes@521
    33
nkeynes@521
    34
%.ao: %.c
nkeynes@521
    35
	$(ARMCC) $(ARMCFLAGS) -o $@ -c $< 
nkeynes@521
    36
nkeynes@521
    37
%.ao: %.s
nkeynes@521
    38
	$(ARMCC) $(ARMCFLAGS) -o $@ -c $< 
nkeynes@521
    39
nkeynes@521
    40
%.so: %.c
nkeynes@521
    41
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    42
nkeynes@521
    43
%.so: %.ac
nkeynes@521
    44
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    45
nkeynes@521
    46
%.so: %.s
nkeynes@746
    47
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< -Wa,-I$(srcdir)
nkeynes@521
    48
nkeynes@521
    49
%.so: %.S
nkeynes@521
    50
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $< 
nkeynes@521
    51
nkeynes@521
    52
%.o: %.c
nkeynes@521
    53
	$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
nkeynes@521
    54
nkeynes@521
    55
%.arm: %.ao arm_crt0.ao
nkeynes@521
    56
	$(ARMCC) -Wl,-Ttext,0x00000000 -nostartfiles -nostdlib -e reset -o $@ arm_crt0.ao $< -lgcc
nkeynes@521
    57
nkeynes@521
    58
nkeynes@521
    59
%.bin: %.arm
nkeynes@521
    60
	$(ARMOBJCOPY) -O binary $< $@
nkeynes@521
    61
nkeynes@521
    62
%.aso: %.bin bin2c
nkeynes@521
    63
	./bin2c $< $<.c
nkeynes@521
    64
	$(SH4CC) $(SH4CFLAGS) -o $@ -c $<.c
nkeynes@521
    65
nkeynes@680
    66
all:
nkeynes@521
    67
nkeynes@521
    68
check: build-tests
nkeynes@521
    69
	$(RUNTEST) testsh4
nkeynes@586
    70
	$(RUNTESTX) testsh4
nkeynes@550
    71
	$(RUNTEST) testmmu
nkeynes@521
    72
	$(RUNTEST) testregs
nkeynes@794
    73
	cat $(srcdir)/testta.data $(srcdir)/testta2.data $(srcdir)/testta3.data $(srcdir)/testta4.data $(srcdir)/testta5.data | $(RUNTEST) testta
nkeynes@794
    74
	cat $(srcdir)/testsort.data | $(RUNTEST) testta
nkeynes@550
    75
#	$(RUNTEST) testide -d ../disc/test.nrg
nkeynes@521
    76
nkeynes@521
    77
nkeynes@550
    78
build-tests: testsh4 testmath testide testta testregs testrend testdisp testspu testmmu
nkeynes@521
    79
nkeynes@812
    80
testsh4: lib/crt0.so sh4/testsh4.so timer.so interrupt.so \
nkeynes@521
    81
	 sh4/add.so sh4/addc.so sh4/addv.so sh4/and.so sh4/andi.so \
nkeynes@521
    82
	 sh4/bf.so sh4/bsr.so sh4/bt.so sh4/cmp.so sh4/cmpstr.so \
nkeynes@521
    83
	 sh4/div0.so sh4/div1.so sh4/float.so sh4/fmov.so sh4/ftrc.so \
nkeynes@822
    84
	 sh4/ldcsr.so sh4/mac.so \
nkeynes@521
    85
	 sh4/rot.so sh4/shl.so sh4/shld.so sh4/sub.so sh4/subc.so \
nkeynes@533
    86
	 sh4/trapa.so sh4/tas.so sh4/xtrct.so \
nkeynes@808
    87
	 sh4/excslot.so sh4/undef.so sh4/tlb.so sh4/vmexit.so
nkeynes@521
    88
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
    89
	$(SH4OBJCOPY) testsh4 testsh4.bin
nkeynes@521
    90
nkeynes@816
    91
testide: lib/crt0.so $(SHARED_OBJECTS) testide.so ide.so
nkeynes@521
    92
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
    93
	$(SH4OBJCOPY) testide testide.bin
nkeynes@521
    94
nkeynes@816
    95
testmmu: lib/crt0.so $(SHARED_OBJECTS) testmmu.so
nkeynes@550
    96
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@550
    97
	$(SH4OBJCOPY) testmmu testmmu.bin
nkeynes@550
    98
nkeynes@812
    99
testmath: lib/crt0.so $(SHARED_OBJECTS) testmath.so math.so
nkeynes@521
   100
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   101
nkeynes@812
   102
testregs: lib/crt0.so $(SHARED_OBJECTS) testregs.so ide.so
nkeynes@521
   103
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   104
	$(SH4OBJCOPY) testregs testregs.bin
nkeynes@521
   105
nkeynes@816
   106
testta: lib/crt0.so $(SHARED_OBJECTS) testta.so pvr.so
nkeynes@521
   107
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   108
	$(SH4OBJCOPY) testta testta.bin
nkeynes@521
   109
nkeynes@816
   110
testaica: lib/crt0.so $(SHARED_OBJECTS) testaica.so 
nkeynes@812
   111
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@812
   112
	$(SH4OBJCOPY) testaica testaica.bin
nkeynes@812
   113
nkeynes@816
   114
testrend: lib/crt0.so $(SHARED_OBJECTS) testrend.so pvr.so
nkeynes@521
   115
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   116
	$(SH4OBJCOPY) testrend testrend.bin
nkeynes@521
   117
nkeynes@816
   118
testblend: lib/crt0.so $(SHARED_OBJECTS) testblend.so pvr.so
nkeynes@521
   119
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   120
	$(SH4OBJCOPY) testblend testblend.bin
nkeynes@521
   121
nkeynes@816
   122
testdisp: lib/crt0.so $(SHARED_OBJECTS) testdisp.so pvr.so
nkeynes@521
   123
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   124
	$(SH4OBJCOPY) testdisp testdisp.bin
nkeynes@521
   125
nkeynes@816
   126
testyuv: lib/crt0.so $(SHARED_OBJECTS) testyuv.so pvr.so
nkeynes@521
   127
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   128
	$(SH4OBJCOPY) testyuv testyuv.bin
nkeynes@521
   129
nkeynes@816
   130
testspu: lib/crt0.so $(SHARED_OBJECTS) testspu.so
nkeynes@521
   131
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   132
	$(SH4OBJCOPY) testspu testspu.bin
nkeynes@521
   133
nkeynes@816
   134
testg2: lib/crt0.so $(SHARED_OBJECTS) testg2.so
nkeynes@521
   135
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   136
	$(SH4OBJCOPY) testg2 testg2.bin
nkeynes@521
   137
nkeynes@816
   138
readdata: lib/crt0.so $(SHARED_OBJECTS) readdata.so
nkeynes@521
   139
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
   140
nkeynes@816
   141
rend: lib/crt0.so $(SHARED_OBJECTS) rendload.so pvr.so
nkeynes@521
   142
	$(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
nkeynes@521
   143
	$(SH4OBJCOPY) rend rend.bin
nkeynes@521
   144
nkeynes@816
   145
testFF10: lib/crt0.so $(SHARED_OBJECTS) testFF10.so
nkeynes@521
   146
	$(SH4CC) $(SH4LDFLAGS) $^  -o $@ $(SH4LIBS)
nkeynes@521
   147
	$(SH4OBJCOPY) testFF10 testFF10.bin
nkeynes@521
   148
nkeynes@521
   149
.PHONY : clean
nkeynes@521
   150
clean:
nkeynes@749
   151
	rm -f *.o *.so *.ao *.ac *.bin sh4/*.so mapleid ide readmem dumpasic \
nkeynes@749
   152
	   testsh4 testta testdisp testregs testide testmath testmmu \
nkeynes@749
   153
	   testrend testspu dcflash.rom
nkeynes@521
   154
nkeynes@712
   155
distclean: clean
nkeynes@712
   156
	rm -f Makefile
nkeynes@748
   157
nkeynes@748
   158
install:
nkeynes@748
   159
nkeynes@748
   160
installcheck:
nkeynes@748
   161
nkeynes@748
   162
uninstall:
nkeynes@748
   163
nkeynes@812
   164
DISTFILES = asic.c asic.h bin2c.c dma.h dmac.c ide.c ide.h interrupt.s \
nkeynes@748
   165
        lib.c lib.h math.s pvr.c pvr.h rendload.c sh4/add.s sh4/addc.s \
nkeynes@748
   166
        sh4/addv.s sh4/and.s sh4/andi.s sh4/bf.s sh4/bsr.s sh4/bt.s sh4/cmp.s \
nkeynes@748
   167
        sh4/cmpstr.s sh4/div0.s sh4/div1.s sh4/excslot.s sh4/float.s sh4/fmov.s \
nkeynes@822
   168
        sh4/ftrc.s sh4/inc.s sh4/mac.s sh4/ldcsr.s sh4/rot.s sh4/shl.s sh4/shld.s sh4/sub.s \
nkeynes@808
   169
        sh4/subc.s sh4/tas.s sh4/testsh4.c sh4/tlb.s sh4/vmexit.s sh4/trapa.s sh4/undef.s \
nkeynes@748
   170
        sh4/xtrct.s testdata.c testdata.h testdisp.c testide.c testmath.c \
nkeynes@748
   171
        testmmu.c testregs.c testrend.c testspu.c testta.c testyuv.c timer.c timer.h \
nkeynes@794
   172
        testta.data testta2.data testta3.data testta4.data testta5.data testsort.data \
nkeynes@812
   173
        lxdream.rc dc.x lib/crt0.s lib/libc.a lib/libm.a lib/newlib-1.8.2-dc.patch \
nkeynes@812
   174
        aica.x lib-arm/libc.a lib-arm/libm.a lib-arm/crt0.s \
nkeynes@748
   175
	include/_ansi.h include/_syslist.h include/ar.h include/assert.h include/ctype.h \
nkeynes@748
   176
	include/dirent.h include/errno.h include/fastmath.h include/fcntl.h include/grp.h \
nkeynes@748
   177
	include/ieeefp.h include/locale.h include/machine/fastmath.h include/machine/ieeefp.h \
nkeynes@748
   178
	include/machine/setjmp-dj.h include/machine/setjmp.h include/machine/time.h \
nkeynes@748
   179
	include/machine/types.h include/malloc.h include/math.h include/paths.h \
nkeynes@748
   180
	include/process.h include/pwd.h include/reent.h include/regdef.h include/setjmp.h \
nkeynes@748
   181
	include/signal.h include/stdio.h include/stdlib.h include/string.h include/sys/_types.h \
nkeynes@748
   182
	include/sys/config.h include/sys/dirent.h include/sys/errno.h include/sys/fcntl.h \
nkeynes@748
   183
	include/sys/file.h include/sys/param.h include/sys/reent.h include/sys/resource.h \
nkeynes@748
   184
	include/sys/signal.h include/sys/stat-dj.h include/sys/stat.h include/sys/time.h \
nkeynes@748
   185
	include/sys/timeb.h include/sys/times.h include/sys/types.h include/sys/unistd.h \
nkeynes@748
   186
	include/sys/utime.h include/sys/wait.h include/termios.h include/time.h \
nkeynes@816
   187
	include/unctrl.h include/unistd.h include/utime.h include/utmp.h \
nkeynes@816
   188
	testsh4 testregs testmmu testta testaica 
nkeynes@748
   189
                        
nkeynes@748
   190
nkeynes@748
   191
nkeynes@816
   192
distdir: $(DISTFILES)
nkeynes@748
   193
	$(mkdir_p) $(distdir)/sh4 $(distdir)/lib $(distdir)/include
nkeynes@748
   194
	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
nkeynes@748
   195
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
nkeynes@748
   196
	list='$(DISTFILES)'; for file in $$list; do \
nkeynes@748
   197
	  case $$file in \
nkeynes@748
   198
	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
nkeynes@748
   199
	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
nkeynes@748
   200
	  esac; \
nkeynes@748
   201
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
nkeynes@748
   202
	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
nkeynes@748
   203
	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
nkeynes@748
   204
	    dir="/$$dir"; \
nkeynes@748
   205
	    $(mkdir_p) "$(distdir)$$dir"; \
nkeynes@748
   206
	  else \
nkeynes@748
   207
	    dir=''; \
nkeynes@748
   208
	  fi; \
nkeynes@748
   209
	  if test -d $$d/$$file; then \
nkeynes@748
   210
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
nkeynes@748
   211
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
nkeynes@748
   212
	    fi; \
nkeynes@748
   213
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
nkeynes@748
   214
	  else \
nkeynes@748
   215
	    test -f $(distdir)/$$file \
nkeynes@748
   216
	    || cp -p $$d/$$file $(distdir)/$$file \
nkeynes@748
   217
	    || exit 1; \
nkeynes@748
   218
	  fi; \
nkeynes@748
   219
	done
nkeynes@748
   220
nkeynes@748
   221
dvi:
.