coucou
This commit is contained in:
37
Makefile
Executable file → Normal file
37
Makefile
Executable file → Normal file
@ -1,18 +1,5 @@
|
|||||||
# **************************************************************************** #
|
|
||||||
# #
|
|
||||||
# ::: :::::::: #
|
|
||||||
# Makefile :+: :+: :+: #
|
|
||||||
# +:+ +:+ +:+ #
|
|
||||||
# By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ #
|
|
||||||
# +#+#+#+#+#+ +#+ #
|
|
||||||
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
|
|
||||||
# Updated: 2024/02/16 21:24:47 by tomoron ### ########.fr #
|
|
||||||
# #
|
|
||||||
# **************************************************************************** #
|
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
|
SRCS_RAW = main.c\
|
||||||
SRCS = main.c\
|
|
||||||
lst_cmd.c\
|
lst_cmd.c\
|
||||||
lst_env.c\
|
lst_env.c\
|
||||||
exec.c\
|
exec.c\
|
||||||
@ -25,35 +12,37 @@ SRCS = main.c\
|
|||||||
parsing_var.c\
|
parsing_var.c\
|
||||||
minishellrc.c
|
minishellrc.c
|
||||||
|
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS_DIR = objs/
|
||||||
|
SRCS_DIR = srcs/
|
||||||
OBJS_DIR = objs
|
SRCS = $(addprefix $(SRCS_DIR), $(SRCS_RAW))
|
||||||
|
OBJS = $(addprefix $(OBJS_DIR), $(SRCS_RAW:.c=.o))
|
||||||
FLAGS = -Wall -Wextra -Werror -g
|
FLAGS = -Wall -Wextra -Werror -g
|
||||||
|
|
||||||
LIBFT = libft/libft.a
|
LIBFT = libft/libft.a
|
||||||
|
|
||||||
NAME = minishell
|
NAME = minishell
|
||||||
|
|
||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
$(NAME) : $(LIBFT) $(OBJS)
|
$(NAME) : $(LIBFT) $(OBJS)
|
||||||
mkdir $(OBJS_DIR)
|
|
||||||
$(CC) $(FLAGS) $(OBJS) $(LIBFT) -lreadline -o $(NAME)
|
$(CC) $(FLAGS) $(OBJS) $(LIBFT) -lreadline -o $(NAME)
|
||||||
|
|
||||||
$(LIBFT):
|
$(LIBFT):
|
||||||
make --no-print-directory -j -C ./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 $@
|
$(CC) $(FLAGS) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS)
|
rm -rf $(OBJS_DIR)
|
||||||
make --no-print-directory -C ./libft fclean
|
make --no-print-directory -C ./libft clean
|
||||||
|
|
||||||
fclean: clean
|
fclean: clean
|
||||||
rm -f $(NAME)
|
rm -f $(NAME)
|
||||||
|
make --no-print-directory -C ./libft fclean
|
||||||
|
|
||||||
re: fclean all
|
re: fclean all
|
||||||
|
|
||||||
.PHONY: all clean fclean re
|
.PHONY: all clean fclean re
|
||||||
|
|
||||||
|
@ -6,13 +6,11 @@
|
|||||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */
|
/* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */
|
||||||
/* Updated: 2024/02/16 17:26:04 by marde-vr ### ########.fr */
|
/* Updated: 2024/02/16 21:52:02 by tomoron ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "libft/libft.h"
|
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
#include <readline/readline.h>
|
|
||||||
|
|
||||||
int exec_builtin(t_cmd *parsed_cmd, t_env *env)
|
int exec_builtin(t_cmd *parsed_cmd, t_env *env)
|
||||||
{
|
{
|
@ -6,11 +6,7 @@
|
|||||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/02 21:59:20 by tomoron #+# #+# */
|
/* Created: 2024/02/02 21:59:20 by tomoron #+# #+# */
|
||||||
<<<<<<< HEAD
|
/* Updated: 2024/02/16 21:29:05 by tomoron ### ########.fr */
|
||||||
/* Updated: 2024/02/16 16:37:13 by tomoron ### ########.fr */
|
|
||||||
=======
|
|
||||||
/* Updated: 2024/02/16 18:21:27 by marde-vr ### ########.fr */
|
|
||||||
>>>>>>> ad1de58fb2aacb8a3b1b7ef5d74fc6d87f4550b2
|
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/04 17:31:38 by tomoron #+# #+# */
|
/* 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 <limits.h>
|
||||||
# include <stdio.h>//debug
|
# include <stdio.h>//debug
|
||||||
# include <sys/wait.h>
|
# include <sys/wait.h>
|
||||||
# include "libft/libft.h"
|
# include "../libft/libft.h"
|
||||||
# include "fcntl.h"
|
# include "fcntl.h"
|
||||||
|
|
||||||
typedef enum e_token_type
|
typedef enum e_token_type
|
Reference in New Issue
Block a user