diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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 |