From 62e8946f4f2d1759f2d73318209a523f853aa534 Mon Sep 17 00:00:00 2001 From: nasr Date: Wed, 18 Mar 2026 22:18:47 +0000 Subject: feature(btree_implementation): rethinnking the insertion logic using a key struct --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 39e9b87..29aa256 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,25 @@ BIN = build/engine SRC = source/tb_db.c + +# CC = gcc CC = clang -CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror + +COMPILER := $(shell $(CC) --version | grep -o "gcc\|clang" | head -1) + +# check for compile optimizations per compiler +ifeq ($(COMPILER),gcc) + CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror -O0 +else ifeq ($(COMPILER),clang) + CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0 +else + CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0 +endif $(BIN): $(SRC) mkdir -p build $(CC) $(CFLAGS) $< -o $@ -run: +run: $(BIN) $(BIN) .PHONY: clean -- cgit v1.3