-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (40 loc) · 1.61 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: knaumov <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/10/25 10:18:27 by knaumov #+# #+# #
# Updated: 2018/10/31 21:07:46 by knaumov ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS = ./srcs/*.c ./utils/*.c
INCLUDES = -I ./includes
LIBFT = ./libft/libft.a
FLAGS = -Wall -Wextra -Werror
RESET = \033[0m
RED = \033[0;31m
GREEN = \033[0;32m
BLUE = \033[0;36m
all: $(NAME)
$(NAME):
@gcc $(FLAGS) $(SRCS) $(INCLUDES) -c -g
@echo "$(GREEN)Making objects files$(RESET)"
@make -C libft
@ar rc $(NAME) ./*.o ./libft/*.o
@ranlib $(NAME)
@echo "$(GREEN)Compiling libftprintf.a$(RESET)"
@echo "$(BLUE)Complete$(RESET)"
clean:
@/bin/rm -f ./*.o
@make -C libft clean
@echo "$(RED)Deleting objects for libftprintf.a$(RESET)"
@echo "$(BLUE)Complete$(RESET)"
fclean: clean
@/bin/rm -f $(NAME)
@echo "$(RED)Deleting libftprintf.a$(RESET)"
@make -C libft fclean
@echo "$(BLUE)Complete$(RESET)"
re: fclean all