From 520368d0f0a13f618b1161099bae3643796f8271 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 28 Apr 2026 18:20:59 +1000 Subject: build(make): Make bench build conditional on USE_BENCH --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7ab10e1..cca0169 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ OUTDIR = build BENCH_OUT = $(OUTDIR)/bench LIB = libtinyff.a -ALL_CFLAGS = -Wall -Wextra -Werror -std=c11 -Iinclude -Ibench +ALL_CFLAGS = -Wall -Wextra -Werror -std=c11 -Iinclude DEBUG_FLAGS = -g -O0 -fno-omit-frame-pointer RELEASE_FLAGS = -O2 @@ -19,6 +19,11 @@ ALL_CFLAGS += -DUSE_HOSTED -Iinclude/bridges SRC += $(shell find src/bridges -name "*.c") endif +ifeq ($(USE_BENCH),1) +ALL_CFLAGS += -DUSE_BENCH -Ibench +SRC += $(shell find bench/src -name "*.c") +endif + OBJ = $(patsubst %.c,$(OUTDIR)/%.o,$(SRC)) all: release -- cgit v1.2.3