[decimal] Microsoft's unmanaged code for decimal support
[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 if SHARED_MONO
32 if SUPPORT_BOEHM
33 bin_PROGRAMS = pedump
34 endif
35 endif
36
37 #
38 # libtool is not capable of creating static/shared versions of the same
39 # convenience lib, so we have to do it ourselves
40 #
41 if SUPPORT_SGEN
42 if DISABLE_EXECUTABLES
43 shared_sgen_libraries = libmonoruntimesgen.la 
44 else
45 if SHARED_MONO
46 shared_sgen_libraries = libmonoruntimesgen.la 
47 endif
48 endif
49 sgen_libraries = $(shared_sgen_libraries) libmonoruntimesgen-static.la 
50 endif
51
52 if SUPPORT_BOEHM
53 if DISABLE_EXECUTABLES
54 shared_boehm_libraries = libmonoruntime.la
55 else
56 if SHARED_MONO
57 shared_boehm_libraries = libmonoruntime.la
58 endif
59 endif
60 boehm_libraries = $(shared_boehm_libraries) libmonoruntime-static.la
61 endif
62
63 if DISABLE_EXECUTABLES
64 noinst_LTLIBRARIES = $(shared_sgen_libraries) $(shared_boehm_libraries)
65 else
66 noinst_LTLIBRARIES = $(boehm_libraries) $(sgen_libraries)
67 endif
68
69 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
70
71 #
72 # Make sure any prefix changes are updated in the binaries too.
73 #
74 #  assembly.c uses MONO_ASSEMBLIES
75 #  mono-config.c uses MONO_CFG_DIR
76 #
77 # This won't result in many more false positives than AC_DEFINEing them
78 # in configure.ac.
79 #
80 assembly.lo mono-config.lo: Makefile
81
82 CLEANFILES = mono-bundle.stamp
83
84 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
85
86 null_sources = \
87         console-null.c
88
89 null_gc_sources = \
90         null-gc.c
91
92 common_sources = \
93         $(platform_sources)     \
94         assembly.c              \
95         attach.h                \
96         attach.c                \
97         char-conversions.h      \
98         cil-coff.h              \
99         class.c                 \
100         class-internals.h       \
101         cominterop.c            \
102         cominterop.h            \
103         console-io.h            \
104         coree.c                 \
105         coree.h                 \
106         culture-info.h          \
107         culture-info-tables.h   \
108         debug-helpers.c         \
109         debug-mono-symfile.h    \
110         debug-mono-symfile.c    \
111         decimal.c               \
112         decimal.h               \
113         decimal-ms.c            \
114         decimal-ms.h            \
115         domain-internals.h      \
116         environment.c           \
117         environment.h           \
118         exception.c             \
119         exception.h             \
120         file-io.c               \
121         file-io.h               \
122         filewatcher.c           \
123         filewatcher.h           \
124         gc-internal.h           \
125         gc-memfuncs.c           \
126         icall.c                 \
127         icall-def.h             \
128         image.c                 \
129         jit-info.c              \
130         loader.c                \
131         locales.c               \
132         locales.h               \
133         lock-tracer.c           \
134         lock-tracer.h           \
135         marshal.c               \
136         marshal.h               \
137         mempool.c               \
138         mempool.h               \
139         mempool-internals.h     \
140         metadata.c              \
141         metadata-verify.c       \
142         metadata-internals.h    \
143         method-builder.h        \
144         method-builder.c        \
145         mono-basic-block.c      \
146         mono-basic-block.h      \
147         mono-config.c           \
148         mono-cq.c               \
149         mono-cq.h               \
150         mono-debug.h            \
151         mono-debug.c            \
152         mono-debug-debugger.h   \
153         mono-endian.c           \
154         mono-endian.h           \
155         mono-hash.h             \
156         mono-mlist.c            \
157         mono-mlist.h            \
158         mono-perfcounters.c     \
159         mono-perfcounters.h     \
160         mono-perfcounters-def.h \
161         mono-ptr-array.h        \
162         mono-route.c            \
163         mono-route.h            \
164         mono-wsq.c              \
165         mono-wsq.h              \
166         monitor.h               \
167         nacl-stub.c             \
168         normalization-tables.h  \
169         number-formatter.h      \
170         object-internals.h      \
171         opcodes.c               \
172         socket-io.c             \
173         socket-io.h             \
174         process.c               \
175         process.h               \
176         profiler.c              \
177         profiler-private.h      \
178         rand.h                  \
179         rand.c                  \
180         remoting.h              \
181         remoting.c              \
182         runtime.c               \
183         mono-security.c         \
184         security.h              \
185         security-core-clr.c     \
186         security-core-clr.h     \
187         security-manager.c      \
188         security-manager.h      \
189         string-icalls.c         \
190         string-icalls.h         \
191         sysmath.h               \
192         sysmath.c               \
193         tabledefs.h             \
194         threads.c               \
195         threads-types.h         \
196         threadpool.c            \
197         threadpool.h            \
198         threadpool-internals.h  \
199         tpool-poll.c    \
200         verify.c                \
201         verify-internals.h      \
202         wrapper-types.h \
203         reflection-internals.h  \
204         file-mmap-posix.c       \
205         file-mmap-windows.c     \
206         file-mmap.h     \
207         object-offsets.h        \
208         abi-details.h   \
209         metadata-cross-helpers.c
210
211
212 # These source files have compile time dependencies on GC code
213 gc_dependent_sources = \
214         appdomain.c     \
215         domain.c        \
216         gc.c            \
217         monitor.c       \
218         mono-hash.c     \
219         object.c        \
220         reflection.c
221
222 boehm_sources = \
223         boehm-gc.c
224
225 sgen_sources = \
226         sgen-os-posix.c         \
227         sgen-os-mach.c          \
228         sgen-os-win32.c         \
229         sgen-gc.c               \
230         sgen-internal.c         \
231         sgen-marksweep.c        \
232         sgen-los.c              \
233         sgen-protocol.c \
234         sgen-bridge.c           \
235         sgen-bridge.h           \
236         sgen-old-bridge.c               \
237         sgen-new-bridge.c               \
238         sgen-tarjan-bridge.c            \
239         sgen-toggleref.c                \
240         sgen-toggleref.h                \
241         sgen-gc.h               \
242         sgen-conf.h             \
243         sgen-archdep.h          \
244         sgen-cardtable.c        \
245         sgen-cardtable.h        \
246         sgen-pointer-queue.c    \
247         sgen-pointer-queue.h    \
248         sgen-pinning.c  \
249         sgen-pinning.h  \
250         sgen-pinning-stats.c    \
251         sgen-workers.c  \
252         sgen-workers.h  \
253         sgen-gray.c     \
254         sgen-gray.h     \
255         sgen-major-copy-object.h \
256         sgen-minor-copy-object.h \
257         sgen-copy-object.h \
258         sgen-marksweep-scan-object-concurrent.h \
259         sgen-minor-scan-object.h \
260         sgen-marksweep-drain-gray-stack.h       \
261         sgen-protocol.h         \
262         sgen-protocol-def.h             \
263         sgen-scan-object.h      \
264         sgen-nursery-allocator.c        \
265         sgen-hash-table.c       \
266         sgen-hash-table.h       \
267         sgen-descriptor.c               \
268         sgen-descriptor.h               \
269         sgen-alloc.c            \
270         sgen-debug.c            \
271         sgen-simple-nursery.c   \
272         sgen-split-nursery.c    \
273         sgen-memory-governor.c  \
274         sgen-memory-governor.h  \
275         sgen-stw.c                              \
276         sgen-fin-weak-hash.c    \
277         sgen-layout-stats.c     \
278         sgen-layout-stats.h     \
279         sgen-qsort.c    \
280         sgen-qsort.h    \
281         sgen-tagged-pointer.h
282
283 libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
284 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
285
286 libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
287 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
288
289 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
290 libmonoruntime_static_la_LDFLAGS = -static
291 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
292
293 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntimesgen_la_SOURCES)
294 libmonoruntimesgen_static_la_LDFLAGS = -static
295 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
296
297 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
298
299 libmonoruntimeinclude_HEADERS = \
300         assembly.h              \
301         attrdefs.h              \
302         appdomain.h             \
303         blob.h                  \
304         class.h                 \
305         debug-helpers.h         \
306         debug-mono-symfile.h    \
307         threads.h               \
308         environment.h           \
309         exception.h             \
310         image.h                 \
311         loader.h                \
312         metadata.h              \
313         mono-config.h           \
314         mono-debug.h            \
315         mono-gc.h               \
316         sgen-bridge.h           \
317         object.h                \
318         opcodes.h               \
319         profiler.h              \
320         reflection.h            \
321         row-indexes.h           \
322         tokentype.h             \
323         verify.h                
324
325 if DTRACE_G_REQUIRED
326
327 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
328
329 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
330         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
331         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
332
333 else
334 PEDUMP_DTRACE_OBJECT = 
335 endif
336
337 if SHARED_MONO
338 if SUPPORT_BOEHM
339 pedump_SOURCES =                \
340         pedump.c
341
342 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
343         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV) $(PEDUMP_DTRACE_OBJECT)
344
345 if PLATFORM_DARWIN
346 pedump_LDFLAGS=-framework CoreFoundation -framework Foundation
347 endif
348 endif
349 endif
350
351 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
352                 tpool-poll.c tpool-epoll.c tpool-kqueue.c