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