-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (37 loc) · 1.42 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: edcastro <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/06/09 19:42:00 by eduardo #+# #+# #
# Updated: 2023/06/15 17:14:57 by edcastro ### ########.fr #
# #
# **************************************************************************** #
# colors
GREEN := \033[0;32m
YELLOW := \033[0;33m
# variables
NAME := libft.a
OBJ = $(FTS:%.c=%.o)
BOBJ = $(BFTS:%.c=%.o)
# files
BFTS:= $(wildcard bonus/*.c)
FTS := $(wildcard mandatory/*.c)
# rules
%.o : %.c
@cc -c -Wall -Wextra -Werror $< -I . -o $@
all: $(NAME)
$(NAME): $(OBJ)
@ar rc $(NAME) $(OBJ)
@echo "$(GREEN)Successfully Compiled!"
clean:
@rm -f $(OBJ) $(BOBJ)
@echo "$(YELLOW)Was Cleaned!"
fclean: clean
@rm -f $(NAME)
re: fclean all
bonus: $(BOBJ)
@echo "$(GREEN)Bonus Successfully Compiled!"
.PHONY: all clean fclean re bonus