-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.7 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: hluiz-ma <hluiz-ma@student.42porto.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/05/07 21:15:44 by hluiz-ma #+# #+# #
# Updated: 2024/05/12 18:37:54 by hluiz-ma ### ########.fr #
# #
# **************************************************************************** #
NAME= libftprintf.a
CC= cc
CFLAGS= -Wall -Wextra -Werror -c
OBJS= $(SRCS:.c=.o)
LIBFT= ./libft/libft.a
SRCS= ft_format.c ft_printf.c ft_putchar.c ft_putstr.c
RM= rm -rf
all: $(NAME)
$(NAME): $(OBJS)
@make all -C libft
@cp $(LIBFT) $(NAME)
@ar rcs $(NAME) $(OBJS)
@echo "\033[90m[\033[32mSuccess\033[90m]\033[32m Successfully compiled Libft.\033[0m"
@echo "\033[0;31m𓄿 𓅓 Made by Alabar 𓄿 𓅓"
%.o: %.c
@$(CC) $(CFLAGS) -c $^ -o $@
@echo "\033[90m[\033[32mOK\033[90m]\033[34m Compiling $<\033[0m"
clean:
@$(RM) $(OBJS) $(OBJS_BONUS)
@echo "\033[90m[\033[91mDeleting\033[90m]\033[31m Object files deleted\033[0m"
fclean: clean
@$(RM) $(NAME)
@make -C ./libft fclean
@echo "\033[90m[\033[91mDeleting\033[90m]\033[31m Libft.a deleted.\033[0m"
re: fclean all
.PHONY: all clean fclean re