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