summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-10-29 12:25:57 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2019-10-29 12:25:57 +0100
commit507661351ca718c8a3d8213a0a80f994825fc881 (patch)
treeeb9192a57e884e5bcf96f79d98cf7659924ce1df /Makefile
parentMakefile complete (diff)
download42-minishell-507661351ca718c8a3d8213a0a80f994825fc881.tar.gz
42-minishell-507661351ca718c8a3d8213a0a80f994825fc881.tar.bz2
42-minishell-507661351ca718c8a3d8213a0a80f994825fc881.tar.xz
42-minishell-507661351ca718c8a3d8213a0a80f994825fc881.tar.zst
42-minishell-507661351ca718c8a3d8213a0a80f994825fc881.zip
libft included
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3b2fd89..9839e5d 100644
--- a/Makefile
+++ b/Makefile
@@ -18,23 +18,29 @@ SRCS = \
OBJS_DIR = obj/
OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS})
-INCS_DIR = inc/
+INCS_DIR = -Linc/ \
+ -Llibft/
+INCS = -iminishell.h \
+ -ilibft.h
+
+LIB_DIR = libft/
+LIB = ft
CC = gcc
CFLAGS = -Wall -Wextra -Werror
NAME = minishell
-RM = rm -f
+RM = rm -rf
MKDIR = mkdir -p
${OBJS_DIR}%.o: ${SRCS_DIR}%.c
${MKDIR} ${OBJS_DIR}
- ${CC} ${CFLAGS} -I${INCS_DIR} -o $@ -c $<
+ ${CC} ${CFLAGS} ${INCS_DIR} ${INCS} -o $@ -c $<
$(NAME): ${OBJS}
- ${CC} ${CFLAGS} -I${INCS_DIR} -o ${NAME} ${OBJS}
+ ${CC} ${CFLAGS} -L${LIB_DIR} -l${LIB} -o ${NAME} ${OBJS}
all: ${NAME}
@@ -43,6 +49,7 @@ clean:
fclean: clean
${RM} ${NAME}
+ ${RM} ${NAME}.dSYM
re: fclean all