ab301d1700bdb3b50958e69d3b858a9f34322f3c
[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.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.h     \
61         mono-os-mutex.h         \
62         mono-coop-mutex.h               \
63         mono-once.h             \
64         mono-lazy-init.h                \
65         mono-networkinterfaces.c                \
66         mono-networkinterfaces.h                \
67         mono-proclib.c          \
68         mono-proclib-windows.c          \
69         mono-proclib.h          \
70         mono-proclib-windows.h          \
71         mono-publib.c           \
72         mono-string.h           \
73         mono-time.c             \
74         mono-time.h             \
75         strenc.h                \
76         strenc.c                \
77         mono-uri.c              \
78         mono-poll.c             \
79         mono-path.c             \
80         mono-os-semaphore.h     \
81         mono-coop-semaphore.h           \
82         mono-sigcontext.h       \
83         mono-stdlib.c           \
84         mono-property-hash.h    \
85         mono-property-hash.c    \
86         mono-value-hash.h       \
87         mono-value-hash.c       \
88         freebsd-elf_common.h    \
89         freebsd-elf32.h         \
90         freebsd-elf64.h         \
91         freebsd-dwarf.h         \
92         dtrace.h                        \
93         gc_wrapper.h            \
94         mono-error.c    \
95         mono-error-internals.h  \
96         monobitset.h    \
97         mono-codeman.h  \
98         mono-counters.h \
99         mono-digest.h   \
100         mono-error.h    \
101         mono-machine.h  \
102         mono-math.h     \
103         mono-membar.h   \
104         mono-path.h     \
105         mono-poll.h     \
106         mono-uri.h      \
107         mono-stdlib.h   \
108         valgrind.h      \
109         mach-support.c  \
110         mach-support.h  \
111         memcheck.h      \
112         mono-context.c  \
113         mono-context.h  \
114         mono-stack-unwinding.h  \
115         hazard-pointer.c        \
116         hazard-pointer.h        \
117         lock-free-queue.c       \
118         lock-free-queue.h       \
119         lock-free-alloc.c       \
120         lock-free-alloc.h       \
121         lock-free-array-queue.c \
122         lock-free-array-queue.h \
123         mono-linked-list-set.c  \
124         mono-linked-list-set.h  \
125         mono-threads.c  \
126         mono-threads-state-machine.c    \
127         mono-threads-posix.c    \
128         mono-threads-posix-signals.c    \
129         mono-threads-mach.c     \
130         mono-threads-mach-helper.c      \
131         mono-threads-windows.c  \
132         mono-threads-linux.c    \
133         mono-threads-freebsd.c  \
134         mono-threads-netbsd.c   \
135         mono-threads-openbsd.c  \
136         mono-threads-android.c  \
137         mono-threads.h  \
138         mono-threads-debug.h    \
139         mono-threads-api.h      \
140         mono-threads-coop.c     \
141         mono-threads-coop.h     \
142         mono-tls.h      \
143         mono-tls.c      \
144         linux_magic.h   \
145         mono-memory-model.h     \
146         atomic.h        \
147         atomic.c        \
148         mono-hwcap.h    \
149         mono-hwcap.c    \
150         mono-hwcap-vars.h       \
151         bsearch.h       \
152         bsearch.c       \
153         mono-signal-handler.h   \
154         mono-conc-hashtable.h   \
155         mono-conc-hashtable.c   \
156         sha1.h          \
157         sha1.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.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
178 arch_sources = 
179
180 if !CROSS_COMPILE
181
182 if X86
183 arch_sources += mach-support-x86.c
184 endif
185
186 if AMD64
187 arch_sources += mach-support-amd64.c
188 endif
189
190 if ARM
191 arch_sources += mach-support-arm.c
192 endif
193
194 if ARM64
195 arch_sources += mach-support-arm64.c
196 endif
197
198 else
199
200 arch_sources += mach-support-unknown.c
201
202 endif
203
204 if !CROSS_COMPILE
205
206 if X86
207 arch_sources += mono-hwcap-x86.c
208 endif
209
210 if AMD64
211 arch_sources += mono-hwcap-x86.c
212 endif
213
214 if ARM
215 arch_sources += mono-hwcap-arm.c
216 endif
217
218 if ARM64
219 arch_sources += mono-hwcap-arm64.c
220 endif
221
222 if MIPS
223 arch_sources += mono-hwcap-mips.c
224 endif
225
226 if POWERPC
227 arch_sources += mono-hwcap-ppc.c
228 endif
229
230 if POWERPC64
231 arch_sources += mono-hwcap-ppc.c
232 endif
233
234 if SPARC
235 arch_sources += mono-hwcap-sparc.c
236 endif
237
238 if SPARC64
239 arch_sources += mono-hwcap-sparc.c
240 endif
241
242 if IA64
243 arch_sources += mono-hwcap-ia64.c
244 endif
245
246 if S390X
247 arch_sources += mono-hwcap-s390x.c
248 endif
249
250 else
251
252 arch_sources += mono-hwcap-cross.c
253
254 endif
255
256 libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources)
257 libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils
258
259 libmonoutilsinclude_HEADERS =   \
260         mono-logger.h           \
261         mono-error.h            \
262         mono-publib.h           \
263         mono-dl-fallback.h      \
264         mono-counters.h
265
266 EXTRA_DIST = mono-embed.h mono-embed.c