Remove mk/ folder (#18039)
[mono-project.git] / mono / benchmark / Makefile.am
blobef6c05bbed7b039e94574c8ee9dbd82b27a8b748
1 MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
3 TEST_PROG=../mini/mono
4 RUNTIME_ARGS="-O=all"
6 TOOLS_RUNTIME = MONO_PATH=$(mcs_topdir)/class/lib/build $(top_builddir)/runtime/mono-wrapper --aot-path=$(mcs_topdir)/class/lib/build
7 MCS = $(TOOLS_RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library $(PROFILE_MCS_FLAGS)
8 ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe
10 TESTSRC=                        \
11         fib.cs                  \
12         life.cs                 \
13         castclass.cs            \
14         cmov1.cs                \
15         cmov2.cs                \
16         cmov3.cs                \
17         cmov4.cs                \
18         cmov5.cs                \
19         commute.cs              \
20         isinst.cs               \
21         sbperf1.cs              \
22         sbperf2.cs              \
23         iconst-byte.cs          \
24         inline1.cs              \
25         inline2.cs              \
26         inline3.cs              \
27         inline4.cs              \
28         inline5.cs              \
29         inline6.cs              \
30         inline-readonly.cs      \
31         max-min.cs              \
32         muldiv.cs               \
33         loops.cs                \
34         initlocals.cs           \
35         logic.cs                \
36         switch.cs               \
37         ctor-bench.cs           \
38         readonly.cs             \
39         readonly-byte-array.cs  \
40         readonly-inst.cs        \
41         readonly-vt.cs          \
42         regalloc.cs             \
43         regalloc-2.cs           \
44         bulkcpy.il              \
45         math.cs                 \
46         boxtest.cs              \
47         valuetype-hash-equals.cs \
48         vt2.cs
50 TESTSI_TMP=$(TESTSRC:.cs=.exe)
51 TESTSI=$(TESTSI_TMP:.il=.exe)
53 EXTRA_DIST=test-driver $(TESTSRC)
55 %.exe: %.il
56         $(ILASM) $< /OUTPUT=$@
58 %.exe: %.cs
59         $(MCS) $< -out:$@
61 test-local: $(TEST_PROG) $(TESTSI)
63 run-test: $(TEST_PROG) $(TESTSI)
64         @failed=0; \
65         passed=0; \
66         for i in $(TESTSI); do  \
67                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
68                 then \
69                         passed=`expr $${passed} + 1`; \
70                 else \
71                         failed=`expr $${failed} + 1`; \
72                 fi \
73         done; \
74         echo "$${passed} test(s) passed. $${failed} test(s) failed."
76 check:
77         @echo no check yet