Skip to content

Commit ccf56b1

Browse files
committed
Minor Makefile cleanup to align with mlkem-native
Signed-off-by: Matthias J. Kannwischer <[email protected]>
1 parent 9439d95 commit ccf56b1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ endif
3232

3333
W := $(EXEC_WRAPPER)
3434

35-
# Detect available SHA256 command
36-
SHA256SUM := $(shell command -v shasum >/dev/null 2>&1 && echo "shasum -a 256" || (command -v sha256sum >/dev/null 2>&1 && echo "sha256sum" || echo ""))
37-
ifeq ($(SHA256SUM),)
38-
$(error Neither 'shasum' nor 'sha256sum' found. Please install one of these tools.)
39-
endif
40-
4135
include test/mk/config.mk
4236
include test/mk/compiler.mk
4337
include test/mk/auto.mk
@@ -52,6 +46,12 @@ build: func kat acvp
5246
test: run_kat run_func run_acvp
5347
$(Q)echo " Everything checks fine!"
5448

49+
# Detect available SHA256 command
50+
SHA256SUM := $(shell command -v shasum >/dev/null 2>&1 && echo "shasum -a 256" || (command -v sha256sum >/dev/null 2>&1 && echo "sha256sum" || echo ""))
51+
ifeq ($(SHA256SUM),)
52+
$(error Neither 'shasum' nor 'sha256sum' found. Please install one of these tools.)
53+
endif
54+
5555
run_kat_44: kat_44
5656
set -o pipefail; $(W) $(MLDSA44_DIR)/bin/gen_KAT44 | $(SHA256SUM) | cut -d " " -f 1 | xargs ./META.sh ML-DSA-44 kat-sha256
5757
run_kat_65: kat_65
@@ -218,8 +218,10 @@ clean:
218218
-$(RM) -rf *.gcno *.gcda *.lcov *.o *.so
219219
-$(RM) -rf $(BUILD_DIR)
220220
-make clean -C examples/bring_your_own_fips202 >/dev/null
221+
-make clean -C examples/bring_your_own_fips202_static >/dev/null
221222
-make clean -C examples/basic >/dev/null
223+
-make clean -C examples/basic_deterministic >/dev/null
222224
-make clean -C examples/monolithic_build >/dev/null
223-
-make clean -C examples/monolithic_build_multilevel >/dev/null
224225
-make clean -C examples/monolithic_build_native >/dev/null
226+
-make clean -C examples/monolithic_build_multilevel >/dev/null
225227
-make clean -C examples/monolithic_build_multilevel_native >/dev/null

test/mk/auto.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) The mlkem-native project authors
22
# Copyright (c) The mldsa-native project authors
33
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
4-
4+
#
55
# Automatically detect system architecture and set preprocessor flags accordingly
66
# This file detects host CPU capabilities and combines them with compiler support
77
# to enable optimal compilation flags.

0 commit comments

Comments
 (0)