summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-05-07 09:46:01 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-05-07 09:46:01 +0200
commit7be226069cfebe8b36efe1b621affcef0c91b7d5 (patch)
tree6fc826cf08ff7c3b34eb8d290f723d3b823a6206
parentAdded pipes struct (diff)
download42-minishell-7be226069cfebe8b36efe1b621affcef0c91b7d5.tar.gz
42-minishell-7be226069cfebe8b36efe1b621affcef0c91b7d5.tar.bz2
42-minishell-7be226069cfebe8b36efe1b621affcef0c91b7d5.tar.xz
42-minishell-7be226069cfebe8b36efe1b621affcef0c91b7d5.tar.zst
42-minishell-7be226069cfebe8b36efe1b621affcef0c91b7d5.zip
Smart-ass Makefile
Diffstat (limited to '')
-rw-r--r--Makefile87
-rw-r--r--src/ft_s_lpipes.c12
-rw-r--r--src/ft_s_lpipes.h15
3 files changed, 72 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 77e748f..ed4e971 100644
--- a/Makefile
+++ b/Makefile
@@ -14,48 +14,51 @@ LFT_SRCS_DIR = ${LFT_DIR}src/
#==============================================================================#
#--------------------------------- FILES --------------------------------------#
#==============================================================================#
-SRCS_NAME = minishell.c
-SRCS_NAME += ft_b_cd.c
-SRCS_NAME += ft_b_echo.c
-SRCS_NAME += ft_b_env.c
-SRCS_NAME += ft_b_exit.c
-SRCS_NAME += ft_b_export.c
-SRCS_NAME += ft_b_pwd.c
-SRCS_NAME += ft_b_type.c
-SRCS_NAME += ft_b_unset.c
-SRCS_NAME += ft_e_builtins.c
-SRCS_NAME += ft_e_externs.c
-SRCS_NAME += ft_e_externs_next.c
-SRCS_NAME += ft_e_lcom.c
-SRCS_NAME += ft_f_chdir.c
-SRCS_NAME += ft_f_errno.c
-SRCS_NAME += ft_f_fail.c
-SRCS_NAME += ft_f_redir.c
-SRCS_NAME += ft_m_argv.c
-SRCS_NAME += ft_m_comm.c
-SRCS_NAME += ft_m_funptr.c
-SRCS_NAME += ft_m_loop.c
-SRCS_NAME += ft_m_prompt.c
-SRCS_NAME += ft_m_redirs.c
-SRCS_NAME += ft_s_destroy.c
-SRCS_NAME += ft_s_init.c
-SRCS_NAME += ft_s_lcom.c
-SRCS_NAME += ft_s_lvars.c
-SRCS_NAME += ft_p_line.c
-SRCS_NAME += ft_p_lcom.c
-SRCS_NAME += ft_p_lcom_next.c
-SRCS_NAME += ft_u_utils.c
-SRCS_NAME += ft_u_vars.c
-#------------------------------------------------------------------------------#
-SRCS = $(addprefix ${SRCS_DIR}, ${SRCS_NAME})
-#------------------------------------------------------------------------------#
-INCS_NAME = ft_b_builtins.h
-INCS_NAME += ft_d_enum.h
-INCS_NAME += ft_d_define.h
-INCS_NAME += ft_s_struct.h
-INCS_NAME += $(patsubst %.c,%.h,${SRCS_NAME})
-#------------------------------------------------------------------------------#
-INCS = $(addprefix ${SRCS_DIR}, ${INCS_NAME})
+SRCS_NAME = b_cd
+SRCS_NAME += b_echo
+SRCS_NAME += b_env
+SRCS_NAME += b_exit
+SRCS_NAME += b_export
+SRCS_NAME += b_pwd
+SRCS_NAME += b_type
+SRCS_NAME += b_unset
+SRCS_NAME += e_builtins
+SRCS_NAME += e_externs
+SRCS_NAME += e_externs_next
+SRCS_NAME += e_lcom
+SRCS_NAME += f_chdir
+SRCS_NAME += f_errno
+SRCS_NAME += f_fail
+SRCS_NAME += f_redir
+SRCS_NAME += m_argv
+SRCS_NAME += m_comm
+SRCS_NAME += m_funptr
+SRCS_NAME += m_loop
+SRCS_NAME += m_prompt
+SRCS_NAME += m_redirs
+SRCS_NAME += s_destroy
+SRCS_NAME += s_init
+SRCS_NAME += s_lcom
+SRCS_NAME += s_lvars
+SRCS_NAME += s_lpipes
+SRCS_NAME += p_line
+SRCS_NAME += p_lcom
+SRCS_NAME += p_lcom_next
+SRCS_NAME += u_utils
+SRCS_NAME += u_vars
+#------------------------------------------------------------------------------#
+SRCS = $(addprefix ${SRCS_DIR}, $(addprefix ft_, \
+ $(addsuffix .c, ${SRCS_NAME})))
+SRCS += ${SRCS_DIR}minishell.c
+#------------------------------------------------------------------------------#
+INCS_NAME = b_builtins
+INCS_NAME += d_enum
+INCS_NAME += d_define
+INCS_NAME += s_struct
+#------------------------------------------------------------------------------#
+INCS = $(addprefix ${SRCS_DIR}, $(addprefix ft_, \
+ $(addsuffix .h, ${INCS_NAME})))
+INCS += $(patsubst %.c,%.h,${SRCS})
#------------------------------------------------------------------------------#
OBJS = $(patsubst ${SRCS_DIR}%.c,${OBJS_DIR}%.o,${SRCS})
#------------------------------------------------------------------------------#
diff --git a/src/ft_s_lpipes.c b/src/ft_s_lpipes.c
new file mode 100644
index 0000000..c23808b
--- /dev/null
+++ b/src/ft_s_lpipes.c
@@ -0,0 +1,12 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_s_lpipes.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
diff --git a/src/ft_s_lpipes.h b/src/ft_s_lpipes.h
new file mode 100644
index 0000000..fc641de
--- /dev/null
+++ b/src/ft_s_lpipes.h
@@ -0,0 +1,15 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_s_lpipes.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef FT_P_LPIPES_H
+#define FT_P_LPIPES_H
+#endif