If the window manager does not support _NET_ACTIVE_WINDOW, fall back to XGetInputFocus
[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 noinst_LTLIBRARIES = $(boehm_libraries) $(sgen_libraries) $(moonlight_libraries)
64
65 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
66
67 #
68 # Make sure any prefix changes are updated in the binaries too.
69 #
70 #  assembly.c uses MONO_ASSEMBLIES
71 #  mono-config.c uses MONO_CFG_DIR
72 #
73 # This won't result in many more false positives than AC_DEFINEing them
74 # in configure.in.
75 #
76 assembly.lo mono-config.lo: Makefile
77
78 CLEANFILES = mono-bundle.stamp
79
80 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
81
82 null_sources = \
83         console-null.c
84
85 sgen_sources = \
86         sgen-fin-weak-hash.c
87
88 libmonoruntime_la_SOURCES = \
89         $(platform_sources)     \
90         appdomain.c             \
91         assembly.c              \
92         attach.h                \
93         attach.c                \
94         boehm-gc.c              \
95         char-conversions.h      \
96         cil-coff.h              \
97         class.c                 \
98         class-internals.h       \
99         cominterop.c            \
100         cominterop.h            \
101         console-io.h            \
102         coree.c                 \
103         coree.h                 \
104         culture-info.h          \
105         culture-info-tables.h   \
106         debug-helpers.c         \
107         debug-mono-symfile.h    \
108         debug-mono-symfile.c    \
109         decimal.c               \
110         decimal.h               \
111         domain.c                \
112         domain-internals.h      \
113         environment.c           \
114         environment.h           \
115         exception.c             \
116         exception.h             \
117         file-io.c               \
118         file-io.h               \
119         filewatcher.c           \
120         filewatcher.h           \
121         gc.c                    \
122         gc-internal.h           \
123         icall.c                 \
124         icall-def.h             \
125         image.c                 \
126         loader.c                \
127         locales.c               \
128         locales.h               \
129         lock-tracer.c           \
130         lock-tracer.h           \
131         marshal.c               \
132         marshal.h               \
133         mempool.c               \
134         mempool.h               \
135         mempool-internals.h     \
136         metadata.c              \
137         metadata-verify.c       \
138         metadata-internals.h    \
139         method-builder.h        \
140         method-builder.c        \
141         mono-basic-block.c      \
142         mono-basic-block.h      \
143         mono-config.c           \
144         mono-cq.c               \
145         mono-cq.h               \
146         mono-debug.h            \
147         mono-debug.c            \
148         mono-debug-debugger.h   \
149         mono-debug-debugger.c   \
150         mono-endian.c           \
151         mono-endian.h           \
152         mono-hash.c             \
153         mono-hash.h             \
154         mono-mlist.c            \
155         mono-mlist.h            \
156         mono-perfcounters.c     \
157         mono-perfcounters.h     \
158         mono-perfcounters-def.h \
159         mono-ptr-array.h        \
160         mono-wsq.c              \
161         mono-wsq.h              \
162         monitor.c               \
163         monitor.h               \
164         nacl-stub.c             \
165         normalization-tables.h  \
166         null-gc.c               \
167         number-formatter.h      \
168         object.c                \
169         object-internals.h      \
170         opcodes.c               \
171         socket-io.c             \
172         socket-io.h             \
173         process.c               \
174         process.h               \
175         profiler.c              \
176         profiler-private.h      \
177         rand.h                  \
178         rand.c                  \
179         runtime.c               \
180         reflection.c            \
181         security.c              \
182         security.h              \
183         security-core-clr.c     \
184         security-core-clr.h     \
185         security-manager.c      \
186         security-manager.h      \
187         sgen-os-posix.c         \
188         sgen-os-mach.c          \
189         sgen-os-win32.c         \
190         sgen-gc.c               \
191         sgen-internal.c         \
192         sgen-pinned-allocator.c \
193         sgen-marksweep.c        \
194         sgen-marksweep-fixed.c  \
195         sgen-marksweep-par.c    \
196         sgen-marksweep-fixed-par.c      \
197         sgen-major-copying.c    \
198         sgen-los.c              \
199         sgen-protocol.c \
200         sgen-bridge.c           \
201         sgen-bridge.h           \
202         sgen-toggleref.c                \
203         sgen-toggleref.h                \
204         sgen-gc.h               \
205         sgen-conf.h             \
206         sgen-archdep.h          \
207         sgen-cardtable.c        \
208         sgen-cardtable.h        \
209         sgen-ssb.c      \
210         sgen-ssb.h      \
211         sgen-pinning.c  \
212         sgen-pinning.h  \
213         sgen-pinning-stats.c    \
214         sgen-workers.c  \
215         sgen-workers.h  \
216         sgen-gray.c     \
217         sgen-gray.h     \
218         sgen-major-copy-object.h \
219         sgen-major-scan-object.h \
220         sgen-protocol.h         \
221         sgen-scan-object.h      \
222         sgen-nursery-allocator.c        \
223         sgen-hash-table.c       \
224         sgen-descriptor.c               \
225         sgen-descriptor.h               \
226         sgen-alloc.c            \
227         sgen-debug.c            \
228         string-icalls.c         \
229         string-icalls.h         \
230         sysmath.h               \
231         sysmath.c               \
232         tabledefs.h             \
233         threads.c               \
234         threads-types.h         \
235         threadpool.c            \
236         threadpool.h            \
237         threadpool-internals.h  \
238         verify.c                \
239         verify-internals.h      \
240         wrapper-types.h
241
242 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
243
244 if MOONLIGHT
245 libmonoruntimemoon_la_SOURCES = $(libmonoruntime_la_SOURCES)
246 if MOONLIGHT_BOEHM
247 libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(BOEHM_DEFINES)
248 else
249 libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(SGEN_DEFINES)
250 endif
251 endif
252
253 libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_SOURCES)
254 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
255
256 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
257 libmonoruntime_static_la_LDFLAGS = -static
258 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
259
260 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
261 libmonoruntimesgen_static_la_LDFLAGS = -static
262 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
263
264 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
265
266 libmonoruntimeinclude_HEADERS = \
267         assembly.h              \
268         attrdefs.h              \
269         appdomain.h             \
270         blob.h                  \
271         class.h                 \
272         debug-helpers.h         \
273         debug-mono-symfile.h    \
274         threads.h               \
275         environment.h           \
276         exception.h             \
277         image.h                 \
278         loader.h                \
279         metadata.h              \
280         mono-config.h           \
281         mono-debug.h            \
282         mono-gc.h               \
283         sgen-bridge.h           \
284         object.h                \
285         opcodes.h               \
286         profiler.h              \
287         reflection.h            \
288         row-indexes.h           \
289         tokentype.h             \
290         verify.h                
291
292 if DTRACE_G_REQUIRED
293
294 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
295
296 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
297         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
298         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
299
300 else
301 PEDUMP_DTRACE_OBJECT = 
302 endif
303
304 if SHARED_MONO
305 if SUPPORT_BOEHM
306 pedump_SOURCES =                \
307         pedump.c
308
309 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
310         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV) $(PEDUMP_DTRACE_OBJECT)
311
312 if PLATFORM_DARWIN
313 pedump_LDFLAGS=-framework CoreFoundation
314 endif
315 endif
316 endif
317
318 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h \
319                 tpool-poll.c tpool-epoll.c tpool-kqueue.c
320