diff options
| author | nasr <nsrddyn@gmail.com> | 2026-03-18 22:18:47 +0000 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-03-18 22:18:47 +0000 |
| commit | 62e8946f4f2d1759f2d73318209a523f853aa534 (patch) | |
| tree | 23a6cd7d71929a37e4121b8c90f5d03c5683555c /Makefile | |
| parent | faaebe4f754d2bf138803e94424935de12a20235 (diff) | |
feature(btree_implementation): rethinnking the insertion logic using a key struct
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 14 insertions, 2 deletions
| @@ -1,13 +1,25 @@ | |||
| 1 | BIN = build/engine | 1 | BIN = build/engine |
| 2 | SRC = source/tb_db.c | 2 | SRC = source/tb_db.c |
| 3 | |||
| 4 | # CC = gcc | ||
| 3 | CC = clang | 5 | CC = clang |
| 4 | CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror | 6 | |
| 7 | COMPILER := $(shell $(CC) --version | grep -o "gcc\|clang" | head -1) | ||
| 8 | |||
| 9 | # check for compile optimizations per compiler | ||
| 10 | ifeq ($(COMPILER),gcc) | ||
| 11 | CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -Werror -O0 | ||
| 12 | else ifeq ($(COMPILER),clang) | ||
| 13 | CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0 | ||
| 14 | else | ||
| 15 | CFLAGS = -Wall -Wextra -Wpedantic -Wno-unused-function -g -O0 | ||
| 16 | endif | ||
| 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 | ||
| 10 | run: | 22 | run: $(BIN) |
| 11 | $(BIN) | 23 | $(BIN) |
| 12 | 24 | ||
| 13 | .PHONY: clean | 25 | .PHONY: clean |
