Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mono / mini / Makefile.am
index c52869cc6da69b4f78cdeb9dae42803bf7cd6d79..f4e6a71804e9417ee4bd9015c00ece2a761d9c31 100644 (file)
@@ -112,16 +112,26 @@ endif
 
 noinst_PROGRAMS = genmdesc
 
+if DISABLE_EXECUTABLES
+shared_libraries = $(boehm_libraries) $(sgen_libraries)
+else
 if SHARED_MONO
 shared_libraries = $(boehm_libraries) $(sgen_libraries)
 endif
+endif
 
 lib_LTLIBRARIES = $(shared_libraries)
 
+if SHARED_MONO
+mini_common_lib = libmini.la
+else
+mini_common_lib = 
+endif
+
 if DISABLE_EXECUTABLES
-noinst_LTLIBRARIES = libmini.la
+noinst_LTLIBRARIES = $(mini_common_lib)
 else
-noinst_LTLIBRARIES = libmini.la libmini-static.la
+noinst_LTLIBRARIES = $(mini_common_lib) libmini-static.la
 endif
 
 if MOONLIGHT
@@ -150,7 +160,7 @@ mono_SOURCES = \
 
 mono_CFLAGS = $(AM_CFLAGS)
 
-INCLUDES = $(LIBGC_CPPFLAGS)
+AM_CPPFLAGS = $(LIBGC_CPPFLAGS)
 
 mono_sgen_SOURCES = $(mono_SOURCES)
 mono_sgen_CFLAGS = $(AM_CFLAGS)
@@ -537,6 +547,10 @@ libmonosgen_2_0_la_SOURCES =
 libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
 libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT)
 
+if PLATFORM_ANDROID
+libmonosgen_2_0_la_LDFLAGS = -avoid-version
+endif
+
 if MOONLIGHT
 libmono_moon_la_SOURCES = $(libmini_la_SOURCES)
 if MOONLIGHT_BOEHM
@@ -656,10 +670,10 @@ gctest: mono gc-test.exe
 LLVM_AOT_RUNTIME_OPTS=$(if $(LLVM),--llvm,)
 
 aotcheck: mono $(regtests)
-       rm -f *.exe.so *.exe.dylib *.exe.dylib.dSYM
+       rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM
        $(RUNTIME) $(LLVM_AOT_RUNTIME_OPTS) --aot $(regtests) || exit 1
        for i in $(regtests); do $(RUNTIME_AOTCHECK) --regression $$i || exit 1; done
-       rm -f *.exe.so *.exe.dylib *.exe.dylib.dSYM
+       rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM
 
 llvmaotcheck:
        $(MAKE) aotcheck LLVM=1
@@ -679,6 +693,9 @@ fullaotcheck: mono $(fullaot_regtests)
 llvmfullaotcheck:
        $(MAKE) fullaotcheck LLVM=1
 
+gccheck: gc-test.exe
+       MONO_GC_PARAMS=stack-mark=precise MONO_GC_DEBUG=clear-at-gc ./mono-sgen gc-test.exe     
+
 bench: mono test.exe
        time env $(RUNTIME) --ncompile $(count) --compile Test:$(mtest) test.exe
 
@@ -749,5 +766,9 @@ patch-libtool:
        sed -e 's,if (for obj in $$oldobjs,if (for obj in "",g' < ../../libtool > 2; mv 2 ../../libtool
        chmod a+x ../../libtool
 
+# Utility target to patch automake to generate the same format silent output as the old mono silent build did
+patch-automake:
+       src="@echo \"  '. \$$name . ' ' x (8 - length (\$$name)) . '\""; dst="@echo \"'. \$$name . ' ' x (7 - length (\$$name)) .'\""; sed -e "s/$$src/$$dst/g" < $$EXE > 2 && cp 2 $$EXE && rm -f 2
+
 tags:
        etags -o TAGS `find .. -name "*.h" -o -name "*.c"`