In .:
[mono.git] / mono / metadata / Makefile.am
1 if PLATFORM_WIN32
2 # Use -m here. This will use / as directory separator (C:/WINNT).
3 # The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the
4 # / by \ if running under WIN32.
5 if CROSS_COMPILING
6 assembliesdir = ${libdir}
7 confdir = ${sysconfdir}
8 else
9 assembliesdir = `cygpath -m "${libdir}"`
10 confdir = `cygpath -m "${sysconfdir}"`
11 endif
12 export HOST_CC
13 # The mingw math.h has "extern inline" functions that dont appear in libs, so
14 # optimisation is required to actually inline them
15 AM_CFLAGS = -O
16 else
17 assembliesdir = $(exec_prefix)/lib
18 confdir = $(sysconfdir)
19 endif
20
21 bin_PROGRAMS = pedump
22
23 #
24 # libtool is not capable of creating static/shared versions of the same
25 # convenience lib, so we have to do it ourselves
26 #
27 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
28
29 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
30
31 #
32 # Make sure any prefix changes are updated in the binaries too.
33 #
34 #  assembly.c uses MONO_ASSEMBLIES
35 #  mono-config.c uses MONO_CFG_DIR
36 #
37 # This won't result in many more false positives than AC_DEFINEing them
38 # in configure.in.
39 #
40 assembly.lo mono-config.lo: Makefile
41
42 CLEANFILES = mono-bundle.stamp
43
44 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
45
46 libmonoruntime_la_SOURCES = \
47         reflection.c    \
48         object.c        \
49         object-internals.h      \
50         icall.c         \
51         icall-def.h             \
52         char-conversions.h \
53         decimal.c       \
54         decimal.h       \
55         boehm-gc.c      \
56         null-gc.c       \
57         sgen-gc.c       \
58         sgen-gc.h       \
59         gc.c            \
60         gc-internal.h   \
61         method-builder.h \
62         method-builder.c \
63         marshal.c       \
64         marshal.h       \
65         cominterop.c    \
66         cominterop.h    \
67         mono-mlist.c    \
68         mono-mlist.h    \
69         monitor.c       \
70         monitor.h       \
71         tabledefs.h \
72         threads.c       \
73         threads-types.h \
74         threadpool.c    \
75         threadpool.h    \
76         threadpool-internals.h  \
77         file-io.c       \
78         file-io.h       \
79         socket-io.c     \
80         socket-io.h     \
81         exception.c     \
82         exception.h     \
83         appdomain.c     \
84         debug-mono-symfile.h    \
85         debug-mono-symfile.c    \
86         mono-debug.h            \
87         mono-debug.c            \
88         mono-debug-debugger.h   \
89         mono-debug-debugger.c   \
90         profiler.c      \
91         profiler-private.h      \
92         attach.h        \
93         attach.c        \
94         rand.h          \
95         rand.c          \
96         security.c      \
97         security.h      \
98         security-core-clr.c     \
99         security-core-clr.h     \
100         string-icalls.c \
101         string-icalls.h \
102         sysmath.h       \
103         sysmath.c       \
104         process.c       \
105         process.h       \
106         environment.c   \
107         environment.h   \
108         locales.c       \
109         locales.h       \
110         normalization-tables.h  \
111         filewatcher.c   \
112         filewatcher.h   \
113         culture-info.h  \
114         culture-info-tables.h   \
115         security-manager.c      \
116         security-manager.h      \
117         console-io.c            \
118         console-io.h    \
119         assembly.c      \
120         coree.c \
121         coree.h \
122         domain.c        \
123         domain-internals.h      \
124         opcodes.c       \
125         image.c         \
126         cil-coff.h      \
127         metadata.c      \
128         metadata-internals.h    \
129         number-formatter.h      \
130         verify.c        \
131         verify-internals.h      \
132         mono-endian.c   \
133         mono-endian.h   \
134         mono-config.c   \
135         loader.c        \
136         class.c         \
137         class-internals.h               \
138         wrapper-types.h         \
139         mempool.c       \
140         mono-perfcounters.c     \
141         mono-perfcounters.h     \
142         mono-perfcounters-def.h \
143         debug-helpers.c \
144         generic-sharing.c       \
145         mempool-internals.h     \
146         metadata-verify.c
147
148 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
149
150 libmonoruntime_static_la_LDFLAGS = -static
151
152 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
153
154 libmonoruntimeinclude_HEADERS = \
155         attrdefs.h      \
156         appdomain.h     \
157         mono-debug.h    \
158         mono-gc.h       \
159         debug-mono-symfile.h    \
160         threads.h       \
161         environment.h   \
162         assembly.h      \
163         opcodes.h       \
164         blob.h          \
165         image.h         \
166         metadata.h      \
167         verify.h        \
168         reflection.h    \
169         row-indexes.h   \
170         tokentype.h     \
171         loader.h        \
172         class.h         \
173         object.h        \
174         exception.h     \
175         profiler.h      \
176         appdomain.h     \
177         mono-config.h   \
178         debug-helpers.h \
179         mempool.h
180
181 if DTRACE_G_REQUIRED
182
183 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
184
185 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
186         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
187         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
188
189 else
190 PEDUMP_DTRACE_OBJECT = 
191 endif
192
193 pedump_SOURCES =                \
194         pedump.c
195
196 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
197         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
198
199 EXTRA_DIST = make-bundle.pl sample-bundle
200