summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-10-29 13:22:04 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-10-29 13:22:04 +0100
commit079d839aee68e52932eacbd8d4c75ba1388b006a (patch)
tree406665acdbfa9e61fbccad924d4dcc27de0463e1 /Makefile
parentlibft included (diff)
download42-minishell-079d839aee68e52932eacbd8d4c75ba1388b006a.tar.gz
42-minishell-079d839aee68e52932eacbd8d4c75ba1388b006a.tar.bz2
42-minishell-079d839aee68e52932eacbd8d4c75ba1388b006a.tar.xz
42-minishell-079d839aee68e52932eacbd8d4c75ba1388b006a.tar.zst
42-minishell-079d839aee68e52932eacbd8d4c75ba1388b006a.zip
tons of changes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 14 insertions, 12 deletions
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