summaryrefslogtreecommitdiff
path: root/testsuite/tests/asmcomp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/asmcomp/Makefile')
-rw-r--r--testsuite/tests/asmcomp/Makefile103
1 files changed, 16 insertions, 87 deletions
diff --git a/testsuite/tests/asmcomp/Makefile b/testsuite/tests/asmcomp/Makefile
index d83b79d2d2..aa37bf9e4b 100644
--- a/testsuite/tests/asmcomp/Makefile
+++ b/testsuite/tests/asmcomp/Makefile
@@ -22,91 +22,8 @@ INCLUDES=\
-I $(OTOPDIR)/asmcomp
OTHEROBJS=\
- $(OTOPDIR)/utils/misc.cmo \
- $(OTOPDIR)/utils/tbl.cmo \
- $(OTOPDIR)/utils/config.cmo \
- $(OTOPDIR)/utils/clflags.cmo \
- $(OTOPDIR)/utils/terminfo.cmo \
- $(OTOPDIR)/utils/ccomp.cmo \
- $(OTOPDIR)/utils/warnings.cmo \
- $(OTOPDIR)/utils/consistbl.cmo \
- $(OTOPDIR)/parsing/location.cmo \
- $(OTOPDIR)/parsing/longident.cmo \
- $(OTOPDIR)/parsing/syntaxerr.cmo \
- $(OTOPDIR)/parsing/ast_helper.cmo \
- $(OTOPDIR)/parsing/ast_mapper.cmo \
- $(OTOPDIR)/parsing/parser.cmo \
- $(OTOPDIR)/parsing/lexer.cmo \
- $(OTOPDIR)/parsing/parse.cmo \
- $(OTOPDIR)/parsing/printast.cmo \
- $(OTOPDIR)/typing/ident.cmo \
- $(OTOPDIR)/typing/path.cmo \
- $(OTOPDIR)/typing/primitive.cmo \
- $(OTOPDIR)/typing/types.cmo \
- $(OTOPDIR)/typing/btype.cmo \
- $(OTOPDIR)/typing/oprint.cmo \
- $(OTOPDIR)/typing/subst.cmo \
- $(OTOPDIR)/typing/predef.cmo \
- $(OTOPDIR)/typing/datarepr.cmo \
- $(OTOPDIR)/typing/cmi_format.cmo \
- $(OTOPDIR)/typing/env.cmo \
- $(OTOPDIR)/typing/typedtree.cmo \
- $(OTOPDIR)/typing/ctype.cmo \
- $(OTOPDIR)/typing/printtyp.cmo \
- $(OTOPDIR)/typing/includeclass.cmo \
- $(OTOPDIR)/typing/mtype.cmo \
- $(OTOPDIR)/typing/includecore.cmo \
- $(OTOPDIR)/typing/includemod.cmo \
- $(OTOPDIR)/typing/parmatch.cmo \
- $(OTOPDIR)/typing/typetexp.cmo \
- $(OTOPDIR)/typing/typedtreeMap.cmo \
- $(OTOPDIR)/typing/cmt_format.cmo \
- $(OTOPDIR)/typing/stypes.cmo \
- $(OTOPDIR)/typing/typecore.cmo \
- $(OTOPDIR)/typing/typedecl.cmo \
- $(OTOPDIR)/typing/typeclass.cmo \
- $(OTOPDIR)/typing/typemod.cmo \
- $(OTOPDIR)/bytecomp/lambda.cmo \
- $(OTOPDIR)/bytecomp/printlambda.cmo \
- $(OTOPDIR)/bytecomp/typeopt.cmo \
- $(OTOPDIR)/bytecomp/switch.cmo \
- $(OTOPDIR)/bytecomp/matching.cmo \
- $(OTOPDIR)/bytecomp/translobj.cmo \
- $(OTOPDIR)/bytecomp/translcore.cmo \
- $(OTOPDIR)/bytecomp/translclass.cmo \
- $(OTOPDIR)/bytecomp/translmod.cmo \
- $(OTOPDIR)/bytecomp/simplif.cmo \
- $(OTOPDIR)/bytecomp/runtimedef.cmo \
- $(OTOPDIR)/asmcomp/arch.cmo \
- $(OTOPDIR)/asmcomp/debuginfo.cmo \
- $(OTOPDIR)/asmcomp/cmm.cmo \
- $(OTOPDIR)/asmcomp/printcmm.cmo \
- $(OTOPDIR)/asmcomp/reg.cmo \
- $(OTOPDIR)/asmcomp/mach.cmo \
- $(OTOPDIR)/asmcomp/proc.cmo \
- $(OTOPDIR)/asmcomp/clambda.cmo \
- $(OTOPDIR)/asmcomp/compilenv.cmo \
- $(OTOPDIR)/asmcomp/closure.cmo \
- $(OTOPDIR)/asmcomp/cmmgen.cmo \
- $(OTOPDIR)/asmcomp/printmach.cmo \
- $(OTOPDIR)/asmcomp/selectgen.cmo \
- $(OTOPDIR)/asmcomp/selection.cmo \
- $(OTOPDIR)/asmcomp/comballoc.cmo \
- $(OTOPDIR)/asmcomp/liveness.cmo \
- $(OTOPDIR)/asmcomp/spill.cmo \
- $(OTOPDIR)/asmcomp/split.cmo \
- $(OTOPDIR)/asmcomp/interf.cmo \
- $(OTOPDIR)/asmcomp/coloring.cmo \
- $(OTOPDIR)/asmcomp/reloadgen.cmo \
- $(OTOPDIR)/asmcomp/reload.cmo \
- $(OTOPDIR)/asmcomp/printlinear.cmo \
- $(OTOPDIR)/asmcomp/linearize.cmo \
- $(OTOPDIR)/asmcomp/schedgen.cmo \
- $(OTOPDIR)/asmcomp/scheduling.cmo \
- $(OTOPDIR)/asmcomp/emitaux.cmo \
- $(OTOPDIR)/asmcomp/emit.cmo \
- $(OTOPDIR)/asmcomp/printclambda.cmo \
- $(OTOPDIR)/asmcomp/asmgen.cmo
+ $(OTOPDIR)/compilerlibs/ocamlcommon.cma \
+ $(OTOPDIR)/compilerlibs/ocamloptcomp.cma
OBJS=parsecmmaux.cmo parsecmm.cmo lexcmm.cmo
@@ -117,7 +34,9 @@ default:
$(MAKE) all; \
fi
-all: arch codegen tests
+all:
+ $(MAKE) arch codegen
+ $(MAKE) tests
codegen: parsecmm.ml lexcmm.ml $(OBJS:.cmo=.cmi) $(OBJS) main.cmo
@$(OCAMLC) $(LINKFLAGS) -o codegen $(OTHEROBJS) $(OBJS) main.cmo
@@ -128,6 +47,8 @@ parsecmm.mli parsecmm.ml: parsecmm.mly
lexcmm.ml: lexcmm.mll
@$(OCAMLLEX) -q lexcmm.mll
+MLCASES=optargs staticalloc
+
CASES=fib tak quicksort quicksort2 soli \
arith checkbound tagged-fib tagged-integr tagged-quicksort tagged-tak
ARGS_fib=-DINT_INT -DFUN=fib main.c
@@ -148,13 +69,21 @@ tests: $(CASES:=.o)
printf " ... testing '$$c':"; \
$(MAKE) one CC="$(CC) $(CFLAGS)" NAME=$$c; \
done
+ @for c in $(MLCASES); do \
+ printf " ... testing '$$c':"; \
+ $(MAKE) one_ml NAME=$$c; \
+ done
+
+one_ml:
+ @$(OCAMLOPT) -o $(NAME).exe $(NAME).ml && \
+ ./$(NAME).exe && echo " => passed" || echo " => failed"
one:
@$(CC) -o $(NAME).out $(ARGS_$(NAME)) $(NAME).o $(ARCH).o \
&& echo " => passed" || echo " => failed"
clean: defaultclean
- @rm -f ./codegen *.out
+ @rm -f ./codegen *.out *.o *.obj *.exe
@rm -f parsecmm.ml parsecmm.mli lexcmm.ml
@rm -f $(CASES:=.s)