mono{dis,graph,profiler}: Fix build when configured with --disable-shared
[mono.git] / mono / profiler / Makefile.am
index 8cb6174ceecde72dcda50d68ac538b4f8ce1e82c..93a323c55b6a0c9a747357c5d8e14b4b8244f4a9 100644 (file)
@@ -23,16 +23,33 @@ if HAVE_OPROFILE
 # Do something that uses OPROFILE_CFLAGS and OPROFILE_LIBS
 endif
 
+if SUPPORT_BOEHM
+if !SHARED_MONO
+static_libs=   \
+       $(top_builddir)/mono/metadata/libmonoruntime-static.la  \
+       $(top_builddir)/mono/io-layer/libwapi.la        \
+       $(top_builddir)/mono/utils/libmonoutils.la \
+       $(GLIB_LIBS) $(LIBICONV) \
+       $(LIBGC_STATIC_LIBS)
+
+LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
+else
+LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
+endif
+else
+LIBMONO=$(top_builddir)/mono/mini/libmonosgen-$(API_VER).la
+endif
+
 libmono_profiler_cov_la_SOURCES = mono-cov.c
-libmono_profiler_cov_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la
+libmono_profiler_cov_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_aot_la_SOURCES = mono-profiler-aot.c
-libmono_profiler_aot_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la
+libmono_profiler_aot_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 #libmono_profiler_logging_la_SOURCES = mono-profiler-logging.c
-#libmono_profiler_logging_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(GLIB_LIBS)
+#libmono_profiler_logging_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_iomap_la_SOURCES = mono-profiler-iomap.c
-libmono_profiler_iomap_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(GLIB_LIBS)
+libmono_profiler_iomap_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_log_la_SOURCES = proflog.c
-libmono_profiler_log_la_LIBADD = $(top_builddir)/mono/mini/libmono-$(API_VER).la $(Z_LIBS)
+libmono_profiler_log_la_LIBADD = $(LIBMONO) $(Z_LIBS)
 
 mprof_report_SOURCES = decode.c
 mprof_report_LDADD = $(Z_LIBS)
@@ -41,10 +58,10 @@ PLOG_TESTS_SRC=test-alloc.cs test-busy.cs test-monitor.cs test-excleave.cs \
        test-heapshot.cs test-traces.cs
 PLOG_TESTS=$(PLOG_TESTS_SRC:.cs=.exe)
 
-with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_2_0
+with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_0
 
 RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/basic/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
+MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
 
 %.exe: %.cs
        $(MCS) -out:$@ $<
@@ -56,5 +73,3 @@ check-local: testlog
 
 EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
        $(PLOG_TESTS_SRC) ptestrunner.pl
-
-