From 079d839aee68e52932eacbd8d4c75ba1388b006a Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Tue, 29 Oct 2019 13:22:04 +0100 Subject: tons of changes --- Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9839e5d..3ac6d22 100644 --- a/Makefile +++ b/Makefile @@ -13,34 +13,37 @@ SRCS_DIR = src/ SRCS = \ - ${SRCS_DIR}main.c + ${SRCS_DIR}main.c \ + ${SRCS_DIR}ft_process_arg.c \ + ${SRCS_DIR}ft_echo.c \ + ${SRCS_DIR}ft_pwd.c OBJS_DIR = obj/ OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS}) -INCS_DIR = -Linc/ \ - -Llibft/ -INCS = -iminishell.h \ - -ilibft.h +INCS_DIR = -Iinc/ -Ilibft/ -LIB_DIR = libft/ -LIB = ft +LIB_DIR = -Llibft/ +LIB = -lft CC = gcc CFLAGS = -Wall -Wextra -Werror +DEBUG = -g3 +FSANITIZE = -fsanitize=address + NAME = minishell RM = rm -rf MKDIR = mkdir -p -${OBJS_DIR}%.o: ${SRCS_DIR}%.c +${OBJS_DIR}%.o: ${SRCS_DIR}%.c inc/minishell.h libft/libft.h ${MKDIR} ${OBJS_DIR} - ${CC} ${CFLAGS} ${INCS_DIR} ${INCS} -o $@ -c $< + ${CC} ${CFLAGS} ${DEBUG} ${INCS_DIR} -o $@ -c $< $(NAME): ${OBJS} - ${CC} ${CFLAGS} -L${LIB_DIR} -l${LIB} -o ${NAME} ${OBJS} + ${CC} ${CFLAGS} ${DEBUG} ${LIB_DIR} ${LIB} -o ${NAME} ${OBJS} all: ${NAME} @@ -54,8 +57,7 @@ fclean: clean re: fclean all build: ${OBJS} - ${CC} ${CFLAGS} -g3 -fsanitize=address -I./ -o a.out \ - ${OBJS} + ${CC} ${CFLAGS} ${DEBUG} ${FSANITIZE} ${LIB_DIR} ${LIB} -o a.out ${OBJS} default: all -- cgit v1.2.3