diff options
Diffstat (limited to 'libft')
-rw-r--r-- | libft/Makefile | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/libft/Makefile b/libft/Makefile index 2bd6342..ec87186 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -119,13 +119,6 @@ OS = $(shell uname) #-------------------------------- Compiler ------------------------------------# #==============================================================================# ifeq (${OS}, Linux) - DBG = -ggdb -else - DBG = -glldb -endif -FSANITIZE = -fsanitize=address -#------------------------------------------------------------------------------# -ifeq (${OS}, Linux) CC = gcc else CC = clang @@ -136,14 +129,6 @@ CFLAGS += -Wall CFLAGS += -Wextra CFLAGS += -Werror CFLAGS += -pedantic -ifdef DEBUG - CFLAGS += ${DBG} -endif -#------------------------------------------------------------------------------# -ifdef ASAN - CFLAGS += ${DBG} - CFLAGS += ${FSANITIZE} -endif #------------------------------------------------------------------------------# NAME = libft.a #==============================================================================# @@ -160,18 +145,22 @@ ${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS} ${NAME}: ${OBJS} ${AR} ${NAME} ${OBJS} #------------------------------------------------------------------------------# -all: ${NAME} +all: ${NAME} +#------------------------------------------------------------------------------# +debug: CFLAGS += -ggdb +debug: all +#------------------------------------------------------------------------------# +asan: CFLAGS += -ggdb +asan: CFLAGS += -fsanitize=address +asan: all #------------------------------------------------------------------------------# clean: ${RM} ${OBJS_DIR} #------------------------------------------------------------------------------# -fclean: clean +fclean: clean ${RM} ${NAME} #------------------------------------------------------------------------------# -re: fclean all -#------------------------------------------------------------------------------# -run: ${OBJS} - ${CC} ${CFLAGS} -Iinc/ -o a.out ${OBJS} ${SRCS_DIR}main.c +re: fclean all #------------------------------------------------------------------------------# .PHONY: all clean clean fclean re run default #==================================== EOF =====================================# |