1998-02-25 01:08:47 +00:00
|
|
|
# Makefile for regression testing the sky simulator.
|
|
|
|
|
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
srcroot = $(srcdir)/..
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
1998-04-07 21:10:30 +00:00
|
|
|
bindir = $(exec_prefix)/bin
|
1998-02-25 01:08:47 +00:00
|
|
|
|
|
|
|
host_alias = @host_alias@
|
|
|
|
target_alias = @target_alias@
|
|
|
|
program_transform_name = @program_transform_name@
|
|
|
|
build_canonical = @build@
|
|
|
|
host_canonical = @host@
|
|
|
|
target_canonical = @target@
|
|
|
|
target_cpu = @target_cpu@
|
|
|
|
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
SUBDIRS = @subdirs@
|
|
|
|
RPATH_ENVVAR = @RPATH_ENVVAR@
|
|
|
|
|
|
|
|
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
|
|
|
|
echo $${rootme}/../../expect/expect ; \
|
|
|
|
else echo expect ; fi`
|
|
|
|
|
|
|
|
RUNTEST = $(RUNTEST_FOR_TARGET)
|
|
|
|
|
|
|
|
RUNTESTFLAGS =
|
|
|
|
|
|
|
|
RUNTEST_FOR_TARGET = `\
|
|
|
|
if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
|
|
|
|
echo $${srcdir}/../../../dejagnu/runtest; \
|
|
|
|
else \
|
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
|
|
|
|
echo runtest; \
|
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
|
|
|
|
fi; \
|
|
|
|
fi`
|
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
DVPAS_FOR_TARGET := `\
|
1998-04-07 22:45:56 +00:00
|
|
|
if [ -x ${bindir}/dvp-elf-as ]; then \
|
|
|
|
echo ${bindir}/dvp-elf-as ; \
|
|
|
|
else \
|
|
|
|
echo $(target_alias)-as ; \
|
|
|
|
fi`
|
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
DVPOBJCP_FOR_TARGET := `\
|
1998-04-08 18:03:03 +00:00
|
|
|
if [ -x ${bindir}/dvp-elf-objcopy ]; then \
|
|
|
|
echo ${bindir}/dvp-elf-objcopy ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
else \
|
1998-04-08 18:03:03 +00:00
|
|
|
echo $(target_alias)-objcopy ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
fi`
|
1998-04-07 22:45:56 +00:00
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
AS_FOR_TARGET := `\
|
1998-04-07 22:45:56 +00:00
|
|
|
if [ -x ../../../gas/as-new ]; then \
|
|
|
|
echo ../../../gas/as-new ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
else \
|
1998-04-07 22:45:56 +00:00
|
|
|
echo $(target_alias)-as ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
fi`
|
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
LD_FOR_TARGET := `\
|
1998-04-08 18:03:03 +00:00
|
|
|
if [ -x ../../../ld/ld-new ]; then \
|
|
|
|
echo ../../../ld/ld-new ; \
|
1998-04-07 16:23:41 +00:00
|
|
|
else \
|
1998-04-08 18:03:03 +00:00
|
|
|
echo $(target_alias)-ld ; \
|
1998-04-07 16:23:41 +00:00
|
|
|
fi`
|
|
|
|
|
|
|
|
|
1998-03-06 22:46:40 +00:00
|
|
|
RUNOPTS =
|
1998-02-25 01:08:47 +00:00
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
RUN_FOR_TARGET := `\
|
1998-02-25 01:08:47 +00:00
|
|
|
if [ -x ../../../sim/mips/run ]; then \
|
|
|
|
echo ../../../sim/mips/run ; \
|
|
|
|
else \
|
|
|
|
echo $(target_alias)-run ; \
|
|
|
|
fi` $(RUNOPTS)
|
|
|
|
|
1998-04-22 19:33:56 +00:00
|
|
|
# ??? This definition a hack.
|
|
|
|
# This should be named CC_FOR_TARGET but the top level Makefile doesn't
|
|
|
|
# specify -B.../libgloss/mips/. But then again we should be using
|
|
|
|
# dejagnu anyway [which handles this, among other things].
|
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
GCC_FOR_TARGET := `\
|
1998-04-22 19:33:56 +00:00
|
|
|
b=../../.. ; s=$(srcdir)/../../.. ; \
|
|
|
|
if [ -x $$b/gcc/xgcc ]; then \
|
|
|
|
echo "$$b/gcc/xgcc -B$$b/gcc/ -B$$b/$(target_alias)/libgloss/mips/ -B$$b/$(target_alias)/newlib/ -idirafter $$b/$(target_alias)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc" ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
else \
|
|
|
|
echo $(target_alias)-gcc ; \
|
|
|
|
fi`
|
|
|
|
|
1998-03-17 20:47:03 +00:00
|
|
|
C_GEN = perl $(srcdir)/c_gen.pl
|
1998-02-25 01:08:47 +00:00
|
|
|
|
1998-04-17 21:21:12 +00:00
|
|
|
# cpu time limit (in seconds)
|
1998-04-21 21:53:05 +00:00
|
|
|
ULIMIT = 60
|
1998-04-17 21:21:12 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
.SUFFIXES: .trc .c .run .ok \
|
1998-04-13 20:55:26 +00:00
|
|
|
.vif0out .vif0ok .vif0expect \
|
1998-04-07 16:23:41 +00:00
|
|
|
.vif1out .vif1ok .vif1expect \
|
1998-04-13 20:55:26 +00:00
|
|
|
.vuout .vuok .vuexpect \
|
1998-04-07 16:23:41 +00:00
|
|
|
.uu \
|
|
|
|
.dvpasm .vuasm
|
1998-02-25 01:08:47 +00:00
|
|
|
|
|
|
|
TESTS = \
|
1998-03-20 22:51:39 +00:00
|
|
|
t-dma.ok \
|
1998-04-07 16:23:41 +00:00
|
|
|
t-pke2.vif1ok t-pke3.ok t-pke4.vif0ok \
|
|
|
|
tss08_0.ok tss08_1.ok \
|
|
|
|
tss16_0.ok tss16_1.ok \
|
|
|
|
tss32_0.ok tss32_1.ok \
|
|
|
|
tsv208_0.ok tsv208_1.ok \
|
|
|
|
tsv216_0.ok tsv216_1.ok \
|
|
|
|
tsv232_0.ok tsv232_1.ok \
|
|
|
|
tsv308_0.ok tsv308_1.ok \
|
|
|
|
tsv316_0.ok tsv316_1.ok \
|
|
|
|
tsv332_0.ok tsv332_1.ok \
|
|
|
|
tsv408_0.ok tsv408_1.ok \
|
|
|
|
tsv416_0.ok tsv416_1.ok \
|
1998-04-07 22:45:56 +00:00
|
|
|
tsv432_0.ok tsv432_1.ok \
|
1998-04-17 19:04:41 +00:00
|
|
|
t-cop2.vuok t-cop2b.ok
|
1998-04-07 16:23:41 +00:00
|
|
|
|
|
|
|
#SCE_TESTS := $(patsubst %.dvpasm, %.ok, $(wildcard sce*.dvpasm))
|
|
|
|
SCE_TESTS = \
|
|
|
|
sce_test1.ok sce_test2.ok sce_test3.ok sce_test4.ok \
|
|
|
|
sce_test5.ok sce_test6.ok sce_test7.ok sce_test8.ok \
|
|
|
|
sce_test9.ok sce_test10.ok sce2_test11.ok sce2_test12.ok \
|
|
|
|
sce_test13.ok sce_test14.ok sce_test15.ok sce_test16.ok \
|
|
|
|
sce_test17.ok sce_test18.ok sce_test19.ok sce_test20.ok \
|
|
|
|
sce_test21.ok sce_test22.ok sce2_test23.ok sce_test24.ok \
|
|
|
|
sce_test25.ok sce_test26.ok sce_test27.ok sce_test28.ok \
|
|
|
|
sce_test29.ok sce_test30.ok sce_test31.ok sce_test32.ok \
|
|
|
|
sce_test33.ok sce_test34.ok sce_test35.ok sce_test36.ok \
|
|
|
|
sce_test37.ok sce_test38.ok sce_test39.ok sce_test40.ok \
|
|
|
|
sce_test41.ok sce_test42.ok sce_test43.ok sce_test44.ok \
|
|
|
|
sce_test45.ok sce_test46.ok sce_test47.ok sce_test48.ok \
|
|
|
|
sce_test49.ok sce_test50.ok sce_test51.ok sce_test52.ok \
|
|
|
|
sce_test53.ok sce_test54.ok sce_test55.ok sce_test56.ok \
|
|
|
|
sce_test57.ok sce_test58.ok sce_test59.ok
|
1998-04-07 22:45:56 +00:00
|
|
|
|
1998-04-21 21:53:05 +00:00
|
|
|
check: sanity $(TESTS) $(SCE_TESTS)
|
1998-04-08 18:03:03 +00:00
|
|
|
check_sce: sanity $(SCE_TESTS)
|
1998-03-28 00:36:59 +00:00
|
|
|
|
1998-02-25 01:08:47 +00:00
|
|
|
sanity:
|
|
|
|
@eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
|
|
|
|
@eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
|
|
|
|
@eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
|
|
|
|
@eval echo GCC_FOR_TARGET = $(GCC_FOR_TARGET)
|
1998-04-08 18:03:03 +00:00
|
|
|
@eval echo DVPAS_FOR_TARGET = $(DVPAS_FOR_TARGET)
|
|
|
|
@eval echo DVPOBJCP_FOR_TARGET = $(DVPOBJCP_FOR_TARGET)
|
1998-04-17 19:04:41 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
#------------------------------------
|
|
|
|
# Rules for building and running the SCE tests :
|
|
|
|
#------------------------------------
|
1998-02-25 01:08:47 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
LDFLAGS=-T$(srcdir)/sky.ld
|
1998-04-17 19:04:41 +00:00
|
|
|
CFLAGS += -g -I$(srcdir)
|
1998-04-08 18:03:03 +00:00
|
|
|
ASFLAGS = -I$(srcdir)
|
1998-04-07 16:23:41 +00:00
|
|
|
|
|
|
|
sce%.exe: sce%.o sce_main.o refresh.o
|
|
|
|
$(GCC_FOR_TARGET) $(CFLAGS) $(LDFLAGS) sce_main.o refresh.o -o $@ $<
|
|
|
|
|
|
|
|
sce_main.o: sce_main.c
|
|
|
|
$(GCC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
|
1998-04-07 22:45:56 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
refresh.o: refresh.s
|
1998-04-07 22:45:56 +00:00
|
|
|
$(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
|
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
sce_%.o: sce_%.dvpasm sce_%.vuasm
|
1998-04-07 22:45:56 +00:00
|
|
|
$(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
|
1998-04-07 16:23:41 +00:00
|
|
|
|
|
|
|
sce2_%.o: sce2_%.dvpasm sce2_%.vubin
|
1998-04-07 22:45:56 +00:00
|
|
|
$(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
|
1998-04-07 16:23:41 +00:00
|
|
|
|
|
|
|
sce2_%.vubin: sce2_%.vu.o
|
1998-04-08 18:03:03 +00:00
|
|
|
$(DVPOBJCP_FOR_TARGET) -O binary $< $@
|
1998-04-07 22:45:56 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
sce2_%.vu.o: sce2_%.vuasm
|
1998-04-07 22:45:56 +00:00
|
|
|
$(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
|
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
sce%.ok: sce%.exe
|
1998-04-21 21:53:05 +00:00
|
|
|
rm -f sce$*.ok sce$*_our_gif.dat
|
|
|
|
GIF_TRACE=sce$*_our_gif.dat ; export GIF_TRACE; \
|
|
|
|
ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $< ; \
|
1998-04-07 16:23:41 +00:00
|
|
|
if [ $$? -ne 0 ]; then \
|
1998-04-21 22:16:12 +00:00
|
|
|
diff -bitw $(srcdir)/sce$*_out_gif.dat sce$*_our_gif.dat > sce$*.ok; \
|
1998-04-08 18:03:03 +00:00
|
|
|
touch sce$*.ok; \
|
|
|
|
else \
|
|
|
|
echo Running sce$*.exe returns $$? > sce$*.ok ;\
|
|
|
|
fi
|
|
|
|
|
1998-04-07 22:45:56 +00:00
|
|
|
#------------------------
|
|
|
|
# Rules for running tests
|
|
|
|
#------------------------
|
1998-02-25 01:08:47 +00:00
|
|
|
|
|
|
|
.run.ok:
|
|
|
|
rm -f tmp-$* $*.hi
|
1998-04-17 21:21:12 +00:00
|
|
|
ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $< > tmp-$*
|
1998-02-25 01:08:47 +00:00
|
|
|
mv tmp-$* $*.ok
|
|
|
|
.run.ko:
|
|
|
|
rm -f tmp-$* $*.ko
|
|
|
|
set +e ; \
|
1998-04-17 21:21:12 +00:00
|
|
|
ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
|
1998-02-25 01:08:47 +00:00
|
|
|
if [ $$? -ne 0 ] ; then \
|
|
|
|
exit 0 ; \
|
|
|
|
else \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
|
|
|
mv tmp-$* $*.ko
|
|
|
|
.vif0out.vif0ok:
|
1998-02-27 21:58:44 +00:00
|
|
|
diff $(srcdir)/$*.vif0expect $<
|
1998-02-25 01:08:47 +00:00
|
|
|
touch $@
|
|
|
|
.vif1out.vif1ok:
|
1998-02-27 21:58:44 +00:00
|
|
|
diff $(srcdir)/$*.vif1expect $<
|
1998-02-25 01:08:47 +00:00
|
|
|
touch $@
|
1998-04-13 20:55:26 +00:00
|
|
|
.vuout.vuok:
|
|
|
|
diff $(srcdir)/$*.vuexpect $<
|
|
|
|
|
1998-02-25 01:08:47 +00:00
|
|
|
|
1998-04-07 16:23:41 +00:00
|
|
|
#------------------------------------
|
|
|
|
# Rules for building the TESTS
|
|
|
|
#------------------------------------
|
1998-04-07 22:45:56 +00:00
|
|
|
|
1998-02-25 01:08:47 +00:00
|
|
|
.trc.c:
|
|
|
|
$(C_GEN) $< $@
|
|
|
|
.c.run:
|
1998-04-17 19:04:41 +00:00
|
|
|
$(GCC_FOR_TARGET) $(CFLAGS) $(LDFLAGS) -o $@ $<
|
1998-02-27 21:58:44 +00:00
|
|
|
.uu.run:
|
|
|
|
uudecode $< > $@
|
1998-02-25 01:08:47 +00:00
|
|
|
.run.vif0out:
|
|
|
|
rm -f $@
|
1998-02-27 21:58:44 +00:00
|
|
|
-env VIF0_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
|
1998-02-25 01:08:47 +00:00
|
|
|
.run.vif1out:
|
|
|
|
rm -f $@
|
1998-02-27 21:58:44 +00:00
|
|
|
-env VIF1_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
|
1998-04-13 20:55:26 +00:00
|
|
|
.run.vuout:
|
|
|
|
rm -f $@
|
|
|
|
-env SKY_DEBUG=inst_trace $(RUN_FOR_TARGET) $< > $@
|
1998-04-07 22:45:56 +00:00
|
|
|
.s.run:
|
1998-04-08 22:10:38 +00:00
|
|
|
rm -f $@
|
1998-04-07 22:45:56 +00:00
|
|
|
$(AS_FOR_TARGET) -mcpu=r5900 -o $@ $<
|
1998-04-17 19:04:41 +00:00
|
|
|
.c.s:
|
|
|
|
$(GCC_FOR_TARGET) -S -o $@ $<
|
1998-02-25 01:08:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Standard
|
|
|
|
#
|
|
|
|
clean mostlyclean:
|
|
|
|
-rm -f *~ core *.o a.out *.x *.grt
|
|
|
|
-rm -f *.vif*out *.ok tmp-*
|
1998-04-07 16:23:41 +00:00
|
|
|
rm -f $(TESTS)
|
1998-04-08 18:03:03 +00:00
|
|
|
rm -f $(SCE_TESTS) sce*our_gif.dat sce*.exe *.vubin a.raw
|
1998-02-25 01:08:47 +00:00
|
|
|
# if [ x"${SUBDIRS}" != x ] ; then \
|
|
|
|
# for dir in ${SUBDIRS}; \
|
|
|
|
# do \
|
|
|
|
# echo "$$dir:"; \
|
|
|
|
# if [ -d $$dir ]; then \
|
|
|
|
# (cd $$dir; $(MAKE) clean); \
|
|
|
|
# fi; \
|
|
|
|
# done ; \
|
|
|
|
# else true; fi
|
|
|
|
|
|
|
|
distclean maintainer-clean realclean: clean
|
|
|
|
-rm -f *~ core
|
|
|
|
-rm -f Makefile config.status *-init.exp
|
|
|
|
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
|
1998-04-07 16:23:41 +00:00
|
|
|
-rm -f a.raw
|
1998-02-25 01:08:47 +00:00
|
|
|
# if [ x"${SUBDIRS}" != x ] ; then \
|
|
|
|
# for dir in ${SUBDIRS}; \
|
|
|
|
# do \
|
|
|
|
# echo "$$dir:"; \
|
|
|
|
# if [ -d $$dir ]; then \
|
|
|
|
# (cd $$dir; $(MAKE) distclean); \
|
|
|
|
# fi; \
|
|
|
|
# done ; \
|
|
|
|
# else true; fi
|
|
|
|
|
|
|
|
Makefile : Makefile.in config.status
|
|
|
|
$(SHELL) config.status
|
|
|
|
|
|
|
|
config.status: configure
|
|
|
|
$(SHELL) config.status --recheck
|