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