2004-09-03 Zoltan Varga <vargaz@freemail.hu>
[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 = $(libdir)
14 confdir = $(sysconfdir)
15 endif
16
17 bin_PROGRAMS = pedump
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 = libmetadata.la libmonoruntime.la libmetadata-static.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 if WITH_BUNDLE
30 bundle_srcs = mono-bundle.s mono-bundle.h
31 bundle_obj = mono-bundle.o
32 #BUILT_SOURCES = $(bundle_srcs)
33
34 $(bundle_obj): $(bundle_srcs)
35 $(bundle_srcs): mono-bundle.stamp
36         @if test -f $@; then :; else rm -f mono-bundle.stamp; $(MAKE) mono-bundle.stamp; fi
37 mono-bundle.stamp: $(BUNDLE_FILE) $(srcdir)/make-bundle.pl
38         echo stamp > $@t
39         perl $(srcdir)/make-bundle.pl $(BUNDLE_FILE) mono-bundle.h mono-bundle.s
40         mv $@t $@
41
42 endif
43
44 CLEANFILES = mono-bundle.stamp
45
46 libmetadata_la_LIBADD = $(bundle_obj) $(PLATFORM_LIB)
47
48 libmonoruntime_static_la_LIBADD = $(libmonoruntime_la_LIBADD)
49 libmetadata_static_la_LIBADD = $(libmetadata_la_LIBADD)
50
51 libmonoruntime_la_SOURCES = \
52         reflection.c    \
53         object.c        \
54         object-internals.h      \
55         icall.c         \
56         char-conversions.h \
57         decimal.c       \
58         decimal.h       \
59         gc.c            \
60         gc-internal.h   \
61         marshal.c       \
62         marshal.h       \
63         monitor.c       \
64         monitor.h       \
65         threads.c       \
66         threads-types.h \
67         threadpool.c    \
68         threadpool.h    \
69         file-io.c       \
70         file-io.h       \
71         socket-io.c     \
72         socket-io.h     \
73         exception.c     \
74         exception.h     \
75         unicode.c       \
76         unicode.h       \
77         appdomain.c     \
78         debug-mono-symfile.h    \
79         debug-mono-symfile.c    \
80         mono-debug.h            \
81         mono-debug.c            \
82         mono-debug-debugger.h   \
83         mono-debug-debugger.c   \
84         profiler.c      \
85         profiler-private.h      \
86         rand.h          \
87         rand.c          \
88         security.c      \
89         security.h      \
90         string-icalls.c \
91         string-icalls.h \
92         sysmath.h       \
93         sysmath.c       \
94         process.c       \
95         process.h       \
96         environment.c   \
97         environment.h   \
98         locales.c       \
99         locales.h       \
100         filewatcher.c   \
101         filewatcher.h   \
102         culture-info.h  \
103         culture-info-tables.h
104
105 libmetadata_la_SOURCES = \
106         assembly.c      \
107         domain.c        \
108         domain-internals.h      \
109         opcodes.c       \
110         image.c         \
111         cil-coff.h      \
112         tabledefs.h     \
113         metadata.c      \
114         metadata-internals.h    \
115         verify.c        \
116         mono-endian.c   \
117         mono-endian.h   \
118         mono-config.c   \
119         mono-config.h   \
120         private.h       \
121         rawbuffer.c     \
122         rawbuffer.h     \
123         loader.c        \
124         class.c         \
125         class-internals.h               \
126         mempool.c       \
127         debug-helpers.c
128
129 libmetadata_static_la_SOURCES = $(libmetadata_la_SOURCES)
130 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
131
132 libmetadata_static_la_LDFLAGS = -static
133 libmonoruntime_static_la_LDFLAGS = -static
134
135 libmetadataincludedir = $(includedir)/mono/metadata
136 libmonoruntimeincludedir = $(includedir)/mono/metadata
137
138 libmonoruntimeinclude_HEADERS = \
139         appdomain.h     \
140         mono-debug.h    \
141         mono-debug-debugger.h   \
142         debug-mono-symfile.h    \
143         threads.h       \
144         environment.h
145
146 libmetadatainclude_HEADERS = \
147         assembly.h      \
148         opcodes.h       \
149         blob.h          \
150         image.h         \
151         metadata.h      \
152         verify.h        \
153         reflection.h    \
154         row-indexes.h   \
155         tokentype.h     \
156         loader.h        \
157         class.h         \
158         object.h        \
159         exception.h     \
160         profiler.h      \
161         appdomain.h     \
162         debug-helpers.h \
163         mempool.h
164
165 pedump_SOURCES =                \
166         pedump.c
167
168 pedump_LDADD = libmetadata.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
169         $(LIBGC_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) -lm
170
171 EXTRA_DIST = make-bundle.pl sample-bundle
172