diff options
| author | tb <> | 2022-12-09 09:56:41 +0000 |
|---|---|---|
| committer | tb <> | 2022-12-09 09:56:41 +0000 |
| commit | 25a8c6fe864509b91ae0638d284e04cb6dcea12d (patch) | |
| tree | 9803119c90aca74fd159d01417bc4f68c6996b01 /src | |
| parent | b115a8e0f2d62bef5027933dc1777ba0cc739d05 (diff) | |
| download | openbsd-25a8c6fe864509b91ae0638d284e04cb6dcea12d.tar.gz openbsd-25a8c6fe864509b91ae0638d284e04cb6dcea12d.tar.bz2 openbsd-25a8c6fe864509b91ae0638d284e04cb6dcea12d.zip | |
bn/Makefile: tidy up and simplify
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/bn/Makefile | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/regress/lib/libcrypto/bn/Makefile b/src/regress/lib/libcrypto/bn/Makefile index 1ab947a9f1..e95091aeb5 100644 --- a/src/regress/lib/libcrypto/bn/Makefile +++ b/src/regress/lib/libcrypto/bn/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.15 2022/12/02 17:34:26 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.16 2022/12/09 09:56:41 tb Exp $ |
| 2 | 2 | ||
| 3 | PROGS += bn_add_sub | 3 | PROGS += bn_add_sub |
| 4 | PROGS += bn_cmp | 4 | PROGS += bn_cmp |
| @@ -10,6 +10,7 @@ PROGS += bn_mod_sqrt | |||
| 10 | PROGS += bn_mont | 10 | PROGS += bn_mont |
| 11 | PROGS += bn_primes | 11 | PROGS += bn_primes |
| 12 | PROGS += bn_rand_interval | 12 | PROGS += bn_rand_interval |
| 13 | PROGS += bn_test | ||
| 13 | PROGS += bn_to_string | 14 | PROGS += bn_to_string |
| 14 | PROGS += bn_unit | 15 | PROGS += bn_unit |
| 15 | 16 | ||
| @@ -18,6 +19,7 @@ STATIC_LINK += bn_mod_exp | |||
| 18 | STATIC_LINK += bn_mod_exp_zero | 19 | STATIC_LINK += bn_mod_exp_zero |
| 19 | STATIC_LINK += bn_primes | 20 | STATIC_LINK += bn_primes |
| 20 | STATIC_LINK += bn_rand_interval | 21 | STATIC_LINK += bn_rand_interval |
| 22 | STATIC_LINK += bn_test | ||
| 21 | STATIC_LINK += bn_to_string | 23 | STATIC_LINK += bn_to_string |
| 22 | 24 | ||
| 23 | LDADD = -lcrypto | 25 | LDADD = -lcrypto |
| @@ -26,20 +28,14 @@ WARNINGS = Yes | |||
| 26 | CFLAGS += -Wall -Wundef -Werror | 28 | CFLAGS += -Wall -Wundef -Werror |
| 27 | CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/bn/ | 29 | CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/bn/ |
| 28 | 30 | ||
| 29 | .for p in ${PROGS} | 31 | # Use default targets from bsd.regress.mk unless overridden below |
| 30 | REGRESS_TARGETS += run-$p | 32 | REGRESS_TARGETS = ${PROGS:S/^/run-regress-/} |
| 31 | .PHONY: run-$p | ||
| 32 | |||
| 33 | run-$p: $p | ||
| 34 | ./$p | ||
| 35 | .endfor | ||
| 36 | 33 | ||
| 37 | # Verify that the bn_isqrt -C output isn't changed by accident. | 34 | # Verify that the bn_isqrt -C output isn't changed by accident. |
| 38 | isqrt-print-tables: bn_isqrt | 35 | isqrt-print-tables: bn_isqrt |
| 39 | @./bn_isqrt -C | 36 | @./bn_isqrt -C |
| 40 | .PHONY: isqrt-print-tables | 37 | .PHONY: isqrt-print-tables |
| 41 | 38 | ||
| 42 | CLEANFILES += bn_isqrt_gen_tables.txt.tmp bn_isqrt_gen_tables.txt | ||
| 43 | bn_isqrt_gen_tables.txt: bn_isqrt | 39 | bn_isqrt_gen_tables.txt: bn_isqrt |
| 44 | ${.MAKE} -C ${.CURDIR} isqrt-print-tables > $@.tmp | 40 | ${.MAKE} -C ${.CURDIR} isqrt-print-tables > $@.tmp |
| 45 | mv -f $@.tmp $@ | 41 | mv -f $@.tmp $@ |
| @@ -49,14 +45,10 @@ REGRESS_TARGETS += run-bn_isqrt_check_tables | |||
| 49 | run-bn_isqrt_check_tables: bn_isqrt_gen_tables.txt | 45 | run-bn_isqrt_check_tables: bn_isqrt_gen_tables.txt |
| 50 | diff -pu ${.CURDIR}/bn_isqrt_tables.txt bn_isqrt_gen_tables.txt | 46 | diff -pu ${.CURDIR}/bn_isqrt_tables.txt bn_isqrt_gen_tables.txt |
| 51 | 47 | ||
| 52 | # Keep bn_test last since it is special | 48 | CLEANFILES += bn_isqrt_gen_tables.txt.tmp bn_isqrt_gen_tables.txt |
| 53 | PROGS += bn_test | ||
| 54 | STATIC_LINK += bn_test | ||
| 55 | CLEANFILES += bn_test.out bc.out | ||
| 56 | 49 | ||
| 57 | REGRESS_TARGETS += run-bn_test | 50 | # bn_test is special, so override bsd.regress.mk's run-regress-bn_test |
| 58 | .PHONY: run-bn_test | 51 | run-regress-bn_test bntest.out: bn_test |
| 59 | run-bn_test bntest.out: bn_test | ||
| 60 | ./bn_test -out bn_test.out | 52 | ./bn_test -out bn_test.out |
| 61 | 53 | ||
| 62 | REGRESS_TARGETS += run-bc | 54 | REGRESS_TARGETS += run-bc |
| @@ -65,6 +57,8 @@ run-bc: bn_test.out | |||
| 65 | bc < $> | tee bc.out | grep -v '^0$$' | 57 | bc < $> | tee bc.out | grep -v '^0$$' |
| 66 | ! grep -v '^test ' <bc.out | grep -v '^0$$' | 58 | ! grep -v '^test ' <bc.out | grep -v '^0$$' |
| 67 | 59 | ||
| 60 | CLEANFILES += bn_test.out bc.out | ||
| 61 | |||
| 68 | .for p in ${STATIC_LINK} | 62 | .for p in ${STATIC_LINK} |
| 69 | LDADD_$p += ${CRYPTO_INT} | 63 | LDADD_$p += ${CRYPTO_INT} |
| 70 | .endfor | 64 | .endfor |
