2004-01-19 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / Makefile.am
index cfb5527b635f58f5d2cf33a983213215a0886a89..c8ea367f2a196612ab322a83ddebdbf5d38a0ef9 100644 (file)
@@ -1,26 +1,48 @@
-noinst_PROGRAMS = pedump
+if PLATFORM_WIN32
+export HOST_CC
+# Use -m here. This will use / as directory separator (C:/WINNT).
+# The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the
+# / by \ if running under WIN32.
+assembliesdir = `cygpath -m "${libdir}"`
+confdir = `cygpath -m "${sysconfdir}"`
+# The mingw math.h has "extern inline" functions that dont appear in libs, so
+# optimisation is required to actually inline them
+AM_CFLAGS = -O
+else
+assembliesdir = $(libdir)
+confdir = $(sysconfdir)
+endif
 
-lib_LIBRARIES = libmetadata.a libmonoruntime.a
+bin_PROGRAMS = monosn pedump
+
+noinst_LTLIBRARIES = libmetadata.la libmonoruntime.la
 
-#
-# Keep in sync with mono/runtime/Makefile.am
-#
-assembliesdir = $(libdir)
 
-INCLUDES = $(GLIB_CFLAGS) $(GMODULE_CFLAGS) -I$(top_srcdir)    -I$(top_srcdir)/mono \
-       -DMONO_ASSEMBLIES=\""$(assembliesdir)"\"                
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) $(GMODULE_CFLAGS) $(ICU_CFLAGS) \
+       -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
 
-libmonoruntime_a_SOURCES = \
+if WITH_BUNDLE
+bundle_srcs = mono-bundle.s mono-bundle.h
+mono-bundle.s mono-bundle.h: $(BUNDLE_FILE) $(srcdir)/make-bundle.pl
+       perl $(srcdir)/make-bundle.pl $(BUNDLE_FILE) mono-bundle.h mono-bundle.s
+else
+bundle_srcs =
+endif
+
+libmonoruntime_la_SOURCES = \
        reflection.c    \
        object.c        \
        icall.c         \
        decimal.c       \
        decimal.h       \
+       gc.c            \
+       gc-internal.h   \
        marshal.c       \
        marshal.h       \
+       monitor.c       \
+       monitor.h       \
        threads.c       \
-       threads.h       \
-       threads-types.h \
+       threadpool.c    \
        file-io.c       \
        file-io.h       \
        socket-io.c     \
@@ -29,12 +51,13 @@ libmonoruntime_a_SOURCES = \
        exception.h     \
        unicode.c       \
        unicode.h       \
-       appdomain.h     \
        appdomain.c     \
-       debug-helpers.h \
-       debug-helpers.c \
-       debug-symfile.h \
-       debug-symfile.c \
+       debug-mono-symfile.h    \
+       debug-mono-symfile.c    \
+       mono-debug.h            \
+       mono-debug.c            \
+       mono-debug-debugger.h   \
+       mono-debug-debugger.c   \
        profiler.c      \
        profiler-private.h      \
        rand.h          \
@@ -42,9 +65,17 @@ libmonoruntime_a_SOURCES = \
        string-icalls.c \
        string-icalls.h \
        sysmath.h       \
-       sysmath.c
+       sysmath.c       \
+       process.c       \
+       process.h       \
+       environment.c   \
+       environment.h   \
+       locales.c       \
+       locales.h       \
+       filewatcher.c   \
+       filewatcher.h
 
-libmetadata_a_SOURCES = \
+libmetadata_la_SOURCES = \
        assembly.c      \
        domain.c        \
        opcodes.c       \
@@ -52,18 +83,31 @@ libmetadata_a_SOURCES = \
        metadata.c      \
        verify.c        \
        mono-endian.c   \
+       mono-config.c   \
+       mono-config.h   \
        private.h       \
        rawbuffer.c     \
        loader.c        \
        class.c         \
-       mempool.h       \
        mempool.c       \
-       debug-helpers.h \
+       $(bundle_srcs)  \
        debug-helpers.c
 
 libmetadataincludedir = $(includedir)/mono/metadata
 libmonoruntimeincludedir = $(includedir)/mono/metadata
 
+libmonoruntimeinclude_HEADERS = \
+       appdomain.h     \
+       mono-debug.h    \
+       mono-debug-debugger.h   \
+       debug-mono-symfile.h    \
+       threadpool.h    \
+       threads-types.h \
+       threads.h       \
+       environment.h   \
+       monitor.h       \
+       locales.h
+
 libmetadatainclude_HEADERS = \
        assembly.h      \
        opcodes.h       \
@@ -84,11 +128,27 @@ libmetadatainclude_HEADERS = \
        exception.h     \
        profiler.h      \
        appdomain.h     \
+       debug-helpers.h \
+       mempool.h       \
        rand.h
 
 pedump_SOURCES =               \
-       pedump.c $(libmetadata_a_SOURCES)
+       pedump.c
+
+pedump_LDADD = libmetadata.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
+       $(LIBGC_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) -lm
+
+
+monosn_LDADD = \
+       libmetadata.la  \
+       ../io-layer/libwapi.la          \
+       ../utils/libmonoutils.la        \
+       $(LIBGC_LIBS)                   \
+       $(GLIB_LIBS)                    \
+       $(GMODULE_LIBS)                 \
+       -lm
 
-pedump_LDADD = ../io-layer/libwapi.a ../utils/libmonoutils.a $(GLIB_LIBS) $(GMODULE_LIBS) -lm
+BUILT_SOURCES = $(bundle_srcs)
 
+EXTRA_DIST = make-bundle.pl sample-bundle