Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / mono / mini / Makefile.am.in
old mode 100644 (file)
new mode 100755 (executable)
index e3d4a3a..55e5f14
@@ -24,14 +24,6 @@ sgen_libs = \
        $(monodir)/mono/utils/libmonoutils.la \
        $(GLIB_LIBS) $(LIBICONV)
 
-if MOONLIGHT
-moon_libs = \
-       $(monodir)/mono/metadata/libmonoruntimemoon.la  \
-       $(monodir)/mono/io-layer/libwapi.la     \
-       $(monodir)/mono/utils/libmonoutils.la \
-       $(GLIB_LIBS) $(LIBICONV)
-endif
-
 static_libs=   \
        $(monodir)/mono/metadata/libmonoruntime-static.la       \
        $(monodir)/mono/io-layer/libwapi.la     \
@@ -106,16 +98,25 @@ boehm_binaries  = mono-boehm
 endif
 
 #The mono uses sgen, while libmono remains boehm
+if SUPPORT_SGEN
 mono_bin_suffix = sgen
+else
+mono_bin_suffix = boehm
+endif
 libmono_suffix = boehm
 
+if DISABLE_EXECUTABLES
+else
 mono: mono-$(mono_bin_suffix)
        ln -sf $< $@
 
-install-exec-hook:
-       ln -sf $(DESTDIR)$(bindir)/mono-$(libmono_suffix) $(DESTDIR)$(bindir)/mono
-       (cd $(DESTDIR)$(libdir); for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
+mono.exe: mono-$(mono_bin_suffix).exe
+       ln -sf $< $@
 
+install-exec-hook:
+       (cd $(DESTDIR)$(bindir) && ln -sf mono-$(mono_bin_suffix) mono)
+       (cd $(DESTDIR)$(libdir); shopt -s nullglob 2>/dev/null; for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
+endif
 
 if DISABLE_EXECUTABLES
 else
@@ -126,7 +127,11 @@ bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries)
 endif
 endif
 
+if DISABLE_EXECUTABLES
+noinst_PROGRAMS = genmdesc
+else
 noinst_PROGRAMS = genmdesc mono
+endif
 
 if DISABLE_EXECUTABLES
 shared_libraries = $(boehm_libraries) $(sgen_libraries)
@@ -150,14 +155,6 @@ else
 noinst_LTLIBRARIES = $(mini_common_lib) libmini-static.la
 endif
 
-if MOONLIGHT
-noinst_LTLIBRARIES += libmono-moon.la
-moon-do-build: $(BUILT_SOURCES) mono libmono-moon.la
-moon-do-clean: maintainer-clean-generic
-       -test -z "mono$(EXEEXT)" || rm -f mono$(EXEEXT)
-       -test -z "libmono-moon.la" || rm -f libmono-moon.la
-endif
-
 if LOADED_LLVM
 lib_LTLIBRARIES += libmono-llvm.la
 libmono_llvm_la_SOURCES = mini-llvm.c mini-llvm-cpp.cpp
@@ -165,7 +162,7 @@ libmono_llvm_la_LIBADD = $(LLVM_LIBS) $(LLVM_LDFLAGS)
 if PLATFORM_DARWIN
 libmono_llvm_la_LDFLAGS=-Wl,-undefined -Wl,suppress -Wl,-flat_namespace
 else
-libmono_llvm_la_LIBADD += $(top_builddir)/mono/mini/libmono-$(API_VER).la $(libs)
+libmono_llvm_la_LIBADD += $(top_builddir)/mono/mini/libmonoboehm-$(API_VER).la $(libs)
 endif
 endif
 
@@ -191,12 +188,20 @@ mono_sgen_CFLAGS = $(AM_CFLAGS)
 # We build this after libmono was built so it contains the date when the final
 # link was done
 if SUPPORT_BOEHM
+if DISABLE_EXECUTABLES
+buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime.la
+else
 buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-static.la
+endif
        @echo "const char *build_date = \"`date`\";" > buildver-boehm.h
 mono_boehm-main.$(OBJEXT): buildver-boehm.h
 endif
 
+if DISABLE_EXECUTABLES
+buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen.la
+else
 buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-static.la
+endif
        @echo "const char *build_date = \"`date`\";" > buildver-sgen.h
 mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h
 
@@ -219,7 +224,7 @@ MONO_LIB=$(boehm_static_libraries)
 MONO_SGEN_LIB=$(sgen_static_libraries)
 else 
 MONO_LIB=libmonoboehm-2.0.la
-MONO_LIBLIB=libmonosgen-2.0.la
+MONO_SGEN_LIB=libmonosgen-2.0.la
 endif
 
 if LOADED_LLVM
@@ -384,7 +389,6 @@ common_sources = \
        local-propagation.c     \
        driver.c                \
        debug-mini.c            \
-       debug-mini.h            \
        linear-scan.c           \
        aot-compiler.c          \
        aot-runtime.c           \
@@ -402,6 +406,7 @@ common_sources = \
        tasklets.c              \
        tasklets.h              \
        simd-intrinsics.c       \
+       mini-native-types.c \
        mini-unwind.h           \
        unwind.c                \
        image-writer.h          \
@@ -412,11 +417,10 @@ common_sources = \
        mini-gc.c               \
        debugger-agent.h        \
        debugger-agent.c        \
-       debug-debugger.c        \
-       debug-debugger.h        \
        xdebug.c                        \
        mini-llvm.h                     \
-       mini-llvm-cpp.h
+       mini-llvm-cpp.h \
+       alias-analysis.c
 
 test_sources =                         \
        basic-calls.cs          \
@@ -445,26 +449,13 @@ regtests += nacl.exe
 endif
 
 if X86
-if MONO_DEBUGGER_SUPPORTED
-if PLATFORM_DARWIN
-mdb_x86 = mdb-debug-info32-darwin.s
-else
-mdb_x86 = mdb-debug-info32.s
-endif
-else
-mdb_x86 = 
-endif
-arch_sources = $(x86_sources) $(mdb_x86)
+arch_sources = $(x86_sources)
 arch_built=cpu-x86.h
 arch_define=__i386__
 endif
 
 if AMD64
-if MONO_DEBUGGER_SUPPORTED
-arch_sources = $(amd64_sources) mdb-debug-info64.s
-else
 arch_sources = $(amd64_sources)
-endif
 arch_built=cpu-amd64.h
 arch_define=__x86_64__
 endif
@@ -507,7 +498,7 @@ arch_built=cpu-sparc.h
 arch_define=__sparc__
 endif
 
-if S390x
+if S390X
 arch_sources = $(s390x_sources)
 arch_built=cpu-s390x.h
 arch_define=__s390__
@@ -531,8 +522,8 @@ endif
 
 if PLATFORM_DARWIN
 os_sources = $(darwin_sources) $(posix_sources)
-#monobin_platform_ldflags=-sectcreate __TEXT __info_plist $(top_srcdir)/mono/mini/Info.plist -framework CoreFoundation
-monobin_platform_ldflags=-framework CoreFoundation
+#monobin_platform_ldflags=-sectcreate __TEXT __info_plist $(top_srcdir)/mono/mini/Info.plist -framework CoreFoundation -framework Foundation
+monobin_platform_ldflags=-framework CoreFoundation -framework Foundation
 endif
 
 libmini_la_SOURCES = $(common_sources) $(llvm_sources) $(arch_sources) $(os_sources)
@@ -548,17 +539,6 @@ libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
 libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT)
 libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags)
 
-if MOONLIGHT
-libmono_moon_la_SOURCES = $(libmini_la_SOURCES)
-if MOONLIGHT_BOEHM
-libmono_moon_la_CFLAGS = $(mono_CFLAGS) $(MOONLIGHT_DEFINES)
-libmono_moon_la_LIBADD = $(moon_libs) $(libgc_libs) $(LIBMONO_DTRACE_OBJECT)
-else
-libmono_moon_la_CFLAGS = $(mono_sgen_CFLAGS) $(MOONLIGHT_DEFINES)
-libmono_moon_la_LIBADD = $(moon_libs) $(LIBMONO_DTRACE_OBJECT)
-endif
-endif
-
 #
 # This library is shared between mono and mono-sgen, since the code in mini/ doesn't contain
 # compile time dependencies on boehm/sgen.
@@ -725,9 +705,9 @@ clean-local:
 pkgconfigdir = $(libdir)/pkgconfig
 
 if JIT_SUPPORTED
-BUILT_SOURCES = version.h $(arch_built) mono
+BUILT_SOURCES = version.h $(arch_built)
 else
-BUILT_SOURCES = version.h mono
+BUILT_SOURCES = version.h
 endif
 
 CLEANFILES= $(BUILT_SOURCES) *.exe *.dll
@@ -770,3 +750,9 @@ patch-automake:
 
 tags:
        etags -o TAGS `find .. -name "*.h" -o -name "*.c"`
+
+if HAS_EXTENSION_MODULE
+else
+Makefile.am: Makefile.am.in
+       cp $< $@
+endif