summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-04-28 18:20:59 +1000
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-04-28 18:20:59 +1000
commit520368d0f0a13f618b1161099bae3643796f8271 (patch)
tree8ad714570c529f43ca462b0a8ec685158ec0195a /Makefile
parent5efda53994d1c876d1f6f0628024091a7b94b943 (diff)
build(make): Make bench build conditional on USE_BENCH
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
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