summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-03-18 22:18:47 +0000
committernasr <nsrddyn@gmail.com>2026-03-18 22:18:47 +0000
commit62e8946f4f2d1759f2d73318209a523f853aa534 (patch)
tree23a6cd7d71929a37e4121b8c90f5d03c5683555c /Makefile
parentfaaebe4f754d2bf138803e94424935de12a20235 (diff)
feature(btree_implementation): rethinnking the insertion logic using a key struct
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 39e9b87..29aa256 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,25 @@
1BIN = build/engine 1BIN = build/engine
2SRC = source/tb_db.c 2SRC = source/tb_db.c
3
4# CC = gcc
3CC = clang 5CC = clang
4CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror 6
7COMPILER := $(shell $(CC) --version | grep -o "gcc\|clang" | head -1)
8
9# check for compile optimizations per compiler
10ifeq ($(COMPILER),gcc)
11 CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror -O0
12else ifeq ($(COMPILER),clang)
13 CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0
14else
15 CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0
16endif
5 17
6$(BIN): $(SRC) 18$(BIN): $(SRC)
7 mkdir -p build 19 mkdir -p build
8 $(CC) $(CFLAGS) $< -o $@ 20 $(CC) $(CFLAGS) $< -o $@
9 21
10run: 22run: $(BIN)
11 $(BIN) 23 $(BIN)
12 24
13.PHONY: clean 25.PHONY: clean