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 \
39
52
tests/test-memcpy \
43
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
46
100
# Options for the tests
47
101
tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS)
48
102
tests_ldadd = libcortex-strings.la
49
tests_test_memchr_LDADD = $(tests_ldadd)
50
tests_test_memchr_CFLAGS = $(tests_cflags)
51
103
tests_test_memcpy_LDADD = $(tests_ldadd)
52
104
tests_test_memcpy_CFLAGS = $(tests_cflags)
53
105
tests_test_memset_LDADD = $(tests_ldadd)
54
106
tests_test_memset_CFLAGS = $(tests_cflags)
55
tests_test_strchr_LDADD = $(tests_ldadd)
56
tests_test_strchr_CFLAGS = $(tests_cflags)
57
107
tests_test_strcmp_LDADD = $(tests_ldadd)
58
108
tests_test_strcmp_CFLAGS = $(tests_cflags)
59
109
tests_test_strcpy_LDADD = $(tests_ldadd)
64
114
TESTS = $(check_PROGRAMS)
79
benchmarks/dhry/dhry_1.c \
80
benchmarks/dhry/dhry_2.c \
81
benchmarks/dhry/dhry.h
83
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
84
dhry_LDADD = libcortex-strings.la
86
dhry_native_SOURCES = $(dhry_SOURCES)
87
dhry_native_CFLAGS = $(dhry_CFLAGS)
97
libmulti_a_SOURCES = \
98
benchmarks/multi/harness.c
100
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
102
## 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
103
127
libbionic_c_a_SOURCES = \
104
128
reference/bionic-c/bcopy.c \
105
129
reference/bionic-c/memchr.c \
111
135
reference/bionic-c/strcpy.c \
112
136
reference/bionic-c/strlen.c
139
reference/csl/memcpy.c \
140
reference/csl/memset.c \
141
reference/csl/arm_asm.h
143
libglibc_a_SOURCES = \
144
reference/glibc/memcpy.S \
145
reference/glibc/memset.S \
146
reference/glibc/strlen.S
114
148
libglibc_c_a_SOURCES = \
115
149
reference/glibc-c/memchr.c \
116
150
reference/glibc-c/memcmp.c \
125
159
reference/glibc-c/memcopy.h \
126
160
reference/glibc-c/pagecopy.h
162
libnewlib_a_SOURCES = \
163
reference/newlib/memcpy.S \
164
reference/newlib/strcmp.S \
165
reference/newlib/strcpy.c \
166
reference/newlib/strlen.c \
167
reference/newlib/arm_asm.h \
168
reference/newlib/shim.h
128
170
libnewlib_c_a_SOURCES = \
129
171
reference/newlib-c/memchr.c \
130
172
reference/newlib-c/memcmp.c \
136
178
reference/newlib-c/strlen.c \
137
179
reference/newlib-c/shim.h
139
libplain_a_SOURCES = \
140
reference/plain/memset.c \
141
reference/plain/memcpy.c \
142
reference/plain/strcmp.c \
143
reference/plain/strcpy.c
146
try_none_LDADD = libmulti.a -lrt
148
try_this_LDADD = libmulti.a libcortex-strings.la -lrt
149
try_bionic_c_SOURCES =
150
try_bionic_c_LDADD = libmulti.a libbionic-c.a -lrt
151
try_glibc_c_SOURCES =
152
try_glibc_c_LDADD = libmulti.a libglibc-c.a -lrt
153
try_newlib_c_SOURCES =
154
try_newlib_c_LDADD = libmulti.a libnewlib-c.a -lrt
156
try_plain_LDADD = libmulti.a libplain.a -lrt
158
# Architecture specific
163
# Pull in the NEON specific files
165
src/linaro-a9/memcpy-hybrid.S
166
neon_bionic_sources = \
167
reference/bionic/memcpy.S
168
neon_cppflags = -mfpu=neon
171
alternate_sources = \
172
src/linaro-a9/memcpy.S
175
# Benchmarks and example programs
183
# Libraries used in the benchmarks and examples
184
noinst_LIBRARIES += \
192
libcortex_strings_la_SOURCES = \
194
$(alternate_sources) \
195
src/thumb-2/strcpy.c \
196
src/linaro-a9/memchr.S \
197
src/linaro-a9/strchr.S \
198
src/linaro-a9/strlen.S \
199
src/linaro-a9/memset.S
201
# Libraries containing the difference reference versions
202
libbionic_a_SOURCES = \
203
$(neon_bionic_sources) \
204
reference/bionic/memcmp.S \
205
reference/bionic/memset.S \
206
reference/bionic/strcmp.S \
207
reference/bionic/strcpy.S \
208
reference/bionic/strlen.c
210
libbionic_a_CFLAGS = -Wa,-mimplicit-it=thumb
213
reference/csl/memcpy.c \
214
reference/csl/memset.c \
215
reference/csl/arm_asm.h
217
libglibc_a_SOURCES = \
218
reference/glibc/memcpy.S \
219
reference/glibc/memset.S \
220
reference/glibc/strlen.S
222
libnewlib_a_SOURCES = \
223
reference/newlib/memcpy.S \
224
reference/newlib/strcmp.S \
225
reference/newlib/strcpy.c \
226
reference/newlib/strlen.c \
227
reference/newlib/arm_asm.h \
228
reference/newlib/shim.h
230
181
libnewlib_xscale_a_SOURCES = \
231
182
reference/newlib-xscale/memchr.c \
232
183
reference/newlib-xscale/memcpy.c \
237
188
reference/newlib-xscale/strlen.c \
238
189
reference/newlib-xscale/xscale.h
191
libplain_a_SOURCES = \
192
reference/plain/memset.c \
193
reference/plain/memcpy.c \
194
reference/plain/strcmp.c \
195
reference/plain/strcpy.c
197
libmulti_a_SOURCES = \
198
benchmarks/multi/harness.c
200
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
240
202
# Flags for the benchmark helpers
204
try_none_LDADD = libmulti.a -lrt
206
try_this_LDADD = libmulti.a libcortex-strings.la -lrt
241
207
try_bionic_SOURCES =
242
208
try_bionic_LDADD = libmulti.a libbionic.a -lrt
209
try_bionic_c_SOURCES =
210
try_bionic_c_LDADD = libmulti.a libbionic-c.a -lrt
243
211
try_csl_SOURCES =
244
212
try_csl_LDADD = libmulti.a libcsl.a -lrt
245
213
try_glibc_SOURCES =
246
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
247
217
try_newlib_SOURCES =
248
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
249
221
try_newlib_xscale_SOURCES =
250
222
try_newlib_xscale_LDADD = libmulti.a libnewlib-xscale.a -lrt
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)
252
238
AM_CPPFLAGS = $(neon_cppflags)
256
libcortex_strings_la_LDFLAGS = -version-info 1:0:0
239
AM_CFLAGS = -std=gnu99 -Wall \
260
240
-fno-builtin -fno-stack-protector -U_FORTIFY_SOURCE \
241
-mtune=$(submachine) $(AM_CPPFLAGS)
269
244
tests/hp-timing.h \