Normalize line endings.
[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 bin_PROGRAMS = pedump
32
33 #
34 # libtool is not capable of creating static/shared versions of the same
35 # convenience lib, so we have to do it ourselves
36 #
37 if SUPPORT_SGEN
38 sgen_libraries = libmonoruntimesgen.la libmonoruntimesgen-static.la 
39 endif
40
41 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la $(sgen_libraries)
42
43 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
44
45 #
46 # Make sure any prefix changes are updated in the binaries too.
47 #
48 #  assembly.c uses MONO_ASSEMBLIES
49 #  mono-config.c uses MONO_CFG_DIR
50 #
51 # This won't result in many more false positives than AC_DEFINEing them
52 # in configure.in.
53 #
54 assembly.lo mono-config.lo: Makefile
55
56 CLEANFILES = mono-bundle.stamp
57
58 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
59
60 null_sources = \
61         console-null.c
62
63 sgen_sources = \
64         sgen-gray.c     \
65         sgen-pinning.c  \
66         sgen-pinning-stats.c    \
67         sgen-marksweep.c                \
68         sgen-los.c                              \
69         sgen-protocol.c
70
71 libmonoruntime_la_SOURCES = \
72         $(platform_sources)     \
73         appdomain.c             \
74         assembly.c              \
75         attach.h                \
76         attach.c                \
77         boehm-gc.c              \
78         char-conversions.h      \
79         cil-coff.h              \
80         class.c                 \
81         class-internals.h       \
82         cominterop.c            \
83         cominterop.h            \
84         console-io.h            \
85         coree.c                 \
86         coree.h                 \
87         culture-info.h          \
88         culture-info-tables.h   \
89         debug-helpers.c         \
90         debug-mono-symfile.h    \
91         debug-mono-symfile.c    \
92         decimal.c               \
93         decimal.h               \
94         domain.c                \
95         domain-internals.h      \
96         environment.c           \
97         environment.h           \
98         exception.c             \
99         exception.h             \
100         file-io.c               \
101         file-io.h               \
102         filewatcher.c           \
103         filewatcher.h           \
104         gc.c                    \
105         gc-internal.h           \
106         icall.c                 \
107         icall-def.h             \
108         image.c                 \
109         loader.c                \
110         locales.c               \
111         locales.h               \
112         lock-tracer.c           \
113         lock-tracer.h           \
114         marshal.c               \
115         marshal.h               \
116         mempool.c               \
117         mempool.h               \
118         mempool-internals.h     \
119         metadata.c              \
120         metadata-verify.c       \
121         metadata-internals.h    \
122         method-builder.h        \
123         method-builder.c        \
124         mono-basic-block.c      \
125         mono-basic-block.h      \
126         mono-config.c           \
127         mono-debug.h            \
128         mono-debug.c            \
129         mono-debug-debugger.h   \
130         mono-debug-debugger.c   \
131         mono-endian.c           \
132         mono-endian.h           \
133         mono-hash.c             \
134         mono-hash.h             \
135         mono-mlist.c            \
136         mono-mlist.h            \
137         mono-perfcounters.c     \
138         mono-perfcounters.h     \
139         mono-perfcounters-def.h \
140         mono-ptr-array.h        \
141         mono-wsq.c              \
142         mono-wsq.h              \
143         monitor.c               \
144         monitor.h               \
145         normalization-tables.h  \
146         null-gc.c               \
147         number-formatter.h      \
148         object.c                \
149         object-internals.h      \
150         opcodes.c               \
151         socket-io.c             \
152         socket-io.h             \
153         process.c               \
154         process.h               \
155         profiler.c              \
156         profiler-private.h      \
157         rand.h                  \
158         rand.c                  \
159         runtime.c               \
160         reflection.c            \
161         security.c              \
162         security.h              \
163         security-core-clr.c     \
164         security-core-clr.h     \
165         security-manager.c      \
166         security-manager.h      \
167         sgen-os-posix.c         \
168         sgen-os-mach.c          \
169         sgen-gc.c               \
170         sgen-internal.c         \
171         sgen-gc.h               \
172         sgen-archdep.h          \
173         sgen-scan-object.h      \
174         string-icalls.c         \
175         string-icalls.h         \
176         sysmath.h               \
177         sysmath.c               \
178         tabledefs.h             \
179         threads.c               \
180         threads-types.h         \
181         threadpool.c            \
182         threadpool.h            \
183         threadpool-internals.h  \
184         verify.c                \
185         verify-internals.h      \
186         wrapper-types.h
187
188 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
189
190 libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_SOURCES)
191 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
192
193 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
194 libmonoruntime_static_la_LDFLAGS = -static
195 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
196
197 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
198 libmonoruntimesgen_static_la_LDFLAGS = -static
199 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
200
201 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
202
203 libmonoruntimeinclude_HEADERS = \
204         assembly.h              \
205         attrdefs.h              \
206         appdomain.h             \
207         blob.h                  \
208         class.h                 \
209         debug-helpers.h         \
210         debug-mono-symfile.h    \
211         threads.h               \
212         environment.h           \
213         exception.h             \
214         image.h                 \
215         loader.h                \
216         metadata.h              \
217         mono-config.h           \
218         mono-debug.h            \
219         mono-gc.h               \
220         object.h                \
221         opcodes.h               \
222         profiler.h              \
223         reflection.h            \
224         row-indexes.h           \
225         tokentype.h             \
226         verify.h                
227
228 if DTRACE_G_REQUIRED
229
230 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
231
232 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
233         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
234         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
235
236 else
237 PEDUMP_DTRACE_OBJECT = 
238 endif
239
240 pedump_SOURCES =                \
241         pedump.c
242
243 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
244         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
245
246 if PLATFORM_DARWIN
247 pedump_LDFLAGS=-framework CoreFoundation
248 endif
249
250 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h
251