commit pour cleanup la merde de wescande sur git........
This commit is contained in:
parent
d66a692f8e
commit
26625dd1b1
2 changed files with 1 additions and 101 deletions
|
|
@ -1,95 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
NAME = minishell
|
|
||||||
CC = gcc
|
|
||||||
TAGFILE = .tags
|
|
||||||
|
|
||||||
D_SRC = src
|
|
||||||
F_SRC := $(shell find $(D_SRC) -type f -regex ".*\.c$$")
|
|
||||||
|
|
||||||
D_OBJ = obj
|
|
||||||
F_OBJ = $(notdir $(F_SRC:.c=.o))
|
|
||||||
DF_OBJ := $(addprefix $(D_OBJ)/, $(F_OBJ))
|
|
||||||
|
|
||||||
D_INC = includes libft/includes
|
|
||||||
F_INC := $(shell find $(D_INC) -type f -regex ".*\.h$$")
|
|
||||||
O_INC = $(addprefix -I, $(D_INC))
|
|
||||||
|
|
||||||
D_SER = libft/
|
|
||||||
O_SER = $(addprefix -L, $(D_SER))
|
|
||||||
|
|
||||||
D_LIB = ft ncurses
|
|
||||||
O_LIB = $(addprefix -l, $(D_LIB))
|
|
||||||
|
|
||||||
W_FLAGS = -Wall -Wextra -Werror
|
|
||||||
D_FLAGS = -g
|
|
||||||
|
|
||||||
MKDIR = mkdir -p
|
|
||||||
RM = /bin/rm -rf
|
|
||||||
|
|
||||||
.PHONY: all clean fclean re
|
|
||||||
|
|
||||||
all: $(NAME)
|
|
||||||
|
|
||||||
$(NAME): libft/libft.a $(DF_OBJ)
|
|
||||||
$(CC) $(O_INC) $(O_SER) $(O_LIB) $(W_FLAGS) $(DF_OBJ) -o $@ $(D_FLAGS)
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/main/%.c includes/minishell.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/builtin/%.c includes/minishell.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/minishell-exec/%.c includes/minishell.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/line-editing/%.c includes/ft_readline.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/lexer/%.c includes/lexer.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/parser/%.c includes/parser.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/exec/%.c includes/exec.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
$(D_OBJ)/%.o: $(D_SRC)/job-control/%.c includes/job_control.h
|
|
||||||
@$(MKDIR) $(D_OBJ)
|
|
||||||
@$(CC) $(O_INC) $(W_FLAGS) -c $< -o $@ $(D_FLAGS)
|
|
||||||
@echo "Compiling "$<"..."
|
|
||||||
|
|
||||||
libft/libft.a: libft/src/*/*.c
|
|
||||||
@echo "libft/libft.a"
|
|
||||||
@$(MAKE) -C libft 2>/dev/null
|
|
||||||
|
|
||||||
libft:
|
|
||||||
@echo "libft"
|
|
||||||
@$(MAKE) -C libft 2>/dev/null
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(D_OBJ)
|
|
||||||
|
|
||||||
fclean: clean
|
|
||||||
$(RM) $(NAME)
|
|
||||||
@$(MAKE) fclean -C libft/ 2>/dev/null
|
|
||||||
|
|
||||||
re: fclean all
|
|
||||||
=======
|
|
||||||
#* ************************************************************************** *#
|
#* ************************************************************************** *#
|
||||||
#* *#
|
#* *#
|
||||||
#* ::: :::::::: *#
|
#* ::: :::::::: *#
|
||||||
|
|
@ -325,4 +233,3 @@ relib: fcleanlib $(LIBFT_LIB)
|
||||||
.PHONY : fclean clean re relib cleanlib fcleanlib
|
.PHONY : fclean clean re relib cleanlib fcleanlib
|
||||||
|
|
||||||
-include $(OBJS:.o=.d)
|
-include $(OBJS:.o=.d)
|
||||||
>>>>>>> premier commit. working. . .
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
||||||
<<<<<<< HEAD
|
/* Updated: 2017/01/26 19:39:10 by jhalford ### ########.fr */
|
||||||
/* Updated: 2017/01/11 17:17:16 by jhalford ### ########.fr */
|
|
||||||
=======
|
|
||||||
/* Updated: 2017/01/05 14:24:14 by wescande ### ########.fr */
|
|
||||||
>>>>>>> premier commit. working. . .
|
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -25,12 +21,9 @@
|
||||||
# include "parser.h"
|
# include "parser.h"
|
||||||
# include "ft_readline.h"
|
# include "ft_readline.h"
|
||||||
# include "exec.h"
|
# include "exec.h"
|
||||||
<<<<<<< HEAD
|
|
||||||
# include "builtin.h"
|
# include "builtin.h"
|
||||||
# include "job_control.h"
|
# include "job_control.h"
|
||||||
=======
|
|
||||||
# include "glob.h"
|
# include "glob.h"
|
||||||
>>>>>>> premier commit. working. . .
|
|
||||||
|
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue