Merge pull request #409 from Alkarex/patch-1
[mono.git] / mono / metadata / Makefile.am
index 630a1c3be3a0fcefcb0e9fef3769a6ea6a1af3d7..6f04f32df6c816bdb67cd5d1398c097612e26121 100644 (file)
@@ -39,16 +39,24 @@ endif
 # convenience lib, so we have to do it ourselves
 #
 if SUPPORT_SGEN
+if DISABLE_EXECUTABLES
+shared_sgen_libraries = libmonoruntimesgen.la 
+else
 if SHARED_MONO
 shared_sgen_libraries = libmonoruntimesgen.la 
 endif
+endif
 sgen_libraries = $(shared_sgen_libraries) libmonoruntimesgen-static.la 
 endif
 
 if SUPPORT_BOEHM
+if DISABLE_EXECUTABLES
+shared_boehm_libraries = libmonoruntime.la
+else
 if SHARED_MONO
 shared_boehm_libraries = libmonoruntime.la
 endif
+endif
 boehm_libraries = $(shared_boehm_libraries) libmonoruntime-static.la
 endif
 
@@ -60,9 +68,13 @@ moon-do-clean:
        -test -z "libmonoruntimemoon.la" || rm -f libmonoruntimemoon.la
 endif
 
+if DISABLE_EXECUTABLES
+noinst_LTLIBRARIES = $(shared_sgen_libraries) $(shared_boehm_libraries)
+else
 noinst_LTLIBRARIES = $(boehm_libraries) $(sgen_libraries) $(moonlight_libraries)
+endif
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
 
 #
 # Make sure any prefix changes are updated in the binaries too.
@@ -82,16 +94,11 @@ libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
 null_sources = \
        console-null.c
 
-sgen_sources = \
-       sgen-fin-weak-hash.c
-
-libmonoruntime_la_SOURCES = \
+common_sources = \
        $(platform_sources)     \
-       appdomain.c             \
        assembly.c              \
        attach.h                \
        attach.c                \
-       boehm-gc.c              \
        char-conversions.h      \
        cil-coff.h              \
        class.c                 \
@@ -108,7 +115,6 @@ libmonoruntime_la_SOURCES = \
        debug-mono-symfile.c    \
        decimal.c               \
        decimal.h               \
-       domain.c                \
        domain-internals.h      \
        environment.c           \
        environment.h           \
@@ -118,7 +124,6 @@ libmonoruntime_la_SOURCES = \
        file-io.h               \
        filewatcher.c           \
        filewatcher.h           \
-       gc.c                    \
        gc-internal.h           \
        icall.c                 \
        icall-def.h             \
@@ -149,7 +154,6 @@ libmonoruntime_la_SOURCES = \
        mono-debug-debugger.c   \
        mono-endian.c           \
        mono-endian.h           \
-       mono-hash.c             \
        mono-hash.h             \
        mono-mlist.c            \
        mono-mlist.h            \
@@ -159,13 +163,11 @@ libmonoruntime_la_SOURCES = \
        mono-ptr-array.h        \
        mono-wsq.c              \
        mono-wsq.h              \
-       monitor.c               \
        monitor.h               \
        nacl-stub.c             \
        normalization-tables.h  \
        null-gc.c               \
        number-formatter.h      \
-       object.c                \
        object-internals.h      \
        opcodes.c               \
        socket-io.c             \
@@ -177,13 +179,40 @@ libmonoruntime_la_SOURCES = \
        rand.h                  \
        rand.c                  \
        runtime.c               \
-       reflection.c            \
        security.c              \
        security.h              \
        security-core-clr.c     \
        security-core-clr.h     \
        security-manager.c      \
        security-manager.h      \
+       string-icalls.c         \
+       string-icalls.h         \
+       sysmath.h               \
+       sysmath.c               \
+       tabledefs.h             \
+       threads.c               \
+       threads-types.h         \
+       threadpool.c            \
+       threadpool.h            \
+       threadpool-internals.h  \
+       verify.c                \
+       verify-internals.h      \
+       wrapper-types.h
+
+# These source files have compile time dependencies on GC code
+gc_dependent_sources = \
+       appdomain.c     \
+       domain.c        \
+       gc.c            \
+       monitor.c       \
+       mono-hash.c     \
+       object.c        \
+       reflection.c
+
+boehm_sources = \
+       boehm-gc.c
+
+sgen_sources = \
        sgen-os-posix.c         \
        sgen-os-mach.c          \
        sgen-os-win32.c         \
@@ -216,29 +245,27 @@ libmonoruntime_la_SOURCES = \
        sgen-gray.c     \
        sgen-gray.h     \
        sgen-major-copy-object.h \
+       sgen-minor-copy-object.h \
+       sgen-copy-object.h \
        sgen-major-scan-object.h \
+       sgen-minor-scan-object.h \
        sgen-protocol.h         \
        sgen-scan-object.h      \
        sgen-nursery-allocator.c        \
        sgen-hash-table.c       \
+       sgen-hash-table.h       \
        sgen-descriptor.c               \
        sgen-descriptor.h               \
        sgen-alloc.c            \
        sgen-debug.c            \
-       string-icalls.c         \
-       string-icalls.h         \
-       sysmath.h               \
-       sysmath.c               \
-       tabledefs.h             \
-       threads.c               \
-       threads-types.h         \
-       threadpool.c            \
-       threadpool.h            \
-       threadpool-internals.h  \
-       verify.c                \
-       verify-internals.h      \
-       wrapper-types.h
+       sgen-simple-nursery.c   \
+       sgen-split-nursery.c    \
+       sgen-memory-governor.c  \
+       sgen-memory-governor.h  \
+       sgen-stw.c                              \
+       sgen-fin-weak-hash.c
 
+libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(boehm_sources)
 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
 
 if MOONLIGHT
@@ -250,14 +277,14 @@ libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(SGEN_DEFINES)
 endif
 endif
 
-libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_SOURCES)
+libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
 
 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
 libmonoruntime_static_la_LDFLAGS = -static
 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
 
-libmonoruntimesgen_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
+libmonoruntimesgen_static_la_SOURCES = $(libmonoruntimesgen_la_SOURCES)
 libmonoruntimesgen_static_la_LDFLAGS = -static
 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
 
@@ -315,6 +342,6 @@ endif
 endif
 endif
 
-EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h \
+EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
                tpool-poll.c tpool-epoll.c tpool-kqueue.c