reapply
[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 assembliesdir = `cygpath -m "${libdir}"`
6 confdir = `cygpath -m "${sysconfdir}"`
7 export HOST_CC
8 else
9 # The mingw math.h has "extern inline" functions that dont appear in libs, so
10 # optimisation is required to actually inline them
11 AM_CFLAGS = -O
12 assembliesdir = $(exec_prefix)/lib
13 confdir = $(sysconfdir)
14 endif
15
16 bin_PROGRAMS = pedump monodiet
17
18 #
19 # libtool is not capable of creating static/shared versions of the same
20 # convenience lib, so we have to do it ourselves
21 #
22 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
23
24 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) $(GMODULE_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
25
26 #
27 # Make sure any prefix changes are updated in the binaries too.
28 #
29 #  assembly.c uses MONO_ASSEMBLIES
30 #  mono-config.c uses MONO_CFG_DIR
31 #
32 # This won't result in many more false positives than AC_DEFINEing them
33 # in configure.in.
34 #
35 assembly.lo mono-config.lo: Makefile
36
37 CLEANFILES = mono-bundle.stamp
38
39 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
40
41 libmonoruntime_la_SOURCES = \
42         reflection.c    \
43         object.c        \
44         object-internals.h      \
45         icall.c         \
46         char-conversions.h \
47         decimal.c       \
48         decimal.h       \
49         boehm-gc.c      \
50         null-gc.c       \
51         sgen-gc.c       \
52         sgen-gc.h       \
53         gc.c            \
54         gc-internal.h   \
55         marshal.c       \
56         marshal.h       \
57         monitor.c       \
58         monitor.h       \
59         tabledefs.h \
60         threads.c       \
61         threads-types.h \
62         threadpool.c    \
63         threadpool.h    \
64         threadpool-internals.h  \
65         file-io.c       \
66         file-io.h       \
67         socket-io.c     \
68         socket-io.h     \
69         exception.c     \
70         exception.h     \
71         appdomain.c     \
72         debug-mono-symfile.h    \
73         debug-mono-symfile.c    \
74         mono-debug.h            \
75         mono-debug.c            \
76         mono-debug-debugger.h   \
77         mono-debug-debugger.c   \
78         profiler.c      \
79         profiler-private.h      \
80         rand.h          \
81         rand.c          \
82         security.c      \
83         security.h      \
84         string-icalls.c \
85         string-icalls.h \
86         sysmath.h       \
87         sysmath.c       \
88         process.c       \
89         process.h       \
90         environment.c   \
91         environment.h   \
92         locales.c       \
93         locales.h       \
94         normalization-tables.h  \
95         filewatcher.c   \
96         filewatcher.h   \
97         culture-info.h  \
98         culture-info-tables.h   \
99         security-manager.c      \
100         security-manager.h      \
101         console-io.c            \
102         console-io.h    \
103         assembly.c      \
104         domain.c        \
105         domain-internals.h      \
106         opcodes.c       \
107         image.c         \
108         cil-coff.h      \
109         metadata.c      \
110         metadata-internals.h    \
111         verify.c        \
112         mono-endian.c   \
113         mono-endian.h   \
114         mono-config.c   \
115         mono-config.h   \
116         rawbuffer.c     \
117         rawbuffer.h     \
118         loader.c        \
119         class.c         \
120         class-internals.h               \
121         mempool.c       \
122         debug-helpers.c
123
124 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
125
126 libmonoruntime_static_la_LDFLAGS = -static
127
128 libmonoruntimeincludedir = $(includedir)/mono/metadata
129
130 libmonoruntimeinclude_HEADERS = \
131         appdomain.h     \
132         mono-debug.h    \
133         mono-gc.h       \
134         debug-mono-symfile.h    \
135         threads.h       \
136         environment.h   \
137         assembly.h      \
138         opcodes.h       \
139         blob.h          \
140         image.h         \
141         metadata.h      \
142         verify.h        \
143         reflection.h    \
144         row-indexes.h   \
145         tokentype.h     \
146         loader.h        \
147         class.h         \
148         object.h        \
149         exception.h     \
150         profiler.h      \
151         appdomain.h     \
152         debug-helpers.h \
153         mempool.h
154
155 pedump_SOURCES =                \
156         pedump.c
157
158 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
159         $(LIBGC_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) -lm
160
161 monodiet_SOURCES = monodiet.c
162
163 monodiet_LDADD = \
164         libmonoruntime.la       \
165         ../io-layer/libwapi.la          \
166         ../utils/libmonoutils.la        \
167         $(LIBGC_LIBS)                   \
168         $(GLIB_LIBS)                    \
169         $(GMODULE_LIBS)                 \
170         $(ICU_LIBS)                     \
171         -lm
172
173 EXTRA_DIST = make-bundle.pl sample-bundle
174