Merge branch 'main' of github.com:mdev9/minishell
This commit is contained in:
26
Makefile
Executable file → Normal file
26
Makefile
Executable file → Normal file
@ -3,35 +3,35 @@
|
||||
# ::: :::::::: #
|
||||
# Makefile :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ #
|
||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
|
||||
# Updated: 2024/02/16 21:31:30 by marde-vr ### ########.fr #
|
||||
# Updated: 2024/02/16 21:56:22 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
CC = cc
|
||||
|
||||
SRCS = main.c\
|
||||
SRCS_RAW = main.c\
|
||||
lst_cmd.c\
|
||||
cd.c\
|
||||
lst_env.c\
|
||||
exec.c\
|
||||
exit.c\
|
||||
echo.c\
|
||||
pwd.c\
|
||||
cd.c\
|
||||
parsing.c\
|
||||
debug.c\
|
||||
env_to_char_tab.c\
|
||||
parsing_var.c\
|
||||
minishellrc.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
OBJS_DIR = objs/
|
||||
SRCS_DIR = srcs/
|
||||
SRCS = $(addprefix $(SRCS_DIR), $(SRCS_RAW))
|
||||
OBJS = $(addprefix $(OBJS_DIR), $(SRCS_RAW:.c=.o))
|
||||
|
||||
FLAGS = -Wall -Wextra -Werror -g
|
||||
|
||||
LIBFT = libft/libft.a
|
||||
|
||||
NAME = minishell
|
||||
|
||||
all: $(NAME)
|
||||
@ -42,15 +42,19 @@ $(NAME) : $(LIBFT) $(OBJS)
|
||||
$(LIBFT):
|
||||
make --no-print-directory -j -C ./libft
|
||||
|
||||
.c.o:
|
||||
$(OBJS_DIR):
|
||||
mkdir -p $(OBJS_DIR)
|
||||
|
||||
$(OBJS_DIR)%.o : $(SRCS_DIR)%.c | $(OBJS_DIR)
|
||||
$(CC) $(FLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
make --no-print-directory -C ./libft fclean
|
||||
rm -rf $(OBJS_DIR)
|
||||
make --no-print-directory -C ./libft clean
|
||||
|
||||
fclean: clean
|
||||
rm -f $(NAME)
|
||||
make --no-print-directory -C ./libft fclean
|
||||
|
||||
re: fclean all
|
||||
|
||||
|
@ -6,13 +6,11 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */
|
||||
/* Updated: 2024/02/16 21:20:57 by marde-vr ### ########.fr */
|
||||
/* Updated: 2024/02/16 21:56:40 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft/libft.h"
|
||||
#include "minishell.h"
|
||||
#include <readline/readline.h>
|
||||
|
||||
int exec_builtin(t_cmd *parsed_cmd, t_env *env)
|
||||
{
|
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/02 21:59:20 by tomoron #+# #+# */
|
||||
/* Updated: 2024/02/16 21:30:50 by marde-vr ### ########.fr */
|
||||
/* Updated: 2024/02/16 21:57:11 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/04 17:31:38 by tomoron #+# #+# */
|
||||
/* Updated: 2024/02/16 21:25:14 by tomoron ### ########.fr */
|
||||
/* Updated: 2024/02/16 21:51:37 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
# include <limits.h>
|
||||
# include <stdio.h>//debug
|
||||
# include <sys/wait.h>
|
||||
# include "libft/libft.h"
|
||||
# include "../libft/libft.h"
|
||||
# include "fcntl.h"
|
||||
|
||||
typedef enum e_token_type
|
Reference in New Issue
Block a user