Disable sockets and a few other things when using NACL.
[mono.git] / mono / metadata / Makefile.am
1 if HOST_WIN32
2 win32_sources = \
3         console-win32.c
4
5 platform_sources = $(win32_sources)
6
7 # Use -m here. This will use / as directory separator (C:/WINNT).
8 # The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the
9 # / by \ if running under WIN32.
10 if CROSS_COMPILING
11 assembliesdir = ${libdir}
12 confdir = ${sysconfdir}
13 else
14 assembliesdir = `cygpath -m "${libdir}"`
15 confdir = `cygpath -m "${sysconfdir}"`
16 endif
17 export HOST_CC
18 # The mingw math.h has "extern inline" functions that dont appear in libs, so
19 # optimisation is required to actually inline them
20 AM_CFLAGS = -O
21 else
22
23 assembliesdir = $(exec_prefix)/lib
24 confdir = $(sysconfdir)
25 unix_sources = \
26         console-unix.c
27
28 platform_sources = $(unix_sources)
29 endif
30
31 bin_PROGRAMS = pedump
32
33 #
34 # libtool is not capable of creating static/shared versions of the same
35 # convenience lib, so we have to do it ourselves
36 #
37 if SUPPORT_SGEN
38 sgen_libraries = libmonoruntimesgen.la libmonoruntimesgen-static.la 
39 endif
40
41 noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la $(sgen_libraries)
42
43 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
44
45 #
46 # Make sure any prefix changes are updated in the binaries too.
47 #
48 #  assembly.c uses MONO_ASSEMBLIES
49 #  mono-config.c uses MONO_CFG_DIR
50 #
51 # This won't result in many more false positives than AC_DEFINEing them
52 # in configure.in.
53 #
54 assembly.lo mono-config.lo: Makefile
55
56 CLEANFILES = mono-bundle.stamp
57
58 libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
59
60 null_sources = \
61         console-null.c
62
63 sgen_sources = \
64         sgen-gray.c             \
65         sgen-pinning.c          \
66         sgen-pinning-stats.c    \
67         sgen-los.c              \
68         sgen-protocol.c         \
69         sgen-workers.c
70
71 libmonoruntime_la_SOURCES = \
72         $(platform_sources)     \
73         appdomain.c             \
74         assembly.c              \
75         attach.h                \
76         attach.c                \
77         boehm-gc.c              \
78         char-conversions.h      \
79         cil-coff.h              \
80         class.c                 \
81         class-internals.h       \
82         cominterop.c            \
83         cominterop.h            \
84         console-io.h            \
85         coree.c                 \
86         coree.h                 \
87         culture-info.h          \
88         culture-info-tables.h   \
89         debug-helpers.c         \
90         debug-mono-symfile.h    \
91         debug-mono-symfile.c    \
92         decimal.c               \
93         decimal.h               \
94         domain.c                \
95         domain-internals.h      \
96         environment.c           \
97         environment.h           \
98         exception.c             \
99         exception.h             \
100         file-io.c               \
101         file-io.h               \
102         filewatcher.c           \
103         filewatcher.h           \
104         gc.c                    \
105         gc-internal.h           \
106         icall.c                 \
107         icall-def.h             \
108         image.c                 \
109         loader.c                \
110         locales.c               \
111         locales.h               \
112         lock-tracer.c           \
113         lock-tracer.h           \
114         marshal.c               \
115         marshal.h               \
116         mempool.c               \
117         mempool.h               \
118         mempool-internals.h     \
119         metadata.c              \
120         metadata-verify.c       \
121         metadata-internals.h    \
122         method-builder.h        \
123         method-builder.c        \
124         mono-basic-block.c      \
125         mono-basic-block.h      \
126         mono-config.c           \
127         mono-debug.h            \
128         mono-debug.c            \
129         mono-debug-debugger.h   \
130         mono-debug-debugger.c   \
131         mono-endian.c           \
132         mono-endian.h           \
133         mono-hash.c             \
134         mono-hash.h             \
135         mono-mlist.c            \
136         mono-mlist.h            \
137         mono-perfcounters.c     \
138         mono-perfcounters.h     \
139         mono-perfcounters-def.h \
140         mono-ptr-array.h        \
141         mono-wsq.c              \
142         mono-wsq.h              \
143         monitor.c               \
144         monitor.h               \
145         nacl-stub.c             \
146         normalization-tables.h  \
147         null-gc.c               \
148         number-formatter.h      \
149         object.c                \
150         object-internals.h      \
151         opcodes.c               \
152         socket-io.c             \
153         socket-io.h             \
154         process.c               \
155         process.h               \
156         profiler.c              \
157         profiler-private.h      \
158         rand.h                  \
159         rand.c                  \
160         runtime.c               \
161         reflection.c            \
162         security.c              \
163         security.h              \
164         security-core-clr.c     \
165         security-core-clr.h     \
166         security-manager.c      \
167         security-manager.h      \
168         sgen-os-posix.c         \
169         sgen-os-mach.c          \
170         sgen-gc.c               \
171         sgen-internal.c         \
172         sgen-marksweep.c        \
173         sgen-marksweep-fixed.c  \
174         sgen-marksweep-par.c    \
175         sgen-marksweep-fixed-par.c      \
176         sgen-major-copying.c    \
177         sgen-gc.h               \
178         sgen-archdep.h          \
179         sgen-major-copy-object.h \
180         sgen-major-scan-object.h \
181         sgen-protocol.h         \
182         sgen-scan-object.h      \
183         string-icalls.c         \
184         string-icalls.h         \
185         sysmath.h               \
186         sysmath.c               \
187         tabledefs.h             \
188         threads.c               \
189         threads-types.h         \
190         threadpool.c            \
191         threadpool.h            \
192         threadpool-internals.h  \
193         verify.c                \
194         verify-internals.h      \
195         wrapper-types.h
196
197 libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
198
199 libmonoruntimesgen_la_SOURCES = $(libmonoruntime_la_SOURCES)
200 libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
201
202 libmonoruntime_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
203 libmonoruntime_static_la_LDFLAGS = -static
204 libmonoruntime_static_la_CFLAGS = $(BOEHM_DEFINES)
205
206 libmonoruntimesgen_static_la_SOURCES = $(libmonoruntime_la_SOURCES)
207 libmonoruntimesgen_static_la_LDFLAGS = -static
208 libmonoruntimesgen_static_la_CFLAGS = $(SGEN_DEFINES)
209
210 libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
211
212 libmonoruntimeinclude_HEADERS = \
213         assembly.h              \
214         attrdefs.h              \
215         appdomain.h             \
216         blob.h                  \
217         class.h                 \
218         debug-helpers.h         \
219         debug-mono-symfile.h    \
220         threads.h               \
221         environment.h           \
222         exception.h             \
223         image.h                 \
224         loader.h                \
225         metadata.h              \
226         mono-config.h           \
227         mono-debug.h            \
228         mono-gc.h               \
229         object.h                \
230         opcodes.h               \
231         profiler.h              \
232         reflection.h            \
233         row-indexes.h           \
234         tokentype.h             \
235         verify.h                
236
237 if DTRACE_G_REQUIRED
238
239 PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
240
241 pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
242         DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
243         --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
244
245 else
246 PEDUMP_DTRACE_OBJECT = 
247 endif
248
249 pedump_SOURCES =                \
250         pedump.c
251
252 pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
253         $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
254
255 if PLATFORM_DARWIN
256 pedump_LDFLAGS=-framework CoreFoundation
257 endif
258
259 EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) $(sgen_sources) runtime.h
260