summaryrefslogtreecommitdiffstats
path: root/libft
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 14:51:45 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 14:51:45 +0200
commitc9e4fb6e2ad07e13cf41d6ce6afad30b04011765 (patch)
tree74d816c107c959315ae52166dac96fe2fe0c2a5e /libft
parentWell well well that wasn't too bad, now remake everything (diff)
download42-minishell-c9e4fb6e2ad07e13cf41d6ce6afad30b04011765.tar.gz
42-minishell-c9e4fb6e2ad07e13cf41d6ce6afad30b04011765.tar.bz2
42-minishell-c9e4fb6e2ad07e13cf41d6ce6afad30b04011765.tar.xz
42-minishell-c9e4fb6e2ad07e13cf41d6ce6afad30b04011765.tar.zst
42-minishell-c9e4fb6e2ad07e13cf41d6ce6afad30b04011765.zip
Solid base
Diffstat (limited to 'libft')
-rw-r--r--libft/Makefile31
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 =====================================#