From 9802644a3c6f7d4de289b425eb5ac76a07a0f523 Mon Sep 17 00:00:00 2001 From: 0scar Date: Thu, 16 Sep 2021 20:55:43 +0200 Subject: Add template for btrees --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e340023 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +CC = gcc +LFLAGS = +FLAGS = -ansi -Wall -Wextra -pedantic +OUT = btree-test +SRC :=$(wildcard src/*.c) +OBJ :=$(addprefix obj/,$(notdir $(SRC:.c=.o))) + +.PHONY: clean + +test: debug + ./$(OUT) + +gdb: debug + gdb -q -ex r $(OUT) + +debug: DEFS += -g3 -DDEBUG +debug: obj build + +build: $(OUT) + +$(OUT): $(OBJ) + $(CC) $(DEFS) $(FLAGS) $(LFLAGS) -o $(OUT) $(OBJ) + +obj/%.o: src/%.c + $(CC) $(DEFS) $(FLAGS) -c -o $@ $< + +obj: + mkdir -p $@ + +clean: + rm -rf $(OUT) obj -- cgit v1.3