Fix another case missed by 7e222739db7192eb0c5ec17cad18e309482e71b4.
[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 !DISABLE_LIBRARIES
13 if !DISABLE_PROFILER
14 if JIT_SUPPORTED
15 bin_PROGRAMS = mprof-report
16 lib_LTLIBRARIES = libmono-profiler-cov.la libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la
17 if PLATFORM_DARWIN
18 libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
19 endif
20 endif
21 endif
22 endif
23
24 if HAVE_OPROFILE
25 # Do something that uses OPROFILE_CFLAGS and OPROFILE_LIBS
26 endif
27
28 if SUPPORT_BOEHM
29 if DISABLE_EXECUTABLES
30 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
31 else
32 if !SHARED_MONO
33 static_libs=    \
34         $(top_builddir)/mono/metadata/libmonoruntime-static.la  \
35         $(top_builddir)/mono/io-layer/libwapi.la        \
36         $(top_builddir)/mono/utils/libmonoutils.la \
37         $(GLIB_LIBS) $(LIBICONV) \
38         $(LIBGC_STATIC_LIBS)
39
40 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
41 else
42 LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
43 endif
44 endif
45 else
46 LIBMONO=$(top_builddir)/mono/mini/libmonosgen-$(API_VER).la
47 endif
48
49 libmono_profiler_cov_la_SOURCES = mono-cov.c
50 libmono_profiler_cov_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
51 libmono_profiler_aot_la_SOURCES = mono-profiler-aot.c
52 libmono_profiler_aot_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
53 #libmono_profiler_logging_la_SOURCES = mono-profiler-logging.c
54 #libmono_profiler_logging_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
55 libmono_profiler_iomap_la_SOURCES = mono-profiler-iomap.c
56 libmono_profiler_iomap_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
57 libmono_profiler_log_la_SOURCES = proflog.c
58 libmono_profiler_log_la_LIBADD = $(LIBMONO) $(Z_LIBS)
59
60 mprof_report_SOURCES = decode.c
61 mprof_report_LDADD = $(Z_LIBS)
62
63 PLOG_TESTS_SRC=test-alloc.cs test-busy.cs test-monitor.cs test-excleave.cs \
64         test-heapshot.cs test-traces.cs
65 PLOG_TESTS=$(PLOG_TESTS_SRC:.cs=.exe)
66
67 with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_0
68
69 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
70 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
71
72 %.exe: %.cs
73         $(MCS) -out:$@ $<
74
75 testlog: $(PLOG_TESTS)
76         $(with_mono_path) perl $(srcdir)/ptestrunner.pl $(top_builddir)
77
78 check-local: testlog
79
80 EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
81         $(PLOG_TESTS_SRC) ptestrunner.pl