-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (40 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vicrodri <vicrodri@student.42malaga.com +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/24 12:57:38 by vicrodri #+# #+# #
# Updated: 2023/07/31 17:43:36 by vicrodri ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
CC = gcc
CFLAGS = -Wall -Wextra -Werror
INC = libft/
LIBFT = $(INC)libft.a
SOURCES = $(wildcard src/*.c)
OBJECTS = $(SOURCES:.c=.o)
%.o: %.c
@$(CC)$(FLAGS) -c $< -o $@
all: $(LIBFT) $(NAME)
$(LIBFT):
@make -C $(INC)
$(NAME) : $(LIBFT) $(OBJECTS)
@$(CC) $(CFLAGS) $(LIBFT) $(OBJECTS) -lreadline -o $(NAME)
@echo "$(GREEN)$(NAME) -> program created! $(DEFAULT)"
clean:
rm -f $(OBJECTS)
@make -C $(INC) clean
@echo "$(YELLOW)$(NAME) -> Object files deleted. "
fclean: clean
rm -f $(NAME)
@echo "$(RED)$(NAME) program -> Program and objects files deleted. "
re: fclean all
.PHONY: all clean fclean re
#COLORS
RED = \033[1;31m
GREEN = \033[1;32m
YELLOW = \033[1;33m
DEFAULT = \033[0m