b277688859176ae54ff3a4d3c5b16ff574eccbb5
[mono.git] / mono / utils / Makefile.am
1 noinst_LTLIBRARIES = libmonoutils.la
2
3 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS)
4
5 if ENABLE_DTRACE
6
7 BUILT_SOURCES = mono-dtrace.h
8
9 mono-dtrace.h: $(top_srcdir)/data/mono.d
10         $(DTRACE) $(DTRACEFLAGS) -h -s $(top_srcdir)/data/mono.d -o $@ || > $@
11
12 endif
13
14 if HOST_WIN32
15 win32_sources = \
16         os-event-win32.c
17
18 platform_sources = $(win32_sources)
19 else
20 unix_sources = \
21         os-event-unix.c
22
23 platform_sources = $(unix_sources)
24 endif
25
26 monoutils_sources = \
27         $(platform_sources)     \
28         mono-md5.c              \
29         mono-sha1.c             \
30         mono-logger.c           \
31         mono-logger-internals.h \
32         mono-codeman.c          \
33         dlmalloc.h              \
34         dlmalloc.c              \
35         mono-counters.c         \
36         mono-compiler.h         \
37         mono-complex.h          \
38         mono-dl.c               \
39         mono-dl-windows.c       \
40         mono-dl-darwin.c        \
41         mono-dl-posix.c         \
42         mono-dl.h               \
43         mono-dl-windows-internals.h     \
44         mono-log-windows.c      \
45         mono-log-common.c       \
46         mono-log-posix.c        \
47         mono-log-android.c \
48         mono-log-darwin.c \
49         mono-internal-hash.c    \
50         mono-internal-hash.h    \
51         mono-io-portability.c   \
52         mono-io-portability.h   \
53         monobitset.c            \
54         mono-filemap.c          \
55         mono-math.c             \
56         mono-mmap.c             \
57         mono-mmap-windows.c             \
58         mono-mmap.h             \
59         mono-mmap-internals.h   \
60         mono-mmap-windows-internals.h   \
61         mono-os-mutex.h         \
62         mono-os-mutex.c         \
63         mono-coop-mutex.h               \
64         mono-once.h             \
65         mono-lazy-init.h                \
66         mono-networkinterfaces.c                \
67         mono-networkinterfaces.h                \
68         mono-proclib.c          \
69         mono-proclib-windows.c          \
70         mono-proclib.h          \
71         mono-proclib-windows-internals.h                \
72         mono-publib.c           \
73         mono-string.h           \
74         mono-time.c             \
75         mono-time.h             \
76         strenc.h                \
77         strenc.c                \
78         mono-uri.c              \
79         mono-poll.c             \
80         mono-path.c             \
81         mono-os-semaphore.h     \
82         mono-coop-semaphore.h           \
83         mono-sigcontext.h       \
84         mono-stdlib.c           \
85         mono-property-hash.h    \
86         mono-property-hash.c    \
87         mono-value-hash.h       \
88         mono-value-hash.c       \
89         freebsd-elf_common.h    \
90         freebsd-elf32.h         \
91         freebsd-elf64.h         \
92         freebsd-dwarf.h         \
93         dtrace.h                        \
94         gc_wrapper.h            \
95         mono-error.c    \
96         mono-error-internals.h  \
97         monobitset.h    \
98         mono-codeman.h  \
99         mono-counters.h \
100         mono-digest.h   \
101         mono-error.h    \
102         mono-machine.h  \
103         mono-math.h     \
104         mono-membar.h   \
105         mono-path.h     \
106         mono-poll.h     \
107         mono-uri.h      \
108         mono-stdlib.h   \
109         valgrind.h      \
110         mach-support.c  \
111         mach-support.h  \
112         memcheck.h      \
113         mono-context.c  \
114         mono-context.h  \
115         mono-stack-unwinding.h  \
116         hazard-pointer.c        \
117         hazard-pointer.h        \
118         lock-free-queue.c       \
119         lock-free-queue.h       \
120         lock-free-alloc.c       \
121         lock-free-alloc.h       \
122         lock-free-array-queue.c \
123         lock-free-array-queue.h \
124         mono-linked-list-set.c  \
125         mono-linked-list-set.h  \
126         mono-threads.c  \
127         mono-threads-state-machine.c    \
128         mono-threads-posix.c    \
129         mono-threads-posix-signals.c    \
130         mono-threads-mach.c     \
131         mono-threads-mach-helper.c      \
132         mono-threads-windows.c  \
133         mono-threads-linux.c    \
134         mono-threads-freebsd.c  \
135         mono-threads-netbsd.c   \
136         mono-threads-openbsd.c  \
137         mono-threads-android.c  \
138         mono-threads-haiku.c    \
139         mono-threads.h  \
140         mono-threads-debug.h    \
141         mono-threads-api.h      \
142         mono-threads-coop.c     \
143         mono-threads-coop.h     \
144         mono-tls.h      \
145         mono-tls.c      \
146         linux_magic.h   \
147         mono-memory-model.h     \
148         atomic.h        \
149         atomic.c        \
150         mono-hwcap.h    \
151         mono-hwcap.c    \
152         mono-hwcap-vars.h       \
153         bsearch.h       \
154         bsearch.c       \
155         mono-signal-handler.h   \
156         mono-conc-hashtable.h   \
157         mono-conc-hashtable.c   \
158         json.h  \
159         json.c  \
160         networking.c    \
161         networking-posix.c      \
162         networking-fallback.c   \
163         networking-missing.c    \
164         networking-windows.c    \
165         networking.h    \
166         mono-rand.c     \
167         mono-rand-windows.c     \
168         mono-rand.h \
169         mono-rand-windows-internals.h \
170         memfuncs.c \
171         memfuncs.h \
172         parse.c \
173         parse.h \
174         checked-build.c \
175         checked-build.h \
176         os-event.h \
177         refcount.h      \
178         w32api.h        \
179         unlocked.h
180
181 arch_sources = 
182
183 if !CROSS_COMPILE
184
185 if X86
186 arch_sources += mach-support-x86.c
187 endif
188
189 if AMD64
190 arch_sources += mach-support-amd64.c
191 endif
192
193 if ARM
194 arch_sources += mach-support-arm.c
195 endif
196
197 if ARM64
198 arch_sources += mach-support-arm64.c
199 endif
200
201 else
202
203 arch_sources += mach-support-unknown.c
204
205 endif
206
207 if !CROSS_COMPILE
208
209 if X86
210 arch_sources += mono-hwcap-x86.c
211 endif
212
213 if AMD64
214 arch_sources += mono-hwcap-x86.c
215 endif
216
217 if ARM
218 arch_sources += mono-hwcap-arm.c
219 endif
220
221 if ARM64
222 arch_sources += mono-hwcap-arm64.c
223 endif
224
225 if MIPS
226 arch_sources += mono-hwcap-mips.c
227 endif
228
229 if POWERPC
230 arch_sources += mono-hwcap-ppc.c
231 endif
232
233 if POWERPC64
234 arch_sources += mono-hwcap-ppc.c
235 endif
236
237 if SPARC
238 arch_sources += mono-hwcap-sparc.c
239 endif
240
241 if SPARC64
242 arch_sources += mono-hwcap-sparc.c
243 endif
244
245 if S390X
246 arch_sources += mono-hwcap-s390x.c
247 endif
248
249 else
250
251 arch_sources += mono-hwcap-cross.c
252
253 endif
254
255 libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources)
256 libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils
257
258 libmonoutilsinclude_HEADERS =   \
259         mono-logger.h           \
260         mono-error.h            \
261         mono-publib.h           \
262         mono-dl-fallback.h      \
263         mono-counters.h
264
265 EXTRA_DIST = mono-embed.h mono-embed.c