-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·63 lines (59 loc) · 2.12 KB
/
Makefile
File metadata and controls
executable file
·63 lines (59 loc) · 2.12 KB
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
57
58
59
60
61
62
63
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: passef <passef@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/12/23 22:58:59 by passef #+# #+# #
# Updated: 2018/01/19 14:20:40 by passef ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
LIBFT = libft/libft.a
EXEC = grimly.c
SRC = grimly.c \
init_grimly.c \
gnl_grimly.c \
parsing.c \
libft/ft_puterror.c \
libft/ft_strjoin.c \
libft/ft_strlen.c \
libft/ft_strnew.c \
libft/ft_strcpy.c \
libft/ft_strrev.c \
libft/ft_bzero.c \
libft/ft_strcmp.c \
libft/ft_memcpy.c \
libft/ft_isdigit.c \
libft/ft_isprint.c \
libft/ft_atoi.c \
OBJ = $(SRC:.c=.o)
CC = gcc
FLAGS = -Wall -Wextra -Werror -g
RM = rm -rf
INC = -I includes/
FT = -I libft/
LFT = -C libft/
GREEN = \033[92m
YELLOW = \033[93m
ERASE = \033[0m
all: $(NAME)
$(NAME): $(OBJ)
@echo "\033[K$(YELLOW)[bistromatic] :$(ERASE) $(GREEN)Creating Library$(ERASE)\033[1A";
@ar rc $(NAME) $(OBJ)
@ranlib $(NAME)
@$(CC) $(FLAGS) $(EXEC) $@ -o grimly
@echo "\033[K$(YELLOW)[bistromatic] :$(ERASE) $(GREEN)bistromatic Compiled!$(ERASE)";
%.o: %.c
@$(CC) $(FLAGS) -c $< -o $@
@echo "\033[K$(YELLOW)[bistromatic] :$(ERASE) $(GREEN)Compiling $<$(ERASE) \033[1A";
clean:
@$(RM) $(OBJ)
@make $(LFT) clean
@echo "\033[K$(YELLOW)[bistromatic] :$(ERASE) $(GREEN)Cleaning Object files $(ERASE)";
fclean: clean
@$(RM) $(NAME)
@make $(LFT) fclean
@echo "\033[K$(YELLOW)[bistromatic] :$(ERASE) $(GREEN)Cleaning bistromatic $(ERASE)";
re: fclean all