-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (69 loc) · 1.3 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
NAME = libft.a
CC = gcc
CFLAGS = -Wall -Wextra -Werror
AR = ar rcs
RM = rm -f
FILES = ft_memset \
ft_bzero \
ft_memmove \
ft_memcpy \
ft_memchr \
ft_memcmp \
ft_strlen \
ft_strlcpy \
ft_strlcat \
ft_strchr \
ft_strrchr \
ft_strncmp \
ft_strnstr \
ft_atoi \
ft_isalpha \
ft_isdigit \
ft_isalnum \
ft_isascii \
ft_isprint \
ft_toupper \
ft_tolower \
ft_strdup \
ft_calloc \
ft_substr \
ft_strjoin \
ft_strtrim \
ft_split \
ft_itoa \
ft_strmapi \
ft_striteri \
ft_putchar_fd \
ft_putstr_fd \
ft_putnbr_fd \
ft_putendl_fd \
FILES_B = ft_lstnew \
ft_lstadd_front \
ft_lstsize \
ft_lstlast \
ft_lstadd_back \
ft_lstdelone \
ft_lstclear \
ft_lstiter \
ft_lstmap \
SRCS_DIR = ./Mandatory/
SRCS_DIR_B = ./Bonus_part/
SRCS = $(addprefix $(SRCS_DIR), $(addsuffix .c, $(FILES)))
SRCS_B = $(addprefix $(SRCS_DIR_B), $(addsuffix .c, $(FILES_B)))
OBJS_DIR = ./Mandatory/
OBJS_DIR_B = ./Bonus_part/
OBJS = $(addprefix $(OBJS_DIR), $(addsuffix .o, $(FILES)))
OBJS_B = $(addprefix $(OBJS_DIR_B), $(addsuffix .o, $(FILES_B)))
.c.o: $(SRCS)
$(CC) $(CFLAGS) -c -o $@ $<
$(NAME): $(OBJS)
$(AR) $@ $^
bonus: $(OBJS_B)
$(AR) $(NAME) $^
all: $(NAME)
clean:
$(RM) $(OBJS) $(OBJS_B)
fclean: clean
$(RM) $(NAME)
re: clean all
.PHONY: bonus all clean fclean re