From 0cd2b1aaa9863fc401d0f92e73ee8aab5f90aa15 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 3 Feb 2026 17:05:29 -0600 Subject: [PATCH] make: Added hooks to pass BENCH_PERBYTE/NOR/NAND through Just makes it a bit easier to fiddle with. I don't think we can adopt the same prefix => define trick for LFS3_* defines. If we did it'd pull in things like BENCH_CFLAGS, recursively... --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 2c3c98be..ab7eef85 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,9 @@ BENCH_CFLAGS += -Wl,--wrap=malloc BENCH_CFLAGS += -Wl,--wrap=free BENCH_CFLAGS += -Wl,--wrap=realloc endif +ifdef BENCH_PERBYTE +BENCH_CFLAGS += -DBENCH_PERBYTE +endif ifdef VERBOSE CODEFLAGS += -v @@ -193,6 +196,14 @@ TESTFLAGS += --perf-path="$(PERF)" BENCHFLAGS += --perf-path="$(PERF)" endif +# alternative bench geometries (defaults to NOR flash) +ifdef BENCH_NOR +BENCHFLAGS += -DDISK_GEOMETRY=0 +endif +ifdef BENCH_NAND +BENCHFLAGS += -DDISK_GEOMETRY=1 +endif + # this is a bit of a hack, but we want to make sure the BUILDDIR # directory structure is correct before we run any commands ifneq ($(BUILDDIR),.)