added first builtin

corrected binary execution + added echo
This commit is contained in:
Tanguy MAZE
2018-11-27 18:38:24 +01:00
parent cf788bc62c
commit 4ce47a9f0b
7 changed files with 149 additions and 19 deletions

View File

@@ -6,7 +6,7 @@
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/22 14:43:33 by tmaze #+# #+# #
# Updated: 2018/11/23 10:38:13 by tmaze ### ########.fr #
# Updated: 2018/11/27 17:36:14 by tmaze ### ########.fr #
# #
#******************************************************************************#
@@ -16,9 +16,9 @@ CCSTD :=
NAME := minishell
SRCS := main.c
SRCS := main.c exec.c cmd_echo.c
OBJS_DIR := objs
OBJS := $(SRCS:.c=.o)
OBJS := $(addprefix $(OBJS_DIR)/, $(SRCS:.c=.o))
INCLS := -Iincludes -Ilibft
LIBS := -Llibft -lft
@@ -26,8 +26,8 @@ LIBS := -Llibft -lft
all: $(NAME)
$(NAME): $(OBJS_DIR)/$(OBJS) libft/libft.a
$(CC) $(CCFLAGS) $(CCSTD) $(INCLS) $< -o $(NAME) $(LIBS)
$(NAME): $(OBJS) libft/libft.a
$(CC) $(CCFLAGS) $(CCSTD) $(INCLS) $(OBJS) -o $(NAME) $(LIBS)
$(OBJS_DIR)/%.o: srcs/%.c includes/minishell.h $(OBJS_DIR)
$(CC) $(CCFLAGS) $(CCSTD) $(INCLS) -c $< -o $@