2010-01-20 Zoltan Varga <vargaz@gmail.com>
[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 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
38
39 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
40
41 #
42 # Make sure any prefix changes are updated in the binaries too.
43 #
44 #  assembly.c uses MONO_ASSEMBLIES
45 #  mono-config.c uses MONO_CFG_DIR
46 #
47 # This won't result in many more false positives than AC_DEFINEing them
48 # in configure.in.
49 #
50 assembly.lo mono-config.lo: Makefile
51
52 CLEANFILES = mono-bundle.stamp
53
54 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
55
56 null_sources = \
57         console-null.c
58
59 sgen_sources = \
60         sgen-gray.c     \
61         sgen-pinning.c  \
62         sgen-pinning-stats.c
63
64 libmonoruntime_la_SOURCES = \
65         $(platform_sources)     \
66         appdomain.c             \
67         assembly.c              \
68         attach.h                \
69         attach.c                \
70         boehm-gc.c              \
71         char-conversions.h      \
72         cil-coff.h              \
73         class.c                 \
74         class-internals.h       \
75         cominterop.c            \
76         cominterop.h            \
77         console-io.h            \
78         coree.c                 \
79         coree.h                 \
80         culture-info.h          \
81         culture-info-tables.h   \
82         debug-helpers.c         \
83         debug-mono-symfile.h    \
84         debug-mono-symfile.c    \
85         decimal.c               \
86         decimal.h               \
87         domain.c                \
88         domain-internals.h      \
89         environment.c           \
90         environment.h           \
91         exception.c             \
92         exception.h             \
93         file-io.c               \
94         file-io.h               \
95         filewatcher.c           \
96         filewatcher.h           \
97         gc.c                    \
98         gc-internal.h           \
99         generic-sharing.c       \
100         icall.c                 \
101         icall-def.h             \
102         image.c                 \
103         loader.c                \
104         locales.c               \
105         locales.h               \
106         lock-tracer.c           \
107         lock-tracer.h           \
108         marshal.c               \
109         marshal.h               \
110         mempool.c               \
111         mempool-internals.h     \
112         metadata.c              \
113         metadata-verify.c       \
114         metadata-internals.h    \
115         method-builder.h        \
116         method-builder.c        \
117         mono-config.c           \
118         mono-debug.h            \
119         mono-debug.c            \
120         mono-debug-debugger.h   \
121         mono-debug-debugger.c   \
122         mono-endian.c           \
123         mono-endian.h           \
124         mono-mlist.c            \
125         mono-mlist.h            \
126         mono-perfcounters.c     \
127         mono-perfcounters.h     \
128         mono-perfcounters-def.h \
129         monitor.c               \
130         monitor.h               \
131         normalization-tables.h  \
132         null-gc.c               \
133         number-formatter.h      \
134         object.c                \
135         object-internals.h      \
136         opcodes.c               \
137         socket-io.c             \
138         socket-io.h             \
139         process.c               \
140         process.h               \
141         profiler.c              \
142         profiler-private.h      \
143         rand.h                  \
144         rand.c                  \
145         reflection.c            \
146         security.c              \
147         security.h              \
148         security-core-clr.c     \
149         security-core-clr.h     \
150         security-manager.c      \
151         security-manager.h      \
152         sgen-gc.c               \
153         sgen-gc.h               \
154         sgen-archdep.h          \
155         sgen-scan-object.h      \
156         string-icalls.c         \
157         string-icalls.h         \
158         sysmath.h               \
159         sysmath.c               \
160         tabledefs.h             \
161         threads.c               \
162         threads-types.h         \
163         threadpool.c            \
164         threadpool.h            \
165         threadpool-internals.h  \
166         verify.c                \
167         verify-internals.h      \
168         wrapper-types.h
169
170 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
171
172 libmonoruntime_static_la_LDFLAGS = -static
173
174 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
175
176 libmonoruntimeinclude_HEADERS = \
177         assembly.h              \
178         attrdefs.h              \
179         appdomain.h             \
180         blob.h                  \
181         class.h                 \
182         debug-helpers.h         \
183         debug-mono-symfile.h    \
184         threads.h               \
185         environment.h           \
186         exception.h             \
187         image.h                 \
188         loader.h                \
189         mempool.h               \
190         metadata.h              \
191         mono-config.h           \
192         mono-debug.h            \
193         mono-gc.h               \
194         object.h                \
195         opcodes.h               \
196         profiler.h              \
197         reflection.h            \
198         row-indexes.h           \
199         tokentype.h             \
200         verify.h                
201
202 if DTRACE_G_REQUIRED
203
204 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
205
206 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
207         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
208         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
209
210 else
211 PEDUMP_DTRACE_OBJECT = 
212 endif
213
214 pedump_SOURCES =                \
215         pedump.c
216
217 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
218         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
219
220 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources)
221