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 \
15 $(monodir)/mono/metadata/libmonoruntime-static.la \
16 $(monodir)/mono/metadata/libmetadata-static.la \
17 $(monodir)/mono/io-layer/libwapi.la \
18 $(monodir)/mono/utils/libmonoutils.la \
21 $(LIBGC_STATIC_LIBS) \
35 # The mingw math.h has "extern inline" functions that dont appear in libs, so
36 # optimisation is required to actually inline them
40 # hack for automake to have the same source file in a library and a bin
41 genmdesc_CFLAGS = $(AM_CFLAGS)
46 monoldflags=-Wl,-version-script=$(srcdir)/ldscript
50 libmono_la_LDFLAGS=-no-undefined -version-info 1:0:0 $(monoldflags)
52 libmono_la_LDFLAGS=$(monoldflags)
58 noinst_PROGRAMS = genmdesc
60 lib_LTLIBRARIES = libmono.la
61 noinst_LTLIBRARIES = libmono-static.la
68 # Link libmono into mono statically on platforms where it is possible
69 # This leads to higher performance, especially with TLS
70 MONO_LIB=libmono-static.la
73 MONO_LIB=libmono-static.la
86 $(static_flags) -export-dynamic $(monoldflags)
172 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
174 common_BURGSRC= $(srcdir)/inssel.brg $(srcdir)/inssel-float.brg
177 libmono_la_SOURCES = \
178 $(common_sources) $(x86_sources)
180 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-x86.brg
181 arch_built=cpu-pentium.h
185 libmono_la_SOURCES = \
186 $(common_sources) $(amd64_sources)
187 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-amd64.brg
188 arch_built=cpu-amd64.h
192 libmono_la_SOURCES = \
193 $(common_sources) $(ppc_sources)
195 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-ppc.brg
200 libmono_la_SOURCES = \
201 $(common_sources) $(sparc_sources)
203 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-sparc.brg
204 arch_built=cpu-sparc.h
208 libmono_la_SOURCES = \
209 $(common_sources) $(sparc_sources)
211 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-sparc.brg
212 arch_built=cpu-sparc.h
216 libmono_la_SOURCES = \
217 $(common_sources) $(s390_sources)
219 arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-s390.brg
220 arch_built=cpu-s390.h
224 libmono_la_SOURCES = \
225 $(common_sources) $(s390x_sources)
227 arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-s390x.brg
228 arch_built=cpu-s390x.h
231 nodist_libmono_la_SOURCES = inssel.c inssel.h
233 libmono_static_la_SOURCES = $(libmono_la_SOURCES)
234 nodist_libmono_static_la_SOURCES = $(nodist_libmono_la_SOURCES)
235 libmono_static_la_LDFLAGS = -static
236 libmono_static_la_LIBADD = $(static_libs)
238 BURGSRC= $(common_BURGSRC) $(arch_BURGSRC)
240 libmonoincludedir = $(includedir)/mono/jit
242 libmonoinclude_HEADERS = jit.h
244 libmono_la_LIBADD = \
247 %.exe: %.cs TestDriver.dll
248 $(MCS) /out:$*.exe /unsafe $< /r:TestDriver.dll
251 ilasm /output=$*.exe $<
253 TestDriver.dll: $(srcdir)/TestDriver.cs
254 $(MCS) /out:TestDriver.dll /target:library $(srcdir)/TestDriver.cs
256 cpu-pentium.h: cpu-pentium.md genmdesc$(EXEEXT)
257 ./genmdesc $(srcdir)/cpu-pentium.md cpu-pentium.h pentium_desc
259 cpu-amd64.h: cpu-amd64.md genmdesc$(EXEEXT)
260 ./genmdesc $(srcdir)/cpu-amd64.md cpu-amd64.h amd64_desc
262 cpu-g4.h: cpu-g4.md genmdesc$(EXEEXT)
263 ./genmdesc $(srcdir)/cpu-g4.md cpu-g4.h ppcg4
265 cpu-sparc.h: cpu-sparc.md genmdesc$(EXEEXT)
266 ./genmdesc $(srcdir)/cpu-sparc.md cpu-sparc.h sparc_desc
268 cpu-s390.h: cpu-s390.md genmdesc$(EXEEXT)
269 ./genmdesc $(srcdir)/cpu-s390.md cpu-s390.h s390
271 cpu-s390x.h: cpu-s390x.md genmdesc$(EXEEXT)
272 ./genmdesc $(srcdir)/cpu-s390x.md cpu-s390x.h s390x
274 inssel.c inssel.h: $(BURGSRC)
275 $(monodir)/mono/monoburg/monoburg -c 1 -p -e $(BURGSRC) -d inssel.h -s inssel.c
278 ./mono -v -v --ncompile 1 --compile Test:$(mtest) test.exe
280 # ensure the tests are actually correct
281 checktests: $(regtests)
282 for i in $(regtests); do $(RUNTIME) $$i; done
284 rcheck: mono $(regtests)
285 ./mono --regression $(regtests)
287 aotcheck: mono $(regtests)
288 for i in $(regtests); do ./mono --aot $$i; done
289 ./mono --verbose --regression $(regtests)
293 time ./mono --ncompile $(count) --compile Test:$(mtest) test.exe
296 time $(monodir)/mono/jit/mono --ncompile $(count) --compile Test:$(mtest) test.exe
298 stat1: mono bench.exe
299 ./mono --verbose --statfile stats.pl --regression bench.exe
300 perl viewstat.pl stats.pl
302 stat2: mono basic.exe
303 ./mono --verbose --statfile stats.pl --regression basic.exe
304 perl viewstat.pl -e stats.pl
306 stat3: mono bench.exe
307 ./mono --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe
308 perl viewstat.pl stats.pl
314 rm -f mono a.out gmon.out *.o test.exe
316 pkgconfigdir = $(libdir)/pkgconfig
319 BUILT_SOURCES= inssel.c inssel.h $(arch_built)
322 CLEANFILES= $(BUILT_SOURCES)
323 EXTRA_DIST = $(common_BURGSRC) jit-icalls.c cprop.c TestDriver.cs ldscript $(test_sources) \
324 inssel-long.brg inssel-long32.brg \
325 $(x86_sources) inssel-x86.brg cpu-pentium.md \
326 $(amd64_sources) inssel-amd64.brg cpu-amd64.md \
327 $(ppc_sources) inssel-ppc.brg cpu-g4.md \
328 $(sparc_sources) inssel-sparc.brg cpu-sparc.md \
329 $(s390_sources) inssel-s390.brg cpu-s390.md \
330 $(s390x_sources) inssel-s390x.brg cpu-s390x.md