29
29
# Used to record the compiler version in the executables
30
30
COMPILER = $(shell $(CC) --version 2>&1 | head -n1)
33
# Pull in the NEON specific files
35
src/linaro-a9/memcpy-hybrid.S
36
neon_bionic_sources = \
37
reference/bionic/memcpy.S
38
neon_cppflags = -mfpu=neon
42
src/linaro-a9/memcpy.S
33
46
lib_LTLIBRARIES = \
34
47
libcortex-strings.la
38
51
tests/test-memchr \
40
52
tests/test-memcpy \
42
53
tests/test-memset \
43
54
tests/test-strchr \
44
55
tests/test-strcmp \
45
56
tests/test-strcpy \
59
# Benchmarks and example programs
75
# Libraries used in the benchmarks and examples
89
libcortex_strings_la_SOURCES = \
91
$(alternate_sources) \
92
src/thumb-2/strcpy.c \
93
src/linaro-a9/memchr.S \
94
src/linaro-a9/strchr.S \
95
src/linaro-a9/strlen.S \
96
src/linaro-a9/memset.S
98
libcortex_strings_la_LDFLAGS = -version-info 1:0:0
50
100
# Options for the tests
51
101
tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS)
52
102
tests_ldadd = libcortex-strings.la
53
tests_test_memchr_LDADD = $(tests_ldadd)
54
tests_test_memchr_CFLAGS = $(tests_cflags)
55
tests_test_memcmp_LDADD = $(tests_ldadd)
56
tests_test_memcmp_CFLAGS = $(tests_cflags)
57
103
tests_test_memcpy_LDADD = $(tests_ldadd)
58
104
tests_test_memcpy_CFLAGS = $(tests_cflags)
59
tests_test_memmove_LDADD = $(tests_ldadd)
60
tests_test_memmove_CFLAGS = $(tests_cflags)
61
105
tests_test_memset_LDADD = $(tests_ldadd)
62
106
tests_test_memset_CFLAGS = $(tests_cflags)
63
tests_test_strchr_LDADD = $(tests_ldadd)
64
tests_test_strchr_CFLAGS = $(tests_cflags)
65
107
tests_test_strcmp_LDADD = $(tests_ldadd)
66
108
tests_test_strcmp_CFLAGS = $(tests_cflags)
67
109
tests_test_strcpy_LDADD = $(tests_ldadd)
68
110
tests_test_strcpy_CFLAGS = $(tests_cflags)
69
111
tests_test_strlen_LDADD = $(tests_ldadd)
70
112
tests_test_strlen_CFLAGS = $(tests_cflags)
71
tests_test_strncmp_LDADD = $(tests_ldadd)
72
tests_test_strncmp_CFLAGS = $(tests_cflags)
74
114
TESTS = $(check_PROGRAMS)
89
benchmarks/dhry/dhry_1.c \
90
benchmarks/dhry/dhry_2.c \
91
benchmarks/dhry/dhry.h
93
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
94
dhry_LDADD = libcortex-strings.la
96
dhry_native_SOURCES = $(dhry_SOURCES)
97
dhry_native_CFLAGS = $(dhry_CFLAGS)
107
libmulti_a_SOURCES = \
108
benchmarks/multi/harness.c
110
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
112
## Other architecture independant implementaions
116
# Libraries containing the difference reference versions
117
libbionic_a_SOURCES = \
118
$(neon_bionic_sources) \
119
reference/bionic/memcmp.S \
120
reference/bionic/memset.S \
121
reference/bionic/strcmp.S \
122
reference/bionic/strcpy.S \
123
reference/bionic/strlen.c
125
libbionic_a_CFLAGS = -Wa,-mimplicit-it=thumb
113
127
libbionic_c_a_SOURCES = \
114
128
reference/bionic-c/bcopy.c \
115
129
reference/bionic-c/memchr.c \
146
178
reference/newlib-c/strlen.c \
147
179
reference/newlib-c/shim.h
181
libnewlib_xscale_a_SOURCES = \
182
reference/newlib-xscale/memchr.c \
183
reference/newlib-xscale/memcpy.c \
184
reference/newlib-xscale/memset.c \
185
reference/newlib-xscale/strchr.c \
186
reference/newlib-xscale/strcmp.c \
187
reference/newlib-xscale/strcpy.c \
188
reference/newlib-xscale/strlen.c \
189
reference/newlib-xscale/xscale.h
149
191
libplain_a_SOURCES = \
150
192
reference/plain/memset.c \
151
193
reference/plain/memcpy.c \
152
194
reference/plain/strcmp.c \
153
195
reference/plain/strcpy.c
197
libmulti_a_SOURCES = \
198
benchmarks/multi/harness.c
200
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
202
# Flags for the benchmark helpers
155
203
try_none_SOURCES =
156
204
try_none_LDADD = libmulti.a -lrt
157
205
try_this_SOURCES =
158
206
try_this_LDADD = libmulti.a libcortex-strings.la -lrt
208
try_bionic_LDADD = libmulti.a libbionic.a -lrt
159
209
try_bionic_c_SOURCES =
160
210
try_bionic_c_LDADD = libmulti.a libbionic-c.a -lrt
161
try_glibc_c_SOURCES =
162
try_glibc_c_LDADD = libmulti.a libglibc-c.a -lrt
163
try_newlib_c_SOURCES =
164
try_newlib_c_LDADD = libmulti.a libnewlib-c.a -lrt
166
try_plain_LDADD = libmulti.a libplain.a -lrt
168
# Architecture specific
173
# Pull in the NEON specific files
174
neon_bionic_a9_sources = \
175
reference/bionic-a9/memcpy.S \
176
reference/bionic-a9/memset.S
177
neon_bionic_a15_sources = \
178
reference/bionic-a15/memcpy.S \
179
reference/bionic-a15/memset.S
180
fpu_flags = -mfpu=neon
183
fpu_flags = -mfpu=vfp
185
fpu_flags = -msoft-float
189
# Benchmarks and example programs
198
# Libraries used in the benchmarks and examples
199
noinst_LIBRARIES += \
208
libcortex_strings_la_SOURCES = \
209
src/thumb-2/strcpy.c \
210
src/linaro-a9/memchr.S \
211
src/linaro-a9/strchr.S \
212
src/thumb-2/strlen.S \
213
src/linaro-a9/memset.S \
214
src/linaro-a9/memcpy.S
216
# Libraries containing the difference reference versions
217
libbionic_a9_a_SOURCES = \
218
$(neon_bionic_a9_sources) \
219
reference/bionic-a9/memcmp.S \
220
reference/bionic-a9/strcmp.S \
221
reference/bionic-a9/strcpy.S \
222
reference/bionic-a9/strlen.c
224
libbionic_a9_a_CFLAGS = -Wa,-mimplicit-it=thumb
226
libbionic_a15_a_SOURCES = \
227
$(neon_bionic_a15_sources) \
228
reference/bionic-a15/memcmp.S \
229
reference/bionic-a15/strcmp.S \
230
reference/bionic-a15/strcpy.S \
231
reference/bionic-a15/strlen.c
233
libbionic_a15_a_CFLAGS = -Wa,-mimplicit-it=thumb
236
reference/csl/memcpy.c \
237
reference/csl/memset.c \
238
reference/csl/arm_asm.h
240
libglibc_a_SOURCES = \
241
reference/glibc/memcpy.S \
242
reference/glibc/memset.S \
243
reference/glibc/strlen.S
245
libnewlib_a_SOURCES = \
246
reference/newlib/memcpy.S \
247
reference/newlib/strcmp.S \
248
reference/newlib/strcpy.c \
249
reference/newlib/strlen.c \
250
reference/newlib/arm_asm.h \
251
reference/newlib/shim.h
253
libnewlib_xscale_a_SOURCES = \
254
reference/newlib-xscale/memchr.c \
255
reference/newlib-xscale/memcpy.c \
256
reference/newlib-xscale/memset.c \
257
reference/newlib-xscale/strchr.c \
258
reference/newlib-xscale/strcmp.c \
259
reference/newlib-xscale/strcpy.c \
260
reference/newlib-xscale/strlen.c \
261
reference/newlib-xscale/xscale.h
263
# Flags for the benchmark helpers
264
try_bionic_a9_SOURCES =
265
try_bionic_a9_LDADD = libmulti.a libbionic-a9.a -lrt
266
try_bionic_a15_SOURCES =
267
try_bionic_a15_LDADD = libmulti.a libbionic-a15.a -lrt
268
211
try_csl_SOURCES =
269
212
try_csl_LDADD = libmulti.a libcsl.a -lrt
270
213
try_glibc_SOURCES =
271
214
try_glibc_LDADD = libmulti.a libglibc.a -lrt
215
try_glibc_c_SOURCES =
216
try_glibc_c_LDADD = libmulti.a libglibc-c.a -lrt
272
217
try_newlib_SOURCES =
273
218
try_newlib_LDADD = libmulti.a libnewlib.a -lrt
219
try_newlib_c_SOURCES =
220
try_newlib_c_LDADD = libmulti.a libnewlib-c.a -lrt
274
221
try_newlib_xscale_SOURCES =
275
222
try_newlib_xscale_LDADD = libmulti.a libnewlib-xscale.a -lrt
277
AM_CPPFLAGS = $(fpu_flags)
278
AM_LDFLAGS = $(fpu_flags)
285
libcortex_strings_la_SOURCES = \
286
src/aarch64/memcmp.S \
287
src/aarch64/memcpy.S \
288
src/aarch64/memmove.S \
289
src/aarch64/memset.S \
290
src/aarch64/strcmp.S \
291
src/aarch64/strlen.S \
292
src/aarch64/strncmp.S \
293
src/aarch64/strnlen.S
297
libcortex_strings_la_LDFLAGS = -version-info 1:0:0
224
try_plain_LDADD = libmulti.a libplain.a -lrt
228
benchmarks/dhry/dhry_1.c \
229
benchmarks/dhry/dhry_2.c \
230
benchmarks/dhry/dhry.h
232
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
233
dhry_LDADD = libcortex-strings.la
235
dhry_native_SOURCES = $(dhry_SOURCES)
236
dhry_native_CFLAGS = $(dhry_CFLAGS)
238
AM_CPPFLAGS = $(neon_cppflags)
239
AM_CFLAGS = -std=gnu99 -Wall \
301
240
-fno-builtin -fno-stack-protector -U_FORTIFY_SOURCE \
241
-mtune=$(submachine) $(AM_CPPFLAGS)
310
244
tests/hp-timing.h \