Fix the mono-hwcap module to work in the MONO_CROSS_COMPILE case.
[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)
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 monoutils_sources = \
15         mono-md5.c              \
16         mono-sha1.c             \
17         mono-logger.c           \
18         mono-logger-internal.h  \
19         mono-codeman.c          \
20         dlmalloc.h              \
21         dlmalloc.c              \
22         mono-counters.c         \
23         mono-compiler.h         \
24         mono-dl.c               \
25         mono-dl.h               \
26         mono-internal-hash.c    \
27         mono-internal-hash.h    \
28         mono-io-portability.c   \
29         mono-io-portability.h   \
30         monobitset.c            \
31         mono-filemap.c          \
32         mono-math.c             \
33         mono-mmap.c             \
34         mono-mmap.h             \
35         mono-mutex.c            \
36         mono-mutex.h            \
37         mono-networkinterfaces.c                \
38         mono-networkinterfaces.h                \
39         mono-proclib.c          \
40         mono-proclib.h          \
41         mono-publib.c           \
42         mono-string.h           \
43         mono-time.c             \
44         mono-time.h             \
45         strtod.h                \
46         strtod.c                \
47         strenc.h                \
48         strenc.c                \
49         mono-uri.c              \
50         mono-poll.c             \
51         mono-path.c             \
52         mono-semaphore.c        \
53         mono-semaphore.h        \
54         mono-sigcontext.h       \
55         mono-stdlib.c           \
56         mono-property-hash.h    \
57         mono-property-hash.c    \
58         mono-value-hash.h       \
59         mono-value-hash.c       \
60         freebsd-elf_common.h    \
61         freebsd-elf32.h         \
62         freebsd-elf64.h         \
63         freebsd-dwarf.h         \
64         dtrace.h                        \
65         gc_wrapper.h            \
66         mono-error.c    \
67         mono-error-internals.h  \
68         monobitset.h    \
69         mono-codeman.h  \
70         mono-counters.h \
71         mono-digest.h   \
72         mono-error.h    \
73         mono-machine.h  \
74         mono-math.h     \
75         mono-membar.h   \
76         mono-path.h     \
77         mono-poll.h     \
78         mono-uri.h      \
79         mono-stdlib.h   \
80         valgrind.h      \
81         mach-support.c  \
82         mach-support.h  \
83         memcheck.h      \
84         mono-context.c  \
85         mono-context.h  \
86         mono-stack-unwinding.h  \
87         hazard-pointer.c        \
88         hazard-pointer.h        \
89         lock-free-queue.c       \
90         lock-free-queue.h       \
91         lock-free-alloc.c       \
92         lock-free-alloc.h       \
93         lock-free-array-queue.c \
94         lock-free-array-queue.h \
95         mono-linked-list-set.c  \
96         mono-linked-list-set.h  \
97         mono-threads.c  \
98         mono-threads-posix.c    \
99         mono-threads-mach.c     \
100         mono-threads-windows.c  \
101         mono-threads.h  \
102         mono-tls.h      \
103         linux_magic.h   \
104         mono-memory-model.h     \
105         atomic.h        \
106         atomic.c        \
107         mono-hwcap.h    \
108         mono-hwcap.c
109
110 arch_sources = 
111
112 if !CROSS_COMPILE
113
114 if X86
115 arch_sources += mach-support-x86.c
116 endif
117
118 if AMD64
119 arch_sources += mach-support-amd64.c
120 endif
121
122 if ARM
123 arch_sources += mach-support-arm.c
124 endif
125
126 else
127
128 arch_sources += mach-support-unknown.c
129
130 endif
131
132 if X86
133 arch_sources += mono-hwcap-x86.c mono-hwcap-x86.h
134 endif
135
136 if AMD64
137 arch_sources += mono-hwcap-x86.c mono-hwcap-x86.h
138 endif
139
140 if ARM
141 arch_sources += mono-hwcap-arm.c mono-hwcap-arm.h
142 endif
143
144 if MIPS
145 arch_sources += mono-hwcap-mips.c mono-hwcap-mips.h
146 endif
147
148 if POWERPC
149 arch_sources += mono-hwcap-ppc.c mono-hwcap-ppc.h
150 endif
151
152 if POWERPC64
153 arch_sources += mono-hwcap-ppc.c mono-hwcap-ppc.h
154 endif
155
156 if SPARC
157 arch_sources += mono-hwcap-sparc.c mono-hwcap-sparc.h
158 endif
159
160 if SPARC64
161 arch_sources += mono-hwcap-sparc.c mono-hwcap-sparc.h
162 endif
163
164 if IA64
165 arch_sources += mono-hwcap-ia64.c mono-hwcap-ia64.h
166 endif
167
168 if S390X
169 arch_sources += mono-hwcap-s390x.c mono-hwcap-s390x.h
170 endif
171
172 libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources)
173 libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils
174
175 libmonoutilsinclude_HEADERS =   \
176         mono-logger.h           \
177         mono-error.h            \
178         mono-publib.h           \
179         mono-dl-fallback.h
180
181 EXTRA_DIST = ChangeLog mono-embed.h mono-embed.c