2010-02-21 Geoff Norton <gnorton@novell.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-basic-block.c      \
118         mono-basic-block.h      \
119         mono-config.c           \
120         mono-debug.h            \
121         mono-debug.c            \
122         mono-debug-debugger.h   \
123         mono-debug-debugger.c   \
124         mono-endian.c           \
125         mono-endian.h           \
126         mono-mlist.c            \
127         mono-mlist.h            \
128         mono-perfcounters.c     \
129         mono-perfcounters.h     \
130         mono-perfcounters-def.h \
131         monitor.c               \
132         monitor.h               \
133         normalization-tables.h  \
134         null-gc.c               \
135         number-formatter.h      \
136         object.c                \
137         object-internals.h      \
138         opcodes.c               \
139         socket-io.c             \
140         socket-io.h             \
141         process.c               \
142         process.h               \
143         profiler.c              \
144         profiler-private.h      \
145         rand.h                  \
146         rand.c                  \
147         reflection.c            \
148         security.c              \
149         security.h              \
150         security-core-clr.c     \
151         security-core-clr.h     \
152         security-manager.c      \
153         security-manager.h      \
154         sgen-gc.c               \
155         sgen-gc.h               \
156         sgen-archdep.h          \
157         sgen-scan-object.h      \
158         string-icalls.c         \
159         string-icalls.h         \
160         sysmath.h               \
161         sysmath.c               \
162         tabledefs.h             \
163         threads.c               \
164         threads-types.h         \
165         threadpool.c            \
166         threadpool.h            \
167         threadpool-internals.h  \
168         verify.c                \
169         verify-internals.h      \
170         wrapper-types.h
171
172 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
173
174 libmonoruntime_static_la_LDFLAGS = -static
175
176 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
177
178 libmonoruntimeinclude_HEADERS = \
179         assembly.h              \
180         attrdefs.h              \
181         appdomain.h             \
182         blob.h                  \
183         class.h                 \
184         debug-helpers.h         \
185         debug-mono-symfile.h    \
186         threads.h               \
187         environment.h           \
188         exception.h             \
189         image.h                 \
190         loader.h                \
191         mempool.h               \
192         metadata.h              \
193         mono-config.h           \
194         mono-debug.h            \
195         mono-gc.h               \
196         object.h                \
197         opcodes.h               \
198         profiler.h              \
199         reflection.h            \
200         row-indexes.h           \
201         tokentype.h             \
202         verify.h                
203
204 if DTRACE_G_REQUIRED
205
206 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
207
208 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
209         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
210         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
211
212 else
213 PEDUMP_DTRACE_OBJECT = 
214 endif
215
216 pedump_SOURCES =                \
217         pedump.c
218
219 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
220         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
221
222 if PLATFORM_DARWIN
223 pedump_LDFLAGS=-framework CoreFoundation
224 endif
225
226 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources)
227