blob: f463ba2574bf05c0d3b013f29bb9ccc74f1aa578 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
|
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
if !ENABLE_MSVC_ONLY
noinst_LTLIBRARIES = \
libmonomath.la \
libmonoutils.la
if ENABLE_LLVM
if INTERNAL_LLVM
llvm_config=$(monodir)/llvm/usr/bin/llvm-config
else
llvm_config=$(EXTERNAL_LLVM_CONFIG)
endif
llvm_api_version_from_config=$(shell $(llvm_config) --mono-api-version 2>/dev/null)
llvm_api_version=$(shell if [ -z "$(llvm_api_version_from_config)" ]; then echo "0"; else echo "$(llvm_api_version_from_config)"; fi)
LLVM_CFLAGS=-DLLVM_API_VERSION=$(llvm_api_version)
endif
if ENABLE_LLVM
if INTERNAL_LLVM
llvm_config=$(monodir)/llvm/usr/bin/llvm-config
else
llvm_config=$(EXTERNAL_LLVM_CONFIG)
endif
llvm_api_version_from_config=$(shell $(llvm_config) --mono-api-version 2>/dev/null)
llvm_api_version=$(shell if [ -z "$(llvm_api_version_from_config)" ]; then echo "0"; else echo "$(llvm_api_version_from_config)"; fi)
LLVM_CFLAGS=-DLLVM_API_VERSION=$(llvm_api_version)
endif
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) $(LLVM_CFLAGS)
if ENABLE_DTRACE
BUILT_SOURCES = mono-dtrace.h
mono-dtrace.h: $(top_srcdir)/data/mono.d
$(DTRACE) $(DTRACEFLAGS) -h -s $(top_srcdir)/data/mono.d -o $@ || > $@
endif
if HOST_WIN32
win32_sources = \
mono-os-semaphore-win32.c \
mono-os-wait-win32.c \
mono-windows-thread-name.c \
os-event-win32.c
platform_sources = $(win32_sources)
else
unix_sources = \
dlmalloc.h \
dlmalloc.c \
mono-cgroup.c \
os-event-unix.c
platform_sources = $(unix_sources)
endif
monoutils_sources = \
$(platform_sources) \
mono-md5.c \
mono-sha1.c \
mono-logger.c \
mono-logger-internals.h \
mono-codeman.c \
mono-counters.c \
mono-compiler.h \
mono-complex.h \
mono-dl.c \
mono-dl-windows.c \
mono-dl-darwin.c \
mono-dl-posix.c \
mono-dl-wasm.c \
mono-dl.h \
mono-dl-windows-internals.h \
mono-experiments.h \
mono-experiments.c \
mono-log-windows.c \
mono-log-common.c \
mono-log-posix.c \
mono-log-android.c \
mono-log-darwin.c \
mono-log-flight-recorder.c \
mono-merp.c \
mono-merp.h \
mono-state.h \
mono-state.c \
mono-internal-hash.c \
mono-internal-hash.h \
mono-io-portability.c \
mono-io-portability.h \
monobitset.c \
mono-filemap.c \
mono-mmap.c \
mono-mmap-windows.c \
mono-mmap-wasm.c \
mono-mmap.h \
mono-mmap-internals.h \
mono-os-mutex.h \
mono-os-mutex.c \
mono-flight-recorder.h \
mono-flight-recorder.c \
mono-os-wait.h \
mono-coop-mutex.h \
mono-once.h \
mono-lazy-init.h \
mono-networkinterfaces.c \
mono-networkinterfaces.h \
mono-proclib.c \
mono-proclib-windows.c \
mono-proclib.h \
mono-proclib-windows-internals.h \
mono-publib.c \
mono-jemalloc.c \
mono-string.h \
mono-time.c \
mono-time.h \
strenc-internals.h \
strenc.h \
strenc.c \
mono-uri.c \
mono-poll.c \
mono-path.c \
mono-os-semaphore.h \
mono-coop-semaphore.h \
mono-sigcontext.h \
mono-stdlib.c \
mono-property-hash.h \
mono-property-hash.c \
mono-value-hash.h \
mono-value-hash.c \
freebsd-elf_common.h \
freebsd-elf32.h \
freebsd-elf64.h \
freebsd-dwarf.h \
dtrace.h \
gc_wrapper.h \
mono-error.c \
mono-error-internals.h \
monobitset.h \
mono-codeman.h \
mono-counters.h \
mono-digest.h \
mono-error.h \
mono-forward-internal.h \
mono-machine.h \
mono-math.h \
mono-membar.h \
mono-path.h \
mono-poll.h \
mono-uri.h \
mono-stdlib.h \
valgrind.h \
mach-support.h \
memcheck.h \
mono-context.c \
mono-context.h \
mono-stack-unwinding.h \
hazard-pointer.c \
hazard-pointer.h \
lifo-semaphore.c \
lifo-semaphore.h \
lock-free-queue.c \
lock-free-queue.h \
lock-free-alloc.c \
lock-free-alloc.h \
lock-free-array-queue.c \
lock-free-array-queue.h \
mono-linked-list-set.c \
mono-linked-list-set.h \
mono-threads.c \
mono-threads-state-machine.c \
mono-threads-posix.c \
mono-threads-posix-signals.c \
mono-threads-mach.c \
mono-threads-mach-helper.c \
mono-threads-windows.c \
mono-threads-linux.c \
mono-threads-freebsd.c \
mono-threads-netbsd.c \
mono-threads-openbsd.c \
mono-threads-android.c \
mono-threads-haiku.c \
mono-threads-aix.c \
mono-threads-wasm.c \
mono-threads-sunos.c \
mono-threads.h \
mono-threads-debug.h \
mono-threads-api.h \
mono-threads-coop.c \
mono-threads-coop.h \
mono-utility-thread.c \
mono-utility-thread.h \
mono-tls.h \
mono-tls-inline.h \
mono-tls.c \
mono-utils-debug.c \
mono-utils-debug.h \
linux_magic.h \
mono-memory-model.h \
atomic.h \
atomic.c \
mono-hwcap.h \
mono-hwcap.c \
mono-hwcap-vars.h \
bsearch.h \
bsearch.c \
mono-signal-handler.h \
mono-signal-handler.c \
mono-conc-hashtable.h \
mono-conc-hashtable.c \
json.h \
json.c \
networking.c \
networking-posix.c \
networking-fallback.c \
networking-missing.c \
networking-windows.c \
networking.h \
mono-rand.c \
mono-rand-windows.c \
mono-rand.h \
memfuncs.c \
memfuncs.h \
parse.c \
parse.h \
checked-build.c \
checked-build.h \
os-event.h \
refcount.h \
w32api.h \
w32subset.h \
unlocked.h \
ward.h \
options.h \
options-def.h \
options.c \
ftnptr.h
arch_sources =
if !CROSS_COMPILE
if X86
arch_sources += mach-support-x86.c
endif
if AMD64
arch_sources += mach-support-amd64.c
endif
if ARM
arch_sources += mach-support-arm.c
endif
if ARM64
arch_sources += mach-support-arm64.c
endif
else
arch_sources += mach-support-unknown.c
endif
if !CROSS_COMPILE
if X86
arch_sources += mono-hwcap-x86.c
endif
if AMD64
arch_sources += mono-hwcap-x86.c
endif
if ARM
arch_sources += mono-hwcap-arm.c
endif
if ARM64
arch_sources += mono-hwcap-arm64.c
endif
if MIPS
arch_sources += mono-hwcap-mips.c
endif
if POWERPC
arch_sources += mono-hwcap-ppc.c
endif
if POWERPC64
arch_sources += mono-hwcap-ppc.c
endif
if SPARC
arch_sources += mono-hwcap-sparc.c
endif
if SPARC64
arch_sources += mono-hwcap-sparc.c
endif
if S390X
arch_sources += mono-hwcap-s390x.c
endif
if RISCV
arch_sources += mono-hwcap-riscv.c
endif
if HOST_WASM
arch_sources += mono-hwcap-wasm.c
endif
else
arch_sources += mono-hwcap-cross.c
endif
libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources)
libmonoutils_la_CFLAGS = $(JEMALLOC_CFLAGS) @CXX_ADD_CFLAGS@
libmonoutils_la_LDFLAGS = $(JEMALLOC_LDFLAGS)
endif # !ENABLE_MSVC_ONLY
libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils
if !ENABLE_MSVC_ONLY
libmonoutils_la_LIBADD = mono-math-c.lo
libmonomath_la_SOURCES = mono-math-c.c
libmonomath_la_CFLAGS = @CXX_REMOVE_CFLAGS@
endif # !ENABLE_MSVC_ONLY
# These are public headers.
# They should not use glib.h, G_BEGIN_DECLS, guint, etc.
# They should be wrapped in MONO_BEGIN_DECLS / MONO_END_DECLS.
libmonoutilsinclude_HEADERS = \
mono-logger.h \
mono-error.h \
mono-forward.h \
mono-publib.h \
mono-jemalloc.h \
mono-dl-fallback.h \
mono-private-unstable.h \
mono-counters.h
EXTRA_DIST = mono-errno.h mono-embed.h mono-embed.c ../../support/libm/complex.c mono-experiments.def
DIST_SUBDIRS = jemalloc
if MONO_JEMALLOC_ENABLED
SUBDIRS = jemalloc
endif
CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)
if ENABLE_MSVC_ONLY
all-local:
make -C $(top_srcdir)/msvc libmonoutils
clean-local:
make -C $(top_srcdir)/msvc clean-libmonoutils
endif # ENABLE_MSVC_ONLY
|