[System] Process.WaitForExit now triggers event Exited.
[mono.git] / mono / profiler / Makefile.am
1 if HAVE_ZLIB
2 Z_LIBS= -lz
3 else
4 Z_LIBS=
5 endif
6
7 AM_CPPFLAGS = \
8         -fexceptions -DMONO_USE_EXC_TABLES      \
9         -I$(top_srcdir)         \
10         $(GLIB_CFLAGS)
11
12 if !HOST_WIN32
13 if !DISABLE_LIBRARIES
14 if !DISABLE_PROFILER
15 bin_PROGRAMS = mprof-report
16
17 if HAVE_VTUNE
18 vtune_lib = libmono-profiler-vtune.la
19 endif
20
21 lib_LTLIBRARIES = libmono-profiler-cov.la libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la $(vtune_lib)
22
23 if PLATFORM_DARWIN
24 libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
25 libmono_profiler_cov_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
26 endif
27 if PLATFORM_ANDROID
28 libmono_profiler_log_la_LDFLAGS = -avoid-version
29 endif
30 endif
31 endif
32 endif
33
34 if HAVE_OPROFILE
35 # Do something that uses OPROFILE_CFLAGS and OPROFILE_LIBS
36 endif
37
38 if SUPPORT_BOEHM
39 if DISABLE_EXECUTABLES
40 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
41 else
42 if !SHARED_MONO
43 static_libs=    \
44         $(top_builddir)/mono/metadata/libmonoruntime-static.la  \
45         $(top_builddir)/mono/io-layer/libwapi.la        \
46         $(top_builddir)/mono/utils/libmonoutils.la \
47         $(GLIB_LIBS) $(LIBICONV) \
48         $(LIBGC_STATIC_LIBS)
49
50 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
51 else
52 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
53 endif
54 endif
55 else
56 LIBMONO=$(top_builddir)/mono/mini/libmonosgen-$(API_VER).la
57 endif
58
59 libmono_profiler_cov_la_SOURCES = mono-cov.c
60 libmono_profiler_cov_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
61 libmono_profiler_aot_la_SOURCES = mono-profiler-aot.c
62 libmono_profiler_aot_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
63 #libmono_profiler_logging_la_SOURCES = mono-profiler-logging.c
64 #libmono_profiler_logging_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
65 libmono_profiler_iomap_la_SOURCES = mono-profiler-iomap.c
66 libmono_profiler_iomap_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
67 libmono_profiler_log_la_SOURCES = proflog.c
68 libmono_profiler_log_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(Z_LIBS)
69 if HAVE_VTUNE
70 libmono_profiler_vtune_la_SOURCES = mono-profiler-vtune.c
71 libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS)
72 libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
73 endif
74
75 mprof_report_SOURCES = decode.c
76 mprof_report_LDADD = $(Z_LIBS)
77
78 PLOG_TESTS_SRC=test-alloc.cs test-busy.cs test-monitor.cs test-excleave.cs \
79         test-heapshot.cs test-traces.cs
80 PLOG_TESTS=$(PLOG_TESTS_SRC:.cs=.exe)
81
82 with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_5
83
84 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
85 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
86
87 %.exe: %.cs
88         $(MCS) -out:$@ $<
89
90 testlog: $(PLOG_TESTS)
91         $(with_mono_path) perl $(srcdir)/ptestrunner.pl $(top_builddir)
92
93 if NACL_CODEGEN
94 check-local:
95 else
96 check-local: testlog
97 endif
98
99 EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
100         $(PLOG_TESTS_SRC) ptestrunner.pl