~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Michael Hope
  • Date: 2012-12-12 00:59:50 UTC
  • Revision ID: michael.hope@linaro.org-20121212005950-g13oj3cqahsp52zx
Support for --host=TRIPLE to configure which is convenient for cross
building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
# Used to record the compiler version in the executables
30
30
COMPILER = $(shell $(CC) --version 2>&1 | head -n1)
31
31
 
 
32
if WITH_NEON
 
33
# Pull in the NEON specific files
 
34
neon_sources = \
 
35
        src/linaro-a9/memcpy-hybrid.S
 
36
neon_bionic_sources = \
 
37
        reference/bionic/memcpy.S
 
38
neon_cppflags = -mfpu=neon
 
39
neon_dirs = neon
 
40
else
 
41
alternate_sources = \
 
42
        src/linaro-a9/memcpy.S
 
43
endif
 
44
 
32
45
# The main library
33
46
lib_LTLIBRARIES = \
34
47
        libcortex-strings.la
35
48
 
36
 
## Test suite
 
49
# Test suite
37
50
check_PROGRAMS = \
38
51
        tests/test-memchr \
39
52
        tests/test-memcpy \
43
56
        tests/test-strcpy \
44
57
        tests/test-strlen
45
58
 
 
59
# Benchmarks and example programs
 
60
noinst_PROGRAMS = \
 
61
        dhry \
 
62
        dhry-native \
 
63
        try-none \
 
64
        try-this \
 
65
        try-bionic \
 
66
        try-bionic-c \
 
67
        try-csl \
 
68
        try-glibc \
 
69
        try-glibc-c \
 
70
        try-newlib \
 
71
        try-newlib-c \
 
72
        try-newlib-xscale \
 
73
        try-plain
 
74
 
 
75
# Libraries used in the benchmarks and examples
 
76
noinst_LIBRARIES = \
 
77
        libbionic.a \
 
78
        libbionic-c.a \
 
79
        libcsl.a \
 
80
        libglibc.a \
 
81
        libglibc-c.a \
 
82
        libnewlib.a \
 
83
        libnewlib-c.a \
 
84
        libnewlib-xscale.a \
 
85
        libplain.a \
 
86
        libmulti.a
 
87
 
 
88
# Main library
 
89
libcortex_strings_la_SOURCES = \
 
90
        $(neon_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
 
97
 
 
98
libcortex_strings_la_LDFLAGS = -version-info 1:0:0
 
99
 
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)
63
113
 
64
114
TESTS = $(check_PROGRAMS)
65
115
 
66
 
## Benchmarks
67
 
noinst_PROGRAMS = \
68
 
        dhry \
69
 
        dhry-native \
70
 
        try-none \
71
 
        try-this \
72
 
        try-plain \
73
 
        try-newlib-c \
74
 
        try-bionic-c \
75
 
        try-glibc-c
76
 
 
77
 
# Good 'ol Dhrystone
78
 
dhry_SOURCES = \
79
 
        benchmarks/dhry/dhry_1.c \
80
 
        benchmarks/dhry/dhry_2.c \
81
 
        benchmarks/dhry/dhry.h
82
 
 
83
 
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
84
 
dhry_LDADD = libcortex-strings.la
85
 
 
86
 
dhry_native_SOURCES = $(dhry_SOURCES)
87
 
dhry_native_CFLAGS = $(dhry_CFLAGS)
88
 
 
89
 
# Benchmark harness
90
 
noinst_LIBRARIES = \
91
 
        libmulti.a \
92
 
        libbionic-c.a \
93
 
        libglibc-c.a \
94
 
        libnewlib-c.a \
95
 
        libplain.a
96
 
 
97
 
libmulti_a_SOURCES = \
98
 
        benchmarks/multi/harness.c
99
 
 
100
 
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
101
 
 
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
 
124
 
 
125
libbionic_a_CFLAGS = -Wa,-mimplicit-it=thumb
 
126
 
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
113
137
 
 
138
libcsl_a_SOURCES = \
 
139
        reference/csl/memcpy.c \
 
140
        reference/csl/memset.c \
 
141
        reference/csl/arm_asm.h
 
142
 
 
143
libglibc_a_SOURCES = \
 
144
        reference/glibc/memcpy.S \
 
145
        reference/glibc/memset.S \
 
146
        reference/glibc/strlen.S
 
147
 
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
127
161
 
 
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
 
169
 
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
138
180
 
139
 
libplain_a_SOURCES = \
140
 
        reference/plain/memset.c \
141
 
        reference/plain/memcpy.c \
142
 
        reference/plain/strcmp.c \
143
 
        reference/plain/strcpy.c
144
 
 
145
 
try_none_SOURCES =
146
 
try_none_LDADD = libmulti.a -lrt
147
 
try_this_SOURCES =
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
155
 
try_plain_SOURCES =
156
 
try_plain_LDADD = libmulti.a libplain.a -lrt
157
 
 
158
 
# Architecture specific
159
 
 
160
 
if HOST_AARCH32
161
 
 
162
 
if WITH_NEON
163
 
# Pull in the NEON specific files
164
 
neon_sources = \
165
 
        src/linaro-a9/memcpy-hybrid.S
166
 
neon_bionic_sources = \
167
 
        reference/bionic/memcpy.S
168
 
neon_cppflags = -mfpu=neon
169
 
neon_dirs = neon
170
 
else
171
 
alternate_sources = \
172
 
        src/linaro-a9/memcpy.S
173
 
endif
174
 
 
175
 
# Benchmarks and example programs
176
 
noinst_PROGRAMS += \
177
 
        try-bionic \
178
 
        try-csl \
179
 
        try-glibc \
180
 
        try-newlib \
181
 
        try-newlib-xscale
182
 
 
183
 
# Libraries used in the benchmarks and examples
184
 
noinst_LIBRARIES += \
185
 
        libbionic.a \
186
 
        libcsl.a \
187
 
        libglibc.a \
188
 
        libnewlib.a \
189
 
        libnewlib-xscale.a
190
 
 
191
 
# Main library
192
 
libcortex_strings_la_SOURCES = \
193
 
        $(neon_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
200
 
 
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
209
 
 
210
 
libbionic_a_CFLAGS = -Wa,-mimplicit-it=thumb
211
 
 
212
 
libcsl_a_SOURCES = \
213
 
        reference/csl/memcpy.c \
214
 
        reference/csl/memset.c \
215
 
        reference/csl/arm_asm.h
216
 
 
217
 
libglibc_a_SOURCES = \
218
 
        reference/glibc/memcpy.S \
219
 
        reference/glibc/memset.S \
220
 
        reference/glibc/strlen.S
221
 
 
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
229
 
 
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
239
190
 
 
191
libplain_a_SOURCES = \
 
192
        reference/plain/memset.c \
 
193
        reference/plain/memcpy.c \
 
194
        reference/plain/strcmp.c \
 
195
        reference/plain/strcpy.c
 
196
 
 
197
libmulti_a_SOURCES = \
 
198
        benchmarks/multi/harness.c
 
199
 
 
200
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
 
201
 
240
202
# Flags for the benchmark helpers
 
203
try_none_SOURCES =
 
204
try_none_LDADD = libmulti.a -lrt
 
205
try_this_SOURCES =
 
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
 
223
try_plain_SOURCES =
 
224
try_plain_LDADD = libmulti.a libplain.a -lrt
 
225
 
 
226
# Good 'ol Dhrystone
 
227
dhry_SOURCES = \
 
228
        benchmarks/dhry/dhry_1.c \
 
229
        benchmarks/dhry/dhry_2.c \
 
230
        benchmarks/dhry/dhry.h
 
231
 
 
232
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
 
233
dhry_LDADD = libcortex-strings.la
 
234
 
 
235
dhry_native_SOURCES = $(dhry_SOURCES)
 
236
dhry_native_CFLAGS = $(dhry_CFLAGS)
251
237
 
252
238
AM_CPPFLAGS = $(neon_cppflags)
253
 
 
254
 
endif
255
 
 
256
 
libcortex_strings_la_LDFLAGS = -version-info 1:0:0
257
 
 
258
 
AM_CFLAGS = \
259
 
        -std=gnu99 -Wall \
 
239
AM_CFLAGS = -std=gnu99 -Wall \
260
240
        -fno-builtin -fno-stack-protector -U_FORTIFY_SOURCE \
261
 
        $(AM_CPPFLAGS)
262
 
 
263
 
if WITH_SUBMACHINE
264
 
AM_CFLAGS += \
265
 
        -mtune=$submachine
266
 
endif
 
241
        -mtune=$(submachine) $(AM_CPPFLAGS)
267
242
 
268
243
EXTRA_DIST = \
269
244
        tests/hp-timing.h \
279
254
        scripts/plot-top.py \
280
255
        scripts/trim.sh \
281
256
        autogen.sh
 
257
 
 
258
AM_DISTCHECK_CONFIGURE_FLAGS = --host=arm-linux-gnueabi