1
# Top level Makefile for cortex-strings
3
# Used to record the compiler version in the executables
4
COMPILER = $(shell $(CC) --version 2>&1 | head -n1)
7
# Pull in the NEON specific files
11
neon_bionic_sources = \
12
reference/bionic/memcpy.S
13
neon_cppflags = -mfpu=neon
11
libcortexcpu_la_SOURCES = $(sources)
13
AM_CFLAGS = -std=gnu99
29
# Benchmarks and example programs
41
# Libraries used in the benchmarks and examples
51
libcortex_strings_la_SOURCES = \
53
src/thumb-2/strcmp.c \
54
src/thumb-2/strcpy.c \
57
# Options for the tests
58
tests_cflags = -I$(srcdir)/tests $(AM_CFLAGS)
59
tests_ldadd = libcortex-strings.la
60
tests_test_memcpy_LDADD = $(tests_ldadd)
61
tests_test_memcpy_CFLAGS = $(tests_cflags)
62
tests_test_memset_LDADD = $(tests_ldadd)
63
tests_test_memset_CFLAGS = $(tests_cflags)
64
tests_test_strcmp_LDADD = $(tests_ldadd)
65
tests_test_strcmp_CFLAGS = $(tests_cflags)
66
tests_test_strcpy_LDADD = $(tests_ldadd)
67
tests_test_strcpy_CFLAGS = $(tests_cflags)
68
tests_test_strlen_LDADD = $(tests_ldadd)
69
tests_test_strlen_CFLAGS = $(tests_cflags)
71
TESTS = $(check_PROGRAMS)
73
# Libraries containing the difference reference versions
74
libbionic_a_SOURCES = \
75
$(neon_bionic_sources) \
76
reference/bionic/memcmp16.S \
77
reference/bionic/strlen.c \
78
reference/bionic/memset.S \
79
reference/bionic/memcmp.S
82
reference/csl/memcpy.c \
83
reference/csl/memset.c \
84
reference/csl/arm_asm.h
86
libglibc_a_SOURCES = \
87
reference/glibc/memmove.S \
88
reference/glibc/memset.S \
89
reference/glibc/strlen.S \
90
reference/glibc/memcpy.S
92
libnewlib_a_SOURCES = \
93
reference/newlib/strcmp.c \
94
reference/newlib/strlen.c \
95
reference/newlib/strcpy.c \
96
reference/newlib/arm_asm.h
98
libplain_a_SOURCES = \
99
reference/plain/memset.c \
100
reference/plain/memcpy.c \
101
reference/plain/strcmp.c \
102
reference/plain/strcpy.c
104
libmulti_a_SOURCES = \
105
benchmarks/multi/harness.c
107
libmulti_a_CFLAGS = -DVERSION=\"$(VERSION)\" $(AM_CFLAGS)
109
# Flags for the benchmark helpers
111
try_none_LDFLAGS = -lrt
112
try_none_LDADD = libmulti.a
114
try_all_LDFLAGS = -lrt
115
try_all_LDADD = libmulti.a libcortex-strings.la
117
try_bionic_LDFLAGS = -lrt
118
try_bionic_LDADD = libmulti.a libbionic.a
120
try_csl_LDFLAGS = -lrt
121
try_csl_LDADD = libmulti.a libcsl.a
123
try_glibc_LDFLAGS = -lrt
124
try_glibc_LDADD = libmulti.a libglibc.a
126
try_newlib_LDFLAGS = -lrt
127
try_newlib_LDADD = libmulti.a libnewlib.a
129
try_plain_LDFLAGS = -lrt
130
try_plain_LDADD = libmulti.a libplain.a
134
benchmarks/dhry/dhry_1.c \
135
benchmarks/dhry/dhry_2.c \
136
benchmarks/dhry/dhry.h
138
dhry_CFLAGS = -Dcompiler="\"$(COMPILER)\"" -Doptions="\"$(CFLAGS)\""
139
dhry_LDADD = libcortex-strings.la
141
dhry_native_SOURCES = $(dhry_SOURCES)
142
dhry_native_CFLAGS = $(dhry_CFLAGS)
144
AM_CPPFLAGS = $(neon_cppflags)
145
AM_CFLAGS = -std=gnu99 -Wall $(AM_CPPFLAGS)
149
tests/test-string.h \
150
tests/test-skeleton.c \
153
add_on_dist = add-on-dist
154
add_on_dest = $(add_on_dist)/$(PACKAGE)/sysdeps/arm/eabi/arm/$(submachine)
155
add_on_dirs = thumb-2 $(submachine) $(neon_dirs)
158
$(wildcard $(add_on_dirs:%=$(srcdir)/src/%/*.c)) \
159
$(wildcard $(add_on_dirs:%=$(srcdir)/src/%/*.S)) \
160
$(wildcard $(add_on_dirs:%=$(srcdir)/src/%/*.h))
163
rm -rf $(add_on_dist)
164
mkdir -p $(add_on_dest)
165
cp -f $(add_on_src) $(add_on_dest)
166
python $(srcdir)/scripts/fixup.py GLIBC $(add_on_dest)/*
167
tar cf $(PACKAGE).tar -C $(add_on_dist) .