diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-29 08:55:26 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-29 08:55:26 +0100 |
commit | 8ba0a5090eb3a08fc00662293bba0cce78ad7649 (patch) | |
tree | ce58b9a75b6c8dfd04793b62bc3f496744e0a6ea | |
parent | first commit (diff) | |
download | 42-minishell-8ba0a5090eb3a08fc00662293bba0cce78ad7649.tar.gz 42-minishell-8ba0a5090eb3a08fc00662293bba0cce78ad7649.tar.bz2 42-minishell-8ba0a5090eb3a08fc00662293bba0cce78ad7649.tar.xz 42-minishell-8ba0a5090eb3a08fc00662293bba0cce78ad7649.tar.zst 42-minishell-8ba0a5090eb3a08fc00662293bba0cce78ad7649.zip |
Makefile complete
Diffstat (limited to '')
-rw-r--r-- | Makefile | 55 | ||||
-rw-r--r-- | src/main.c | 14 |
2 files changed, 68 insertions, 1 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3b2fd89 --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +# **************************************************************************** # +# LE - / # +# / # +# Makefile .:: .:/ . .:: # +# +:+:+ +: +: +:+:+ # +# By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ # +# #+# #+ #+ #+# # +# Created: 2019/10/08 15:04:55 by rbousset #+# ## ## #+# # +# Updated: 2019/10/13 14:01:21 by rbousset ### #+. /#+ ###.fr # +# / # +# / # +# **************************************************************************** # + +SRCS_DIR = src/ +SRCS = \ + ${SRCS_DIR}main.c + +OBJS_DIR = obj/ +OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS}) + +INCS_DIR = inc/ + +CC = gcc +CFLAGS = -Wall -Wextra -Werror + +NAME = minishell + +RM = rm -f +MKDIR = mkdir -p + + +${OBJS_DIR}%.o: ${SRCS_DIR}%.c + ${MKDIR} ${OBJS_DIR} + ${CC} ${CFLAGS} -I${INCS_DIR} -o $@ -c $< + +$(NAME): ${OBJS} + ${CC} ${CFLAGS} -I${INCS_DIR} -o ${NAME} ${OBJS} + +all: ${NAME} + +clean: + ${RM} ${OBJS} ${B_OBJS} + +fclean: clean + ${RM} ${NAME} + +re: fclean all + +build: ${OBJS} + ${CC} ${CFLAGS} -g3 -fsanitize=address -I./ -o a.out \ + ${OBJS} + +default: all + +.PHONY: all clean clean fclean re bonus run @@ -1,3 +1,16 @@ +/* ************************************************************************** */ +/* LE - / */ +/* / */ +/* main.c .:: .:/ . .:: */ +/* +:+:+ +: +: +:+:+ */ +/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */ +/* #+# #+ #+ #+# */ +/* Created: 2019/10/29 08:47:37 by rbousset #+# ## ## #+# */ +/* Updated: 2019/10/29 08:47:39 by rbousset ### #+. /#+ ###.fr */ +/* / */ +/* / */ +/* ************************************************************************** */ + #include <unistd.h> int @@ -8,7 +21,6 @@ int (void)argv; while (read(1, &c, 1) > 0) { - } return (0); } |