3 monodir=$(top_builddir)
5 $(monodir)/mono/metadata/libmonoruntime.la \
6 $(monodir)/mono/metadata/libmetadata.la \
7 $(monodir)/mono/io-layer/libwapi.la \
8 $(monodir)/mono/utils/libmonoutils.la \
23 # The mingw math.h has "extern inline" functions that dont appear in libs, so
24 # optimisation is required to actually inline them
28 # hack for automake to have the same source file in a library and a bin
29 genmdesc_CFLAGS = $(AM_CFLAGS)
34 monoldflags=-Wl,-version-script=$(srcdir)/ldscript
36 libmono_la_LDFLAGS=$(monoldflags)
41 noinst_PROGRAMS = genmdesc
43 lib_LTLIBRARIES = libmono.la
50 # Link libmono into mono statically on platforms where it is possible
51 # This leads to higher performance, especially with TLS
52 MONO_LIB=.libs/libmono.a
64 $(static_flags) -export-dynamic $(monoldflags)
150 regtests=basic.exe arrays.exe basic-float.exe basic-math.exe basic-long.exe objects.exe basic-calls.exe iltests.exe exceptions.exe bench.exe
152 common_BURGSRC= $(srcdir)/inssel.brg $(srcdir)/inssel-float.brg
155 libmono_la_SOURCES = \
156 $(common_sources) $(x86_sources)
158 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-x86.brg
159 arch_built=cpu-pentium.h
163 libmono_la_SOURCES = \
164 $(common_sources) $(amd64_sources)
165 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-amd64.brg
166 arch_built=cpu-amd64.h
170 libmono_la_SOURCES = \
171 $(common_sources) $(ppc_sources)
173 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-ppc.brg
178 libmono_la_SOURCES = \
179 $(common_sources) $(sparc_sources)
181 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-sparc.brg
182 arch_built=cpu-sparc.h
186 libmono_la_SOURCES = \
187 $(common_sources) $(sparc_sources)
189 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-sparc.brg
190 arch_built=cpu-sparc.h
194 libmono_la_SOURCES = \
195 $(common_sources) $(s390_sources)
197 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-s390.brg
198 arch_built=cpu-s390.h
202 libmono_la_SOURCES = \
203 $(common_sources) $(s390x_sources)
205 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-s390x.brg
206 arch_built=cpu-s390x.h
209 nodist_libmono_la_SOURCES = inssel.c inssel.h
211 BURGSRC= $(common_BURGSRC) $(arch_BURGSRC)
213 libmonoincludedir = $(includedir)/mono/jit
215 libmonoinclude_HEADERS = jit.h
217 libmono_la_LIBADD = \
220 %.exe: %.cs TestDriver.dll
221 $(MCS) /unsafe $< /r:TestDriver.dll
224 ilasm /output=$*.exe $<
226 TestDriver.dll: TestDriver.cs
227 $(MCS) /out:TestDriver.dll /target:library TestDriver.cs
229 cpu-pentium.h: cpu-pentium.md genmdesc$(EXEEXT)
230 ./genmdesc $(srcdir)/cpu-pentium.md cpu-pentium.h pentium_desc
232 cpu-amd64.h: cpu-amd64.md genmdesc$(EXEEXT)
233 ./genmdesc $(srcdir)/cpu-amd64.md cpu-amd64.h amd64_desc
235 cpu-g4.h: cpu-g4.md genmdesc$(EXEEXT)
236 ./genmdesc $(srcdir)/cpu-g4.md cpu-g4.h ppcg4
238 cpu-sparc.h: cpu-sparc.md genmdesc$(EXEEXT)
239 ./genmdesc $(srcdir)/cpu-sparc.md cpu-sparc.h sparc_desc
241 cpu-s390.h: cpu-s390.md genmdesc$(EXEEXT)
242 ./genmdesc $(srcdir)/cpu-s390.md cpu-s390.h s390
244 cpu-s390x.h: cpu-s390x.md genmdesc$(EXEEXT)
245 ./genmdesc $(srcdir)/cpu-s390x.md cpu-s390x.h s390x
247 inssel.c inssel.h: $(BURGSRC)
248 $(monodir)/mono/monoburg/monoburg -c 1 -p -e $(BURGSRC) -d inssel.h -s inssel.c
251 ./mono -v -v --ncompile 1 --compile Test:$(mtest) test.exe
253 # ensure the tests are actually correct
254 checktests: $(regtests)
255 for i in $(regtests); do $(RUNTIME) $$i; done
257 rcheck: mono $(regtests)
258 ./mono --regression $(regtests)
260 aotcheck: mono $(regtests)
261 for i in $(regtests); do ./mono --aot $$i; done
262 ./mono --verbose --regression $(regtests)
266 time ./mono --ncompile $(count) --compile Test:$(mtest) test.exe
269 time $(monodir)/mono/jit/mono --ncompile $(count) --compile Test:$(mtest) test.exe
271 stat1: mono bench.exe
272 ./mono --verbose --statfile stats.pl --regression bench.exe
273 perl viewstat.pl stats.pl
275 stat2: mono basic.exe
276 ./mono --verbose --statfile stats.pl --regression basic.exe
277 perl viewstat.pl -e stats.pl
279 stat3: mono bench.exe
280 ./mono --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe
281 perl viewstat.pl stats.pl
287 rm -f mono a.out gmon.out *.o test.exe
289 pkgconfigdir = $(libdir)/pkgconfig
292 BUILT_SOURCES= inssel.c inssel.h $(arch_built)
295 CLEANFILES= $(BUILT_SOURCES)
296 EXTRA_DIST = $(common_BURGSRC) jit-icalls.c cprop.c TestDriver.cs ldscript $(test_sources) \
297 inssel-long.brg inssel-long32.brg \
298 $(x86_sources) inssel-x86.brg cpu-pentium.md \
299 $(amd64_sources) inssel-amd64.brg cpu-amd64.md \
300 $(ppc_sources) inssel-ppc.brg cpu-g4.md \
301 $(sparc_sources) inssel-sparc.brg cpu-sparc.md \
302 $(s390_sources) inssel-s390.brg cpu-s390.md \
303 $(s390x_sources) inssel-s390x.brg cpu-s390x.md