System.Drawing: added email to icon and test file headers
[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 SHARED_MONO
43 shared_sgen_libraries = libmonoruntimesgen.la 
44 endif
45 sgen_libraries = $(shared_sgen_libraries) libmonoruntimesgen-static.la 
46 endif
47
48 if SUPPORT_BOEHM
49 if SHARED_MONO
50 shared_boehm_libraries = libmonoruntime.la
51 endif
52 boehm_libraries = $(shared_boehm_libraries) libmonoruntime-static.la
53 endif
54
55 if MOONLIGHT
56 moonlight_libraries = libmonoruntimemoon.la
57 moon-do-build: libmonoruntime-static.la libmonoruntimemoon.la
58 moon-do-clean:
59         -test -z "libmonoruntime-static.la" || rm -f libmonoruntime-static.la
60         -test -z "libmonoruntimemoon.la" || rm -f libmonoruntimemoon.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) $(moonlight_libraries)
67 endif
68
69 INCLUDES = -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.in.
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 sgen_sources = \
90         sgen-fin-weak-hash.c
91
92 libmonoruntime_la_SOURCES = \
93         $(platform_sources)     \
94         appdomain.c             \
95         assembly.c              \
96         attach.h                \
97         attach.c                \
98         boehm-gc.c              \
99         char-conversions.h      \
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         decimal.c               \
114         decimal.h               \
115         domain.c                \
116         domain-internals.h      \
117         environment.c           \
118         environment.h           \
119         exception.c             \
120         exception.h             \
121         file-io.c               \
122         file-io.h               \
123         filewatcher.c           \
124         filewatcher.h           \
125         gc.c                    \
126         gc-internal.h           \
127         icall.c                 \
128         icall-def.h             \
129         image.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-debug-debugger.c   \
154         mono-endian.c           \
155         mono-endian.h           \
156         mono-hash.c             \
157         mono-hash.h             \
158         mono-mlist.c            \
159         mono-mlist.h            \
160         mono-perfcounters.c     \
161         mono-perfcounters.h     \
162         mono-perfcounters-def.h \
163         mono-ptr-array.h        \
164         mono-wsq.c              \
165         mono-wsq.h              \
166         monitor.c               \
167         monitor.h               \
168         nacl-stub.c             \
169         normalization-tables.h  \
170         null-gc.c               \
171         number-formatter.h      \
172         object.c                \
173         object-internals.h      \
174         opcodes.c               \
175         socket-io.c             \
176         socket-io.h             \
177         process.c               \
178         process.h               \
179         profiler.c              \
180         profiler-private.h      \
181         rand.h                  \
182         rand.c                  \
183         runtime.c               \
184         reflection.c            \
185         security.c              \
186         security.h              \
187         security-core-clr.c     \
188         security-core-clr.h     \
189         security-manager.c      \
190         security-manager.h      \
191         sgen-os-posix.c         \
192         sgen-os-mach.c          \
193         sgen-os-win32.c         \
194         sgen-gc.c               \
195         sgen-internal.c         \
196         sgen-pinned-allocator.c \
197         sgen-marksweep.c        \
198         sgen-marksweep-fixed.c  \
199         sgen-marksweep-par.c    \
200         sgen-marksweep-fixed-par.c      \
201         sgen-major-copying.c    \
202         sgen-los.c              \
203         sgen-protocol.c \
204         sgen-bridge.c           \
205         sgen-bridge.h           \
206         sgen-toggleref.c                \
207         sgen-toggleref.h                \
208         sgen-gc.h               \
209         sgen-conf.h             \
210         sgen-archdep.h          \
211         sgen-cardtable.c        \
212         sgen-cardtable.h        \
213         sgen-ssb.c      \
214         sgen-ssb.h      \
215         sgen-pinning.c  \
216         sgen-pinning.h  \
217         sgen-pinning-stats.c    \
218         sgen-workers.c  \
219         sgen-workers.h  \
220         sgen-gray.c     \
221         sgen-gray.h     \
222         sgen-major-copy-object.h \
223         sgen-minor-copy-object.h \
224         sgen-copy-object.h \
225         sgen-major-scan-object.h \
226         sgen-minor-scan-object.h \
227         sgen-protocol.h         \
228         sgen-scan-object.h      \
229         sgen-nursery-allocator.c        \
230         sgen-hash-table.c       \
231         sgen-descriptor.c               \
232         sgen-descriptor.h               \
233         sgen-alloc.c            \
234         sgen-debug.c            \
235         sgen-simple-nursery.c   \
236         sgen-split-nursery.c    \
237         string-icalls.c         \
238         string-icalls.h         \
239         sysmath.h               \
240         sysmath.c               \
241         tabledefs.h             \
242         threads.c               \
243         threads-types.h         \
244         threadpool.c            \
245         threadpool.h            \
246         threadpool-internals.h  \
247         verify.c                \
248         verify-internals.h      \
249         wrapper-types.h
250
251 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
252
253 if MOONLIGHT
254 libmonoruntimemoon_la_SOURCES = $(libmonoruntime_la_SOURCES)
255 if MOONLIGHT_BOEHM
256 libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(BOEHM_DEFINES)
257 else
258 libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(SGEN_DEFINES)
259 endif
260 endif
261
262 libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_SOURCES)
263 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
264
265 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
266 libmonoruntime_static_la_LDFLAGS = -static
267 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
268
269 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
270 libmonoruntimesgen_static_la_LDFLAGS = -static
271 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
272
273 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
274
275 libmonoruntimeinclude_HEADERS = \
276         assembly.h              \
277         attrdefs.h              \
278         appdomain.h             \
279         blob.h                  \
280         class.h                 \
281         debug-helpers.h         \
282         debug-mono-symfile.h    \
283         threads.h               \
284         environment.h           \
285         exception.h             \
286         image.h                 \
287         loader.h                \
288         metadata.h              \
289         mono-config.h           \
290         mono-debug.h            \
291         mono-gc.h               \
292         sgen-bridge.h           \
293         object.h                \
294         opcodes.h               \
295         profiler.h              \
296         reflection.h            \
297         row-indexes.h           \
298         tokentype.h             \
299         verify.h                
300
301 if DTRACE_G_REQUIRED
302
303 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
304
305 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
306         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
307         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
308
309 else
310 PEDUMP_DTRACE_OBJECT = 
311 endif
312
313 if SHARED_MONO
314 if SUPPORT_BOEHM
315 pedump_SOURCES =                \
316         pedump.c
317
318 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
319         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV) $(PEDUMP_DTRACE_OBJECT)
320
321 if PLATFORM_DARWIN
322 pedump_LDFLAGS=-framework CoreFoundation
323 endif
324 endif
325 endif
326
327 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h \
328                 tpool-poll.c tpool-epoll.c tpool-kqueue.c
329