* mini/mini.c (mini_cleanup): Call mono_runtime_shutdown().
[mono.git] / mono / metadata / Makefile.am
1 if HOST_WIN32
2 win32_sources = \
3         console-win32.c
4
5 platform_sources = $(win32_sources)
6
7 # Use -m here. This will use / as directory separator (C:/WINNT).
8 # The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the
9 # / by \ if running under WIN32.
10 if CROSS_COMPILING
11 assembliesdir = ${libdir}
12 confdir = ${sysconfdir}
13 else
14 assembliesdir = `cygpath -m "${libdir}"`
15 confdir = `cygpath -m "${sysconfdir}"`
16 endif
17 export HOST_CC
18 # The mingw math.h has "extern inline" functions that dont appear in libs, so
19 # optimisation is required to actually inline them
20 AM_CFLAGS = -O
21 else
22
23 assembliesdir = $(exec_prefix)/lib
24 confdir = $(sysconfdir)
25 unix_sources = \
26         console-unix.c
27
28 platform_sources = $(unix_sources)
29 endif
30
31 bin_PROGRAMS = pedump
32
33 #
34 # libtool is not capable of creating static/shared versions of the same
35 # convenience lib, so we have to do it ourselves
36 #
37 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
38
39 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
40
41 #
42 # Make sure any prefix changes are updated in the binaries too.
43 #
44 #  assembly.c uses MONO_ASSEMBLIES
45 #  mono-config.c uses MONO_CFG_DIR
46 #
47 # This won't result in many more false positives than AC_DEFINEing them
48 # in configure.in.
49 #
50 assembly.lo mono-config.lo: Makefile
51
52 CLEANFILES = mono-bundle.stamp
53
54 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
55
56 null_sources = \
57         console-null.c
58
59 sgen_sources = \
60         sgen-gray.c     \
61         sgen-pinning.c  \
62         sgen-pinning-stats.c    \
63         sgen-marksweep.c
64
65 libmonoruntime_la_SOURCES = \
66         $(platform_sources)     \
67         appdomain.c             \
68         assembly.c              \
69         attach.h                \
70         attach.c                \
71         boehm-gc.c              \
72         char-conversions.h      \
73         cil-coff.h              \
74         class.c                 \
75         class-internals.h       \
76         cominterop.c            \
77         cominterop.h            \
78         console-io.h            \
79         coree.c                 \
80         coree.h                 \
81         culture-info.h          \
82         culture-info-tables.h   \
83         debug-helpers.c         \
84         debug-mono-symfile.h    \
85         debug-mono-symfile.c    \
86         decimal.c               \
87         decimal.h               \
88         domain.c                \
89         domain-internals.h      \
90         environment.c           \
91         environment.h           \
92         exception.c             \
93         exception.h             \
94         file-io.c               \
95         file-io.h               \
96         filewatcher.c           \
97         filewatcher.h           \
98         gc.c                    \
99         gc-internal.h           \
100         icall.c                 \
101         icall-def.h             \
102         image.c                 \
103         loader.c                \
104         locales.c               \
105         locales.h               \
106         lock-tracer.c           \
107         lock-tracer.h           \
108         marshal.c               \
109         marshal.h               \
110         mempool.c               \
111         mempool.h               \
112         mempool-internals.h     \
113         metadata.c              \
114         metadata-verify.c       \
115         metadata-internals.h    \
116         method-builder.h        \
117         method-builder.c        \
118         mono-basic-block.c      \
119         mono-basic-block.h      \
120         mono-config.c           \
121         mono-debug.h            \
122         mono-debug.c            \
123         mono-debug-debugger.h   \
124         mono-debug-debugger.c   \
125         mono-endian.c           \
126         mono-endian.h           \
127         mono-mlist.c            \
128         mono-mlist.h            \
129         mono-perfcounters.c     \
130         mono-perfcounters.h     \
131         mono-perfcounters-def.h \
132         mono-ptr-array.h        \
133         mono-wsq.c              \
134         mono-wsq.h              \
135         monitor.c               \
136         monitor.h               \
137         normalization-tables.h  \
138         null-gc.c               \
139         number-formatter.h      \
140         object.c                \
141         object-internals.h      \
142         opcodes.c               \
143         socket-io.c             \
144         socket-io.h             \
145         process.c               \
146         process.h               \
147         profiler.c              \
148         profiler-private.h      \
149         rand.h                  \
150         rand.c                  \
151         runtime.c               \
152         reflection.c            \
153         security.c              \
154         security.h              \
155         security-core-clr.c     \
156         security-core-clr.h     \
157         security-manager.c      \
158         security-manager.h      \
159         sgen-gc.c               \
160         sgen-gc.h               \
161         sgen-archdep.h          \
162         sgen-scan-object.h      \
163         string-icalls.c         \
164         string-icalls.h         \
165         sysmath.h               \
166         sysmath.c               \
167         tabledefs.h             \
168         threads.c               \
169         threads-types.h         \
170         threadpool.c            \
171         threadpool.h            \
172         threadpool-internals.h  \
173         verify.c                \
174         verify-internals.h      \
175         wrapper-types.h
176
177 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
178
179 libmonoruntime_static_la_LDFLAGS = -static
180
181 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
182
183 libmonoruntimeinclude_HEADERS = \
184         assembly.h              \
185         attrdefs.h              \
186         appdomain.h             \
187         blob.h                  \
188         class.h                 \
189         debug-helpers.h         \
190         debug-mono-symfile.h    \
191         threads.h               \
192         environment.h           \
193         exception.h             \
194         image.h                 \
195         loader.h                \
196         metadata.h              \
197         mono-config.h           \
198         mono-debug.h            \
199         mono-gc.h               \
200         object.h                \
201         opcodes.h               \
202         profiler.h              \
203         reflection.h            \
204         row-indexes.h           \
205         tokentype.h             \
206         verify.h                
207
208 if DTRACE_G_REQUIRED
209
210 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
211
212 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
213         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
214         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
215
216 else
217 PEDUMP_DTRACE_OBJECT = 
218 endif
219
220 pedump_SOURCES =                \
221         pedump.c
222
223 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
224         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
225
226 if PLATFORM_DARWIN
227 pedump_LDFLAGS=-framework CoreFoundation
228 endif
229
230 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources)
231