New tests.
[mono.git] / mono / metadata / Makefile.am
index 1bfcbdac9d7f1edc884310a48d4c8389c5dd8ec9..0eb0effc76e9b3cc02124a84121b92746c10aecf 100644 (file)
@@ -1,19 +1,34 @@
 if PLATFORM_WIN32
+win32_sources = \
+       console-win32.c
+
+platform_sources = $(win32_sources)
+
 # 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.
+if CROSS_COMPILING
+assembliesdir = ${libdir}
+confdir = ${sysconfdir}
+else
 assembliesdir = `cygpath -m "${libdir}"`
 confdir = `cygpath -m "${sysconfdir}"`
+endif
 export HOST_CC
-else
 # 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 = $(exec_prefix)/lib
 confdir = $(sysconfdir)
+unix_sources = \
+       console-unix.c
+
+platform_sources = $(unix_sources)
 endif
 
-bin_PROGRAMS = pedump monodiet
+bin_PROGRAMS = pedump
 
 #
 # libtool is not capable of creating static/shared versions of the same
@@ -21,7 +36,7 @@ bin_PROGRAMS = pedump monodiet
 #
 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
 
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) $(GMODULE_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
 
 #
 # Make sure any prefix changes are updated in the binaries too.
@@ -38,139 +53,164 @@ CLEANFILES = mono-bundle.stamp
 
 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
 
+null_sources = \
+       console-null.c
+
 libmonoruntime_la_SOURCES = \
-       reflection.c    \
-       object.c        \
-       object-internals.h      \
-       icall.c         \
-       icall-def.h             \
-       char-conversions.h \
-       decimal.c       \
-       decimal.h       \
-       boehm-gc.c      \
-       null-gc.c       \
-       sgen-gc.c       \
-       sgen-gc.h       \
-       gc.c            \
-       gc-internal.h   \
-       marshal.c       \
-       marshal.h       \
-       monitor.c       \
-       monitor.h       \
-       tabledefs.h \
-       threads.c       \
-       threads-types.h \
-       threadpool.c    \
-       threadpool.h    \
-       threadpool-internals.h  \
-       file-io.c       \
-       file-io.h       \
-       socket-io.c     \
-       socket-io.h     \
-       exception.c     \
-       exception.h     \
-       appdomain.c     \
+       $(platform_sources)     \
+       appdomain.c             \
+       assembly.c              \
+       attach.h                \
+       attach.c                \
+       boehm-gc.c              \
+       char-conversions.h      \
+       cil-coff.h              \
+       class.c                 \
+       class-internals.h       \
+       cominterop.c            \
+       cominterop.h            \
+       console-io.h            \
+       coree.c                 \
+       coree.h                 \
+       culture-info.h          \
+       culture-info-tables.h   \
+       debug-helpers.c         \
        debug-mono-symfile.h    \
        debug-mono-symfile.c    \
+       decimal.c               \
+       decimal.h               \
+       domain.c                \
+       domain-internals.h      \
+       environment.c           \
+       environment.h           \
+       exception.c             \
+       exception.h             \
+       file-io.c               \
+       file-io.h               \
+       filewatcher.c           \
+       filewatcher.h           \
+       gc.c                    \
+       gc-internal.h           \
+       generic-sharing.c       \
+       icall.c                 \
+       icall-def.h             \
+       image.c                 \
+       loader.c                \
+       locales.c               \
+       locales.h               \
+       lock-tracer.c           \
+       lock-tracer.h           \
+       marshal.c               \
+       marshal.h               \
+       mempool.c               \
+       mempool-internals.h     \
+       metadata.c              \
+       metadata-verify.c       \
+       metadata-internals.h    \
+       method-builder.h        \
+       method-builder.c        \
+       mono-config.c           \
        mono-debug.h            \
        mono-debug.c            \
        mono-debug-debugger.h   \
        mono-debug-debugger.c   \
-       profiler.c      \
-       profiler-private.h      \
-       rand.h          \
-       rand.c          \
-       security.c      \
-       security.h      \
-       string-icalls.c \
-       string-icalls.h \
-       sysmath.h       \
-       sysmath.c       \
-       process.c       \
-       process.h       \
-       environment.c   \
-       environment.h   \
-       locales.c       \
-       locales.h       \
+       mono-endian.c           \
+       mono-endian.h           \
+       mono-mlist.c            \
+       mono-mlist.h            \
+       mono-perfcounters.c     \
+       mono-perfcounters.h     \
+       mono-perfcounters-def.h \
+       monitor.c               \
+       monitor.h               \
        normalization-tables.h  \
-       filewatcher.c   \
-       filewatcher.h   \
-       culture-info.h  \
-       culture-info-tables.h   \
+       null-gc.c               \
+       number-formatter.h      \
+       object.c                \
+       object-internals.h      \
+       opcodes.c               \
+       socket-io.c             \
+       socket-io.h             \
+       process.c               \
+       process.h               \
+       profiler.c              \
+       profiler-private.h      \
+       rand.h                  \
+       rand.c                  \
+       reflection.c            \
+       security.c              \
+       security.h              \
+       security-core-clr.c     \
+       security-core-clr.h     \
        security-manager.c      \
        security-manager.h      \
-       console-io.c            \
-       console-io.h    \
-       assembly.c      \
-       domain.c        \
-       domain-internals.h      \
-       opcodes.c       \
-       image.c         \
-       cil-coff.h      \
-       metadata.c      \
-       metadata-internals.h    \
-       verify.c        \
-       mono-endian.c   \
-       mono-endian.h   \
-       mono-config.c   \
-       rawbuffer.c     \
-       rawbuffer.h     \
-       loader.c        \
-       class.c         \
-       class-internals.h               \
-       mempool.c       \
-       debug-helpers.c
+       sgen-gc.c               \
+       sgen-gc.h               \
+       sgen-archdep.h          \
+       sgen-scan-object.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
 
 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
 
 libmonoruntime_static_la_LDFLAGS = -static
 
-libmonoruntimeincludedir = $(includedir)/mono/metadata
+libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
 
 libmonoruntimeinclude_HEADERS = \
-       attrdefs.h      \
-       appdomain.h     \
-       mono-debug.h    \
-       mono-gc.h       \
+       assembly.h              \
+       attrdefs.h              \
+       appdomain.h             \
+       blob.h                  \
+       class.h                 \
+       debug-helpers.h         \
        debug-mono-symfile.h    \
-       threads.h       \
-       environment.h   \
-       assembly.h      \
-       opcodes.h       \
-       blob.h          \
-       image.h         \
-       metadata.h      \
-       verify.h        \
-       reflection.h    \
-       row-indexes.h   \
-       tokentype.h     \
-       loader.h        \
-       class.h         \
-       object.h        \
-       exception.h     \
-       profiler.h      \
-       appdomain.h     \
-       mono-config.h   \
-       debug-helpers.h \
-       mempool.h
+       threads.h               \
+       environment.h           \
+       exception.h             \
+       image.h                 \
+       loader.h                \
+       mempool.h               \
+       metadata.h              \
+       mono-config.h           \
+       mono-debug.h            \
+       mono-gc.h               \
+       object.h                \
+       opcodes.h               \
+       profiler.h              \
+       reflection.h            \
+       row-indexes.h           \
+       tokentype.h             \
+       verify.h                
+
+if DTRACE_G_REQUIRED
+
+PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
+
+pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
+       DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
+       --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
+
+else
+PEDUMP_DTRACE_OBJECT = 
+endif
 
 pedump_SOURCES =               \
        pedump.c
 
 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
-       $(LIBGC_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) -lm
-
-monodiet_SOURCES = monodiet.c
-
-monodiet_LDADD = \
-       libmonoruntime.la       \
-       ../io-layer/libwapi.la          \
-       ../utils/libmonoutils.la        \
-       $(LIBGC_LIBS)                   \
-       $(GLIB_LIBS)                    \
-       $(GMODULE_LIBS)                 \
-       $(ICU_LIBS)                     \
-       -lm
+       $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
 
-EXTRA_DIST = make-bundle.pl sample-bundle
+EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources)