New tests, updates
[mono.git] / mono / metadata / Makefile.am
1 if PLATFORM_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 libmonoruntime_la_SOURCES = \
60         $(platform_sources)     \
61         appdomain.c             \
62         assembly.c              \
63         attach.h                \
64         attach.c                \
65         boehm-gc.c              \
66         char-conversions.h      \
67         cil-coff.h              \
68         class.c                 \
69         class-internals.h       \
70         cominterop.c            \
71         cominterop.h            \
72         console-io.h            \
73         coree.c                 \
74         coree.h                 \
75         culture-info.h          \
76         culture-info-tables.h   \
77         debug-helpers.c         \
78         debug-mono-symfile.h    \
79         debug-mono-symfile.c    \
80         decimal.c               \
81         decimal.h               \
82         domain.c                \
83         domain-internals.h      \
84         environment.c           \
85         environment.h           \
86         exception.c             \
87         exception.h             \
88         file-io.c               \
89         file-io.h               \
90         filewatcher.c           \
91         filewatcher.h           \
92         gc.c                    \
93         gc-internal.h           \
94         generic-sharing.c       \
95         icall.c                 \
96         icall-def.h             \
97         image.c                 \
98         loader.c                \
99         locales.c               \
100         locales.h               \
101         lock-tracer.c           \
102         lock-tracer.h           \
103         marshal.c               \
104         marshal.h               \
105         mempool.c               \
106         mempool-internals.h     \
107         metadata.c              \
108         metadata-verify.c       \
109         metadata-internals.h    \
110         method-builder.h        \
111         method-builder.c        \
112         mono-config.c           \
113         mono-debug.h            \
114         mono-debug.c            \
115         mono-debug-debugger.h   \
116         mono-debug-debugger.c   \
117         mono-endian.c           \
118         mono-endian.h           \
119         mono-mlist.c            \
120         mono-mlist.h            \
121         mono-perfcounters.c     \
122         mono-perfcounters.h     \
123         mono-perfcounters-def.h \
124         monitor.c               \
125         monitor.h               \
126         normalization-tables.h  \
127         null-gc.c               \
128         number-formatter.h      \
129         object.c                \
130         object-internals.h      \
131         opcodes.c               \
132         socket-io.c             \
133         socket-io.h             \
134         process.c               \
135         process.h               \
136         profiler.c              \
137         profiler-private.h      \
138         rand.h                  \
139         rand.c                  \
140         reflection.c            \
141         security.c              \
142         security.h              \
143         security-core-clr.c     \
144         security-core-clr.h     \
145         security-manager.c      \
146         security-manager.h      \
147         sgen-gc.c               \
148         sgen-gc.h               \
149         string-icalls.c         \
150         string-icalls.h         \
151         sysmath.h               \
152         sysmath.c               \
153         tabledefs.h             \
154         threads.c               \
155         threads-types.h         \
156         threadpool.c            \
157         threadpool.h            \
158         threadpool-internals.h  \
159         verify.c                \
160         verify-internals.h      \
161         wrapper-types.h
162
163 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
164
165 libmonoruntime_static_la_LDFLAGS = -static
166
167 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
168
169 libmonoruntimeinclude_HEADERS = \
170         assembly.h              \
171         attrdefs.h              \
172         appdomain.h             \
173         blob.h                  \
174         class.h                 \
175         debug-helpers.h         \
176         debug-mono-symfile.h    \
177         threads.h               \
178         environment.h           \
179         exception.h             \
180         image.h                 \
181         loader.h                \
182         mempool.h               \
183         metadata.h              \
184         mono-config.h           \
185         mono-debug.h            \
186         mono-gc.h               \
187         object.h                \
188         opcodes.h               \
189         profiler.h              \
190         reflection.h            \
191         row-indexes.h           \
192         tokentype.h             \
193         verify.h                
194
195 if DTRACE_G_REQUIRED
196
197 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
198
199 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
200         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
201         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
202
203 else
204 PEDUMP_DTRACE_OBJECT = 
205 endif
206
207 pedump_SOURCES =                \
208         pedump.c
209
210 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
211         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
212
213 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources)
214