2010-07-06 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / Makefile.am
index 0eb0effc76e9b3cc02124a84121b92746c10aecf..0288a2c0de039732dbd60ff3739fdff507f951b0 100644 (file)
@@ -1,4 +1,4 @@
-if PLATFORM_WIN32
+if HOST_WIN32
 win32_sources = \
        console-win32.c
 
@@ -34,7 +34,11 @@ bin_PROGRAMS = pedump
 # libtool is not capable of creating static/shared versions of the same
 # convenience lib, so we have to do it ourselves
 #
-noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
+if SUPPORT_SGEN
+sgen_libraries = libmonoruntimesgen.la libmonoruntimesgen-static.la 
+endif
+
+noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la $(sgen_libraries)
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
 
@@ -56,6 +60,14 @@ libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
 null_sources = \
        console-null.c
 
+sgen_sources = \
+       sgen-gray.c     \
+       sgen-pinning.c  \
+       sgen-pinning-stats.c    \
+       sgen-marksweep.c                \
+       sgen-los.c                              \
+       sgen-protocol.c
+
 libmonoruntime_la_SOURCES = \
        $(platform_sources)     \
        appdomain.c             \
@@ -91,7 +103,6 @@ libmonoruntime_la_SOURCES = \
        filewatcher.h           \
        gc.c                    \
        gc-internal.h           \
-       generic-sharing.c       \
        icall.c                 \
        icall-def.h             \
        image.c                 \
@@ -103,12 +114,15 @@ libmonoruntime_la_SOURCES = \
        marshal.c               \
        marshal.h               \
        mempool.c               \
+       mempool.h               \
        mempool-internals.h     \
        metadata.c              \
        metadata-verify.c       \
        metadata-internals.h    \
        method-builder.h        \
        method-builder.c        \
+       mono-basic-block.c      \
+       mono-basic-block.h      \
        mono-config.c           \
        mono-debug.h            \
        mono-debug.c            \
@@ -116,11 +130,16 @@ 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            \
        mono-perfcounters.c     \
        mono-perfcounters.h     \
        mono-perfcounters-def.h \
+       mono-ptr-array.h        \
+       mono-wsq.c              \
+       mono-wsq.h              \
        monitor.c               \
        monitor.h               \
        normalization-tables.h  \
@@ -137,6 +156,7 @@ libmonoruntime_la_SOURCES = \
        profiler-private.h      \
        rand.h                  \
        rand.c                  \
+       runtime.c               \
        reflection.c            \
        security.c              \
        security.h              \
@@ -144,6 +164,8 @@ libmonoruntime_la_SOURCES = \
        security-core-clr.h     \
        security-manager.c      \
        security-manager.h      \
+       sgen-os-posix.c         \
+       sgen-os-mach.c          \
        sgen-gc.c               \
        sgen-gc.h               \
        sgen-archdep.h          \
@@ -162,9 +184,18 @@ libmonoruntime_la_SOURCES = \
        verify-internals.h      \
        wrapper-types.h
 
-libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
+libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
+
+libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_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_LDFLAGS = -static
+libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
 
 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
 
@@ -181,7 +212,6 @@ libmonoruntimeinclude_HEADERS = \
        exception.h             \
        image.h                 \
        loader.h                \
-       mempool.h               \
        metadata.h              \
        mono-config.h           \
        mono-debug.h            \
@@ -212,5 +242,9 @@ pedump_SOURCES =            \
 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
        $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
 
-EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources)
+if PLATFORM_DARWIN
+pedump_LDFLAGS=-framework CoreFoundation
+endif
+
+EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h