Skip to content

Commit 4f3403e

Browse files
committed
build: rename executables with prefix
1 parent a93078f commit 4f3403e

File tree

5 files changed

+110
-110
lines changed

5 files changed

+110
-110
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ jobs:
571571
# Use the bash shell included with Git for Windows.
572572
shell: bash
573573
run: |
574-
cd build/bin/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
574+
cd build/bin/RelWithDebInfo && file *tests.exe *bench*.exe libsecp256k1-*.dll || true
575575
576576
- name: Symbol check
577577
if: ${{ matrix.configuration.symbol_check }}
@@ -584,9 +584,9 @@ jobs:
584584
- name: Check
585585
run: |
586586
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
587-
build\bin\RelWithDebInfo\bench_ecmult.exe
588-
build\bin\RelWithDebInfo\bench_internal.exe
589-
build\bin\RelWithDebInfo\bench.exe
587+
build\bin\RelWithDebInfo\secp256k1_bench_ecmult.exe
588+
build\bin\RelWithDebInfo\secp256k1_bench_internal.exe
589+
build\bin\RelWithDebInfo\secp256k1_bench.exe
590590
591591
win64-native-headers:
592592
name: "x64 (MSVC): C++ (public headers)"

.gitignore

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
bench
2-
bench_ecmult
3-
bench_internal
4-
noverify_tests
5-
tests
6-
exhaustive_tests
1+
secp256k1_bench
2+
secp256k1_bench_ecmult
3+
secp256k1_bench_internal
4+
secp256k1_noverify_tests
5+
secp256k1_tests
6+
secp256k1_exhaustive_tests
77
precompute_ecmult_gen
88
precompute_ecmult
9-
ctime_tests
10-
ecdh_example
11-
ecdsa_example
12-
schnorr_example
13-
ellswift_example
14-
musig_example
9+
secp256k1_ctime_tests
10+
secp256k1_ecdsa_example
11+
secp256k1_ecdsa_example
12+
secp256k1_schnorr_example
13+
secp256k1_ellswift_example
14+
secp256k1_musig_example
1515
*.exe
1616
*.so
1717
*.a

Makefile.am

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -106,109 +106,109 @@ libsecp256k1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(L
106106

107107
noinst_PROGRAMS =
108108
if USE_BENCHMARK
109-
noinst_PROGRAMS += bench bench_internal bench_ecmult
110-
bench_SOURCES = src/bench.c
111-
bench_LDADD = libsecp256k1.la
112-
bench_CPPFLAGS = $(SECP_CONFIG_DEFINES)
113-
bench_internal_SOURCES = src/bench_internal.c
114-
bench_internal_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
115-
bench_internal_CPPFLAGS = $(SECP_CONFIG_DEFINES)
116-
bench_ecmult_SOURCES = src/bench_ecmult.c
117-
bench_ecmult_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
118-
bench_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES)
109+
noinst_PROGRAMS += secp256k1_bench secp256k1_bench_internal secp256k1_bench_ecmult
110+
secp256k1_bench_SOURCES = src/bench.c
111+
secp256k1_bench_LDADD = libsecp256k1.la
112+
secp256k1_bench_CPPFLAGS = $(SECP_CONFIG_DEFINES)
113+
secp256k1_bench_internal_SOURCES = src/bench_internal.c
114+
secp256k1_bench_internal_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
115+
secp256k1_bench_internal_CPPFLAGS = $(SECP_CONFIG_DEFINES)
116+
secp256k1_bench_ecmult_SOURCES = src/bench_ecmult.c
117+
secp256k1_bench_ecmult_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
118+
secp256k1_bench_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES)
119119
endif
120120

121121
TESTS =
122122
if USE_TESTS
123-
TESTS += noverify_tests
124-
noinst_PROGRAMS += noverify_tests
125-
noverify_tests_SOURCES = src/tests.c
126-
noverify_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES) $(TEST_DEFINES)
127-
noverify_tests_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
128-
noverify_tests_LDFLAGS = -static
123+
TESTS += secp256k1_noverify_tests
124+
noinst_PROGRAMS += secp256k1_noverify_tests
125+
secp256k1_noverify_tests_SOURCES = src/tests.c
126+
secp256k1_noverify_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES) $(TEST_DEFINES)
127+
secp256k1_noverify_tests_LDADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
128+
secp256k1_noverify_tests_LDFLAGS = -static
129129
if !ENABLE_COVERAGE
130-
TESTS += tests
131-
noinst_PROGRAMS += tests
132-
tests_SOURCES = $(noverify_tests_SOURCES)
133-
tests_CPPFLAGS = $(noverify_tests_CPPFLAGS) -DVERIFY
134-
tests_LDADD = $(noverify_tests_LDADD)
135-
tests_LDFLAGS = $(noverify_tests_LDFLAGS)
130+
TESTS += secp256k1_tests
131+
noinst_PROGRAMS += secp256k1_tests
132+
secp256k1_tests_SOURCES = $(secp256k1_noverify_tests_SOURCES)
133+
secp256k1_tests_CPPFLAGS = $(secp256k1_noverify_tests_CPPFLAGS) -DVERIFY
134+
secp256k1_tests_LDADD = $(secp256k1_noverify_tests_LDADD)
135+
secp256k1_tests_LDFLAGS = $(secp256k1_noverify_tests_LDFLAGS)
136136
endif
137137
endif
138138

139139
if USE_CTIME_TESTS
140-
noinst_PROGRAMS += ctime_tests
141-
ctime_tests_SOURCES = src/ctime_tests.c
142-
ctime_tests_LDADD = libsecp256k1.la
143-
ctime_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)
140+
noinst_PROGRAMS += secp256k1_ctime_tests
141+
secp256k1_ctime_tests_SOURCES = src/ctime_tests.c
142+
secp256k1_ctime_tests_LDADD = libsecp256k1.la
143+
secp256k1_ctime_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)
144144
endif
145145

146146
if USE_EXHAUSTIVE_TESTS
147-
noinst_PROGRAMS += exhaustive_tests
148-
exhaustive_tests_SOURCES = src/tests_exhaustive.c
149-
exhaustive_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)
147+
noinst_PROGRAMS += secp256k1_exhaustive_tests
148+
secp256k1_exhaustive_tests_SOURCES = src/tests_exhaustive.c
149+
secp256k1_exhaustive_tests_CPPFLAGS = $(SECP_CONFIG_DEFINES)
150150
if !ENABLE_COVERAGE
151-
exhaustive_tests_CPPFLAGS += -DVERIFY
151+
secp256k1_exhaustive_tests_CPPFLAGS += -DVERIFY
152152
endif
153153
# Note: do not include $(PRECOMPUTED_LIB) in exhaustive_tests (it uses runtime-generated tables).
154-
exhaustive_tests_LDADD = $(COMMON_LIB)
155-
exhaustive_tests_LDFLAGS = -static
156-
TESTS += exhaustive_tests
154+
secp256k1_exhaustive_tests_LDADD = $(COMMON_LIB)
155+
secp256k1_exhaustive_tests_LDFLAGS = -static
156+
TESTS += secp256k1_exhaustive_tests
157157
endif
158158

159159
if USE_EXAMPLES
160-
noinst_PROGRAMS += ecdsa_example
161-
ecdsa_example_SOURCES = examples/ecdsa.c
162-
ecdsa_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
163-
ecdsa_example_LDADD = libsecp256k1.la
164-
ecdsa_example_LDFLAGS = -static
160+
noinst_PROGRAMS += secp256k1_ecdsa_example
161+
secp256k1_ecdsa_example_SOURCES = examples/ecdsa.c
162+
secp256k1_ecdsa_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
163+
secp256k1_ecdsa_example_LDADD = libsecp256k1.la
164+
secp256k1_ecdsa_example_LDFLAGS = -static
165165
if BUILD_WINDOWS
166-
ecdsa_example_LDFLAGS += -lbcrypt
166+
secp256k1_ecdsa_example_LDFLAGS += -lbcrypt
167167
endif
168-
TESTS += ecdsa_example
168+
TESTS += secp256k1_ecdsa_example
169169
if ENABLE_MODULE_ECDH
170-
noinst_PROGRAMS += ecdh_example
171-
ecdh_example_SOURCES = examples/ecdh.c
172-
ecdh_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
173-
ecdh_example_LDADD = libsecp256k1.la
174-
ecdh_example_LDFLAGS = -static
170+
noinst_PROGRAMS += secp256k1_ecdh_example
171+
secp256k1_ecdh_example_SOURCES = examples/ecdh.c
172+
secp256k1_ecdh_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
173+
secp256k1_ecdh_example_LDADD = libsecp256k1.la
174+
secp256k1_ecdh_example_LDFLAGS = -static
175175
if BUILD_WINDOWS
176-
ecdh_example_LDFLAGS += -lbcrypt
176+
secp256k1_ecdh_example_LDFLAGS += -lbcrypt
177177
endif
178-
TESTS += ecdh_example
178+
TESTS += secp256k1_ecdh_example
179179
endif
180180
if ENABLE_MODULE_SCHNORRSIG
181-
noinst_PROGRAMS += schnorr_example
182-
schnorr_example_SOURCES = examples/schnorr.c
183-
schnorr_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
184-
schnorr_example_LDADD = libsecp256k1.la
185-
schnorr_example_LDFLAGS = -static
181+
noinst_PROGRAMS += secp256k1_schnorr_example
182+
secp256k1_schnorr_example_SOURCES = examples/schnorr.c
183+
secp256k1_schnorr_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
184+
secp256k1_schnorr_example_LDADD = libsecp256k1.la
185+
secp256k1_schnorr_example_LDFLAGS = -static
186186
if BUILD_WINDOWS
187-
schnorr_example_LDFLAGS += -lbcrypt
187+
secp256k1_schnorr_example_LDFLAGS += -lbcrypt
188188
endif
189-
TESTS += schnorr_example
189+
TESTS += secp256k1_schnorr_example
190190
endif
191191
if ENABLE_MODULE_ELLSWIFT
192-
noinst_PROGRAMS += ellswift_example
193-
ellswift_example_SOURCES = examples/ellswift.c
194-
ellswift_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
195-
ellswift_example_LDADD = libsecp256k1.la
196-
ellswift_example_LDFLAGS = -static
192+
noinst_PROGRAMS += secp256k1_ellswift_example
193+
secp256k1_ellswift_example_SOURCES = examples/ellswift.c
194+
secp256k1_ellswift_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
195+
secp256k1_ellswift_example_LDADD = libsecp256k1.la
196+
secp256k1_ellswift_example_LDFLAGS = -static
197197
if BUILD_WINDOWS
198-
ellswift_example_LDFLAGS += -lbcrypt
198+
secp256k1_ellswift_example_LDFLAGS += -lbcrypt
199199
endif
200-
TESTS += ellswift_example
200+
TESTS += secp256k1_ellswift_example
201201
endif
202202
if ENABLE_MODULE_MUSIG
203-
noinst_PROGRAMS += musig_example
204-
musig_example_SOURCES = examples/musig.c
205-
musig_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
206-
musig_example_LDADD = libsecp256k1.la
207-
musig_example_LDFLAGS = -static
203+
noinst_PROGRAMS += secp256k1_musig_example
204+
secp256k1_musig_example_SOURCES = examples/musig.c
205+
secp256k1_musig_example_CPPFLAGS = -I$(top_srcdir)/include -DSECP256K1_STATIC
206+
secp256k1_musig_example_LDADD = libsecp256k1.la
207+
secp256k1_musig_example_LDFLAGS = -static
208208
if BUILD_WINDOWS
209-
musig_example_LDFLAGS += -lbcrypt
209+
secp256k1_musig_example_LDFLAGS += -lbcrypt
210210
endif
211-
TESTS += musig_example
211+
TESTS += secp256k1_musig_example
212212
endif
213213
endif
214214

ci/ci.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fi
104104

105105
# Print information about binaries so that we can see that the architecture is correct
106106
file *tests* || true
107-
file bench* || true
107+
file *bench* || true
108108
file .libs/* || true
109109

110110
if [ "$SYMBOL_CHECK" = "yes" ]
@@ -136,18 +136,18 @@ fi
136136
if [ "$BENCH" = "yes" ]
137137
then
138138
{
139-
$EXEC ./bench_ecmult
140-
$EXEC ./bench_internal
141-
$EXEC ./bench
139+
$EXEC ./secp256k1_bench_ecmult
140+
$EXEC ./secp256k1_bench_internal
141+
$EXEC ./secp256k1_bench
142142
} >> bench.log 2>&1
143143
fi
144144

145145
if [ "$CTIMETESTS" = "yes" ]
146146
then
147147
if [ "$WITH_VALGRIND" = "yes" ]; then
148-
./libtool --mode=execute valgrind --error-exitcode=42 ./ctime_tests > ctime_tests.log 2>&1
148+
./libtool --mode=execute valgrind --error-exitcode=42 ./secp256k1_ctime_tests > secp256k1_ctime_tests.log 2>&1
149149
else
150-
$EXEC ./ctime_tests > ctime_tests.log 2>&1
150+
$EXEC ./secp256k1_ctime_tests > secp256k1_ctime_tests.log 2>&1
151151
fi
152152
fi
153153

src/CMakeLists.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ endif()
125125
unset(${PROJECT_NAME}_soversion)
126126

127127
if(SECP256K1_BUILD_BENCHMARK)
128-
add_executable(bench bench.c)
129-
add_executable(bench_internal bench_internal.c)
130-
add_executable(bench_ecmult bench_ecmult.c)
131-
target_link_libraries(bench secp256k1)
132-
target_link_libraries(bench_internal secp256k1_precomputed secp256k1_asm)
133-
target_link_libraries(bench_ecmult secp256k1_precomputed secp256k1_asm)
128+
add_executable(secp256k1_bench bench.c)
129+
add_executable(secp256k1_bench_internal bench_internal.c)
130+
add_executable(secp256k1_bench_ecmult bench_ecmult.c)
131+
target_link_libraries(secp256k1_bench secp256k1)
132+
target_link_libraries(secp256k1_bench_internal secp256k1_precomputed secp256k1_asm)
133+
target_link_libraries(secp256k1_bench_ecmult secp256k1_precomputed secp256k1_asm)
134134
endif()
135135

136136
if(SECP256K1_BUILD_TESTS)
@@ -144,30 +144,30 @@ if(SECP256K1_BUILD_TESTS)
144144
list(APPEND TEST_DEFINITIONS SUPPORTS_CONCURRENCY=1)
145145
endif()
146146

147-
add_executable(noverify_tests tests.c)
148-
target_link_libraries(noverify_tests secp256k1_precomputed secp256k1_asm)
149-
target_compile_definitions(noverify_tests PRIVATE ${TEST_DEFINITIONS})
150-
add_test(NAME secp256k1_noverify_tests COMMAND noverify_tests)
147+
add_executable(secp256k1_noverify_tests tests.c)
148+
target_link_libraries(secp256k1_noverify_tests secp256k1_precomputed secp256k1_asm)
149+
target_compile_definitions(secp256k1_noverify_tests PRIVATE ${TEST_DEFINITIONS})
150+
add_test(NAME secp256k1_noverify_tests COMMAND secp256k1_noverify_tests)
151151
if(NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
152-
add_executable(tests tests.c)
153-
target_compile_definitions(tests PRIVATE VERIFY ${TEST_DEFINITIONS})
154-
target_link_libraries(tests secp256k1_precomputed secp256k1_asm)
155-
add_test(NAME secp256k1_tests COMMAND tests)
152+
add_executable(secp256k1_tests tests.c)
153+
target_compile_definitions(secp256k1_tests PRIVATE VERIFY ${TEST_DEFINITIONS})
154+
target_link_libraries(secp256k1_tests secp256k1_precomputed secp256k1_asm)
155+
add_test(NAME secp256k1_tests COMMAND secp256k1_tests)
156156
endif()
157157
unset(TEST_DEFINITIONS)
158158
endif()
159159

160160
if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
161161
# Note: do not include secp256k1_precomputed in exhaustive_tests (it uses runtime-generated tables).
162-
add_executable(exhaustive_tests tests_exhaustive.c)
163-
target_link_libraries(exhaustive_tests secp256k1_asm)
164-
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
165-
add_test(NAME secp256k1_exhaustive_tests COMMAND exhaustive_tests)
162+
add_executable(secp256k1_exhaustive_tests tests_exhaustive.c)
163+
target_link_libraries(secp256k1_exhaustive_tests secp256k1_asm)
164+
target_compile_definitions(secp256k1_exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
165+
add_test(NAME secp256k1_exhaustive_tests COMMAND secp256k1_exhaustive_tests)
166166
endif()
167167

168168
if(SECP256K1_BUILD_CTIME_TESTS)
169-
add_executable(ctime_tests ctime_tests.c)
170-
target_link_libraries(ctime_tests secp256k1)
169+
add_executable(secp256k1_ctime_tests ctime_tests.c)
170+
target_link_libraries(secp256k1_ctime_tests secp256k1)
171171
endif()
172172

173173
if(SECP256K1_INSTALL)

0 commit comments

Comments
 (0)