NaCl runtime fixes
[mono.git] / mono / profiler / Makefile.am
index 4577fc9a9f8d5cafadc123328851bd3d69fa5125..25bb9b51f707d608ed13a4e80d042ebdb38f6349 100644 (file)
@@ -4,11 +4,12 @@ else
 Z_LIBS=
 endif
 
-INCLUDES = \
+AM_CPPFLAGS = \
        -fexceptions -DMONO_USE_EXC_TABLES      \
        -I$(top_srcdir)         \
        $(GLIB_CFLAGS)
 
+if !DISABLE_LIBRARIES
 if !DISABLE_PROFILER
 if JIT_SUPPORTED
 bin_PROGRAMS = mprof-report
@@ -16,6 +17,10 @@ lib_LTLIBRARIES = libmono-profiler-cov.la libmono-profiler-aot.la libmono-profil
 if PLATFORM_DARWIN
 libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
 endif
+if PLATFORM_ANDROID
+libmono_profiler_log_la_LDFLAGS = -avoid-version
+endif
+endif
 endif
 endif
 
@@ -24,7 +29,22 @@ if HAVE_OPROFILE
 endif
 
 if SUPPORT_BOEHM
-LIBMONO=$(top_builddir)/mono/mini/libmono-$(API_VER).la
+if DISABLE_EXECUTABLES
+LIBMONO=$(top_builddir)/mono/mini/$(LIBMONO_LA)
+else
+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
+endif
 else
 LIBMONO=$(top_builddir)/mono/mini/libmonosgen-$(API_VER).la
 endif
@@ -40,6 +60,10 @@ libmono_profiler_iomap_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
 libmono_profiler_log_la_SOURCES = proflog.c
 libmono_profiler_log_la_LIBADD = $(LIBMONO) $(Z_LIBS)
 
+if PLATFORM_ANDROID
+libmono_profiler_log_la_LIBADD += $(GLIB_LIBS)
+endif
+
 mprof_report_SOURCES = decode.c
 mprof_report_LDADD = $(Z_LIBS)
 
@@ -58,7 +82,11 @@ MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -now
 testlog: $(PLOG_TESTS)
        $(with_mono_path) perl $(srcdir)/ptestrunner.pl $(top_builddir)
 
+if NACL_CODEGEN
+check-local:
+else
 check-local: testlog
+endif
 
 EXTRA_DIST=utils.c utils.h proflog.h log-profiler.txt perf_event.h \
        $(PLOG_TESTS_SRC) ptestrunner.pl