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