Merge pull request #3451 from BrzVlad/fix-armel-emulation
[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         dynamic-image-internals.h       \
205         dynamic-stream.c        \
206         dynamic-stream-internals.h      \
207         reflection-cache.h      \
208         custom-attrs-internals.h        \
209         sre-internals.h \
210         reflection-internals.h  \
211         file-mmap-posix.c       \
212         file-mmap-windows.c     \
213         file-mmap.h     \
214         object-offsets.h        \
215         abi-details.h   \
216         metadata-cross-helpers.c        \
217         seq-points-data.h       \
218         seq-points-data.c       \
219         handle.c        \
220         handle.h
221
222
223 # These source files have compile time dependencies on GC code
224 gc_dependent_sources = \
225         appdomain.c     \
226         domain.c        \
227         gc-stats.c      \
228         gc.c            \
229         monitor.c       \
230         mono-hash.c     \
231         object.c        \
232         dynamic-image.c \
233         sre.c   \
234         sre-encode.c    \
235         sre-save.c      \
236         custom-attrs.c  \
237         reflection.c
238
239
240 boehm_sources = \
241         boehm-gc.c
242
243 sgen_sources = \
244         sgen-os-posix.c         \
245         sgen-os-mach.c          \
246         sgen-os-win32.c         \
247         sgen-os-coop.c          \
248         sgen-bridge.c           \
249         sgen-bridge.h           \
250         sgen-bridge-internals.h \
251         sgen-old-bridge.c               \
252         sgen-new-bridge.c               \
253         sgen-tarjan-bridge.c            \
254         sgen-toggleref.c                \
255         sgen-toggleref.h                \
256         sgen-stw.c                              \
257         sgen-mono.c             \
258         sgen-client-mono.h
259
260 libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
261 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
262 libmonoruntime_la_LIBADD = libmonoruntime-config.la
263
264 libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
265 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
266 libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la
267
268 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
269 libmonoruntime_static_la_LDFLAGS = -static
270 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
271 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
272
273 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntimesgen_la_SOURCES)
274 libmonoruntimesgen_static_la_LDFLAGS = -static
275 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
276 libmonoruntimesgen_static_la_LIBADD = $(libmonoruntimesgen_la_LIBADD)
277
278 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
279
280 libmonoruntimeinclude_HEADERS = \
281         assembly.h              \
282         attrdefs.h              \
283         appdomain.h             \
284         blob.h                  \
285         class.h                 \
286         debug-helpers.h         \
287         debug-mono-symfile.h    \
288         threads.h               \
289         environment.h           \
290         exception.h             \
291         image.h                 \
292         loader.h                \
293         metadata.h              \
294         mono-config.h           \
295         mono-debug.h            \
296         mono-gc.h               \
297         sgen-bridge.h           \
298         object.h                \
299         opcodes.h               \
300         profiler.h              \
301         reflection.h            \
302         row-indexes.h           \
303         tokentype.h             \
304         verify.h                
305
306 EXTRA_DIST = $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
307                 threadpool-ms-io-poll.c threadpool-ms-io-epoll.c threadpool-ms-io-kqueue.c sgen-dynarray.h