-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (41 loc) · 962 Bytes
/
Makefile
File metadata and controls
63 lines (41 loc) · 962 Bytes
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
NAME = libftprintf.a
OBJ_DIR = ./trash/
SRC_DIR = ./Src/Mandatory/
SRC_DIR_BONUS = ./Src/Bonus/
INC_DIR = ./includes/
SRCS = ft_printf.c printf_utils.c
SRCS_BONUS = ft_printf_bonus.c printf_utils_bonus.c
OBJS = $(addprefix $(OBJ_DIR), $(SRCS:.c=.o))
OBJS_BONUS = $(addprefix $(OBJ_DIR), $(SRCS_BONUS:.c=.o))
CC = gcc
CFLAGS = -Wall -Wextra -Werror
rm = rm -rf
# Colors, because colors are nice.
RED = \033[0;31m
GREEN = \033[0;32m
YELLOW = \033[0;33m
BLUE = \033[0;34m
PURPLE = \033[0;35m
CYAN = \033[0;36m
WHITE = \033[0;37m
RESET = \033[0m
all : $(NAME)
$(NAME) : $(OBJS)
@ar rcs $(NAME) $(OBJS)
$(OBJ_DIR)%.o : $(SRC_DIR)%.c
@mkdir -p trash
@$(CC) $(CFLAGS) -c $< -o $@ -I $(INC_DIR)
bonus : $(OBJS_BONUS)
@ar rcs $(NAME) $(OBJS_BONUS)
clean :
@$(rm) $(OBJ_DIR)
fclean : clean
@$(rm) $(NAME)
git :
git status
git add .
git status
git commit -m "Make Git Update"
git push
re : fclean all
.PHONY : all clean fclean re git bonus