[reflection] Divide reflection.c into multiple files. NFC
[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 PLATFORM_ANDROID
32 platform_sources += ../../support/libm/complex.c
33 endif
34
35 #
36 # libtool is not capable of creating static/shared versions of the same
37 # convenience lib, so we have to do it ourselves
38 #
39 if SUPPORT_SGEN
40 if DISABLE_EXECUTABLES
41 shared_sgen_libraries = libmonoruntimesgen.la 
42 else
43 if SHARED_MONO
44 shared_sgen_libraries = libmonoruntimesgen.la 
45 endif
46 endif
47 sgen_libraries = $(shared_sgen_libraries) libmonoruntimesgen-static.la 
48 endif
49
50 if SUPPORT_BOEHM
51 if DISABLE_EXECUTABLES
52 shared_boehm_libraries = libmonoruntime.la
53 else
54 if SHARED_MONO
55 shared_boehm_libraries = libmonoruntime.la
56 endif
57 endif
58 boehm_libraries = $(shared_boehm_libraries) libmonoruntime-static.la
59 endif
60
61 if DISABLE_EXECUTABLES
62 noinst_LTLIBRARIES = libmonoruntime-config.la $(shared_sgen_libraries) $(shared_boehm_libraries)
63 else
64 noinst_LTLIBRARIES = libmonoruntime-config.la $(boehm_libraries) $(sgen_libraries)
65 endif
66
67 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS)
68
69 #
70 # Make sure any prefix changes are updated in the binaries too.
71 #
72 # This won't result in many more false positives than AC_DEFINEing them
73 # in configure.ac.
74 #
75 mono-config-dirs.lo: Makefile
76
77 #
78 # This library is used to localize the usage of MONO_BINDIR etc. to just one source file, thus enabling
79 # ccache to work even if the value of these defines change. We need to use a convenience library since automake
80 # doesn't support per file cflags.
81 #
82 libmonoruntime_config_la_SOURCES = \
83         mono-config-dirs.h              \
84         mono-config-dirs.c
85 libmonoruntime_config_la_CPPFLAGS = $(AM_CPPFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
86
87 CLEANFILES = mono-bundle.stamp
88
89 null_sources = \
90         console-null.c
91
92 null_gc_sources = \
93         null-gc.c
94
95 common_sources = \
96         $(platform_sources)     \
97         assembly.c              \
98         attach.h                \
99         attach.c                \
100         cil-coff.h              \
101         class.c                 \
102         class-internals.h       \
103         cominterop.c            \
104         cominterop.h            \
105         console-io.h            \
106         coree.c                 \
107         coree.h                 \
108         culture-info.h          \
109         culture-info-tables.h   \
110         debug-helpers.c         \
111         debug-mono-symfile.h    \
112         debug-mono-symfile.c    \
113         debug-mono-ppdb.h       \
114         debug-mono-ppdb.c       \
115         decimal-ms.c            \
116         decimal-ms.h            \
117         domain-internals.h      \
118         environment.c           \
119         environment.h           \
120         exception.c             \
121         exception.h             \
122         exception-internals.h   \
123         file-io.c               \
124         file-io.h               \
125         filewatcher.c           \
126         filewatcher.h           \
127         gc-internals.h          \
128         icall.c                 \
129         icall-def.h             \
130         image.c                 \
131         image-internals.h       \
132         jit-info.c              \
133         loader.c                \
134         locales.c               \
135         locales.h               \
136         lock-tracer.c           \
137         lock-tracer.h           \
138         marshal.c               \
139         marshal.h               \
140         mempool.c               \
141         mempool.h               \
142         mempool-internals.h     \
143         metadata.c              \
144         metadata-verify.c       \
145         metadata-internals.h    \
146         method-builder.h        \
147         method-builder.c        \
148         mono-basic-block.c      \
149         mono-basic-block.h      \
150         mono-config.c           \
151         mono-debug.h            \
152         mono-debug.c            \
153         mono-debug-debugger.h   \
154         mono-endian.c           \
155         mono-endian.h           \
156         mono-hash.h             \
157         mono-mlist.c            \
158         mono-mlist.h            \
159         mono-perfcounters.c     \
160         mono-perfcounters.h     \
161         mono-perfcounters-def.h \
162         mono-ptr-array.h        \
163         mono-route.c            \
164         mono-route.h            \
165         monitor.h               \
166         nacl-stub.c             \
167         normalization-tables.h  \
168         number-formatter.h      \
169         number-ms.c             \
170         number-ms.h             \
171         object-internals.h      \
172         opcodes.c               \
173         socket-io.c             \
174         socket-io.h             \
175         process.c               \
176         process.h               \
177         profiler.c              \
178         profiler-private.h      \
179         rand.h                  \
180         rand.c                  \
181         remoting.h              \
182         remoting.c              \
183         runtime.c               \
184         mono-security.c         \
185         security.h              \
186         security-core-clr.c     \
187         security-core-clr.h     \
188         security-manager.c      \
189         security-manager.h      \
190         string-icalls.c         \
191         string-icalls.h         \
192         sysmath.h               \
193         sysmath.c               \
194         tabledefs.h             \
195         threads.c               \
196         threads-types.h         \
197         threadpool-ms.c \
198         threadpool-ms.h \
199         threadpool-ms-io.c      \
200         threadpool-ms-io.h      \
201         verify.c                \
202         verify-internals.h      \
203         wrapper-types.h \
204         reflection-cache.h      \
205         reflection-custom-attrs-internals.h     \
206         reflection-emit-internals.h     \
207         reflection-internals.h  \
208         file-mmap-posix.c       \
209         file-mmap-windows.c     \
210         file-mmap.h     \
211         object-offsets.h        \
212         abi-details.h   \
213         metadata-cross-helpers.c        \
214         seq-points-data.h       \
215         seq-points-data.c       \
216         handle.c        \
217         handle.h
218
219
220 # These source files have compile time dependencies on GC code
221 gc_dependent_sources = \
222         appdomain.c     \
223         domain.c        \
224         gc-stats.c      \
225         gc.c            \
226         monitor.c       \
227         mono-hash.c     \
228         object.c        \
229         reflection.c \
230         reflection-custom-attrs.c       \
231         reflection-query.c
232
233
234 boehm_sources = \
235         boehm-gc.c
236
237 sgen_sources = \
238         sgen-os-posix.c         \
239         sgen-os-mach.c          \
240         sgen-os-win32.c         \
241         sgen-os-coop.c          \
242         sgen-bridge.c           \
243         sgen-bridge.h           \
244         sgen-bridge-internals.h \
245         sgen-old-bridge.c               \
246         sgen-new-bridge.c               \
247         sgen-tarjan-bridge.c            \
248         sgen-toggleref.c                \
249         sgen-toggleref.h                \
250         sgen-stw.c                              \
251         sgen-mono.c             \
252         sgen-client-mono.h
253
254 libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
255 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
256 libmonoruntime_la_LIBADD = libmonoruntime-config.la
257
258 libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
259 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
260 libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la
261
262 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
263 libmonoruntime_static_la_LDFLAGS = -static
264 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
265 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
266
267 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntimesgen_la_SOURCES)
268 libmonoruntimesgen_static_la_LDFLAGS = -static
269 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
270 libmonoruntimesgen_static_la_LIBADD = $(libmonoruntimesgen_la_LIBADD)
271
272 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
273
274 libmonoruntimeinclude_HEADERS = \
275         assembly.h              \
276         attrdefs.h              \
277         appdomain.h             \
278         blob.h                  \
279         class.h                 \
280         debug-helpers.h         \
281         debug-mono-symfile.h    \
282         threads.h               \
283         environment.h           \
284         exception.h             \
285         image.h                 \
286         loader.h                \
287         metadata.h              \
288         mono-config.h           \
289         mono-debug.h            \
290         mono-gc.h               \
291         sgen-bridge.h           \
292         object.h                \
293         opcodes.h               \
294         profiler.h              \
295         reflection.h            \
296         row-indexes.h           \
297         tokentype.h             \
298         verify.h                
299
300 EXTRA_DIST = $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
301                 threadpool-ms-io-poll.c threadpool-ms-io-epoll.c threadpool-ms-io-kqueue.c sgen-dynarray.h