From 0d7a57a7bc14831d6d7076ccb0ea7a7213ddd7fb Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Tue, 25 Jun 2024 13:03:28 +0200 Subject: Add debug tools * Add dbg() function and debug make rule * Add panic() debug function--- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fb679ae..6fe15b6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ LIBS = -L $(LIB_DIR)/libft -lft HEADERS = -I include -I $(LIB_DIR)/libft VPATH := src -SRC := main.c +SRC := main.c debug_tools.c OBJ_DIR := _obj OBJ := $(addprefix $(OBJ_DIR)/, $(SRC:%.c=%.o)) @@ -51,7 +51,15 @@ fclean: clean re: fclean all -.PHONY: all clean fclean re libs +debug: CFLAGS += -g +debug: CFLAGS += -fsanitize=address -fsanitize=undefined \ + -fno-sanitize-recover=all -fsanitize=float-divide-by-zero \ + -fsanitize=float-cast-overflow -fno-sanitize=null \ + -fno-sanitize=alignment +debug: CFLAGS += -DDEBUG=1 +debug: clean all + +.PHONY: all clean fclean re libs debug ################################################################################ ################################################################################ -- cgit v1.2.3