Replace SIZEOF_REGISTER with sizeof(mgreg_t) for consistency with sizeof(gpointer)
[mono.git] / mono / profiler / Makefile.am
1 if HAVE_ZLIB
2 Z_LIBS= -lz
3 else
4 Z_LIBS=
5 endif
6
7 INCLUDES = \
8         -fexceptions -DMONO_USE_EXC_TABLES      \
9         -I$(top_srcdir)         \
10         $(GLIB_CFLAGS)
11
12 if !DISABLE_PROFILER
13 if JIT_SUPPORTED
14 if PLATFORM_LINUX
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 else
18 bin_PROGRAMS = mprof-report
19 lib_LTLIBRARIES = libmono-profiler-cov.la libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la
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 libmono_profiler_cov_la_SOURCES = mono-cov.c
29 libmono_profiler_cov_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la
30 libmono_profiler_aot_la_SOURCES = mono-profiler-aot.c
31 libmono_profiler_aot_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la
32 #libmono_profiler_logging_la_SOURCES = mono-profiler-logging.c
33 #libmono_profiler_logging_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(GLIB_LIBS)
34 libmono_profiler_iomap_la_SOURCES = mono-profiler-iomap.c
35 libmono_profiler_iomap_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(GLIB_LIBS)
36 libmono_profiler_log_la_SOURCES = proflog.c
37 libmono_profiler_log_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(Z_LIBS)
38
39 mprof_report_SOURCES = decode.c
40 mprof_report_LDADD = $(Z_LIBS)
41
42 PLOG_TESTS_SRC=test-alloc.cs test-busy.cs test-monitor.cs test-excleave.cs \
43         test-heapshot.cs test-traces.cs
44 PLOG_TESTS=$(PLOG_TESTS_SRC:.cs=.exe)
45
46 with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_2_0
47
48 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
49 MCS = $(RUNTIME) $(mcs_topdir)/class/lib/net_2_0/gmcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
50
51 %.exe: %.cs
52         $(MCS) -out:$@ $<
53
54 testlog: $(PLOG_TESTS)
55         $(with_mono_path) perl $(srcdir)/ptestrunner.pl $(top_builddir)
56
57 check-local: testlog
58
59 EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
60         $(PLOG_TESTS_SRC) ptestrunner.pl
61
62