-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (32 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: apuchill <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/05/06 21:56:58 by apuchill #+# #+# #
# Updated: 2021/03/07 18:56:25 by apuchill ### ########.fr #
# #
# **************************************************************************** #
CC = clang
CFLAGS = -Wall -Wextra -Werror
RM = /bin/rm -f
NAME = libftprintf.a
SRCS = ft_printf.c ft_printf_flags.c ft_printf_cs_pct.c ft_printf_piduxo.c \
ft_printf_fg.c ft_printf_e.c ft_ftoa_rnd.c \
ft_printf_utils.c ft_printf_utils_2.c ft_printf_utils_3.c
OBJS = $(SRCS:.c=.o)
.c.o:
@$(CC) $(CFLAGS) -c $< -o $(<:.c=.o)
all: $(NAME)
$(NAME): $(OBJS)
@ar -rcs $(NAME) $(OBJS)
bonus: all
clean:
@$(RM) $(OBJS)
fclean: clean
@$(RM) $(NAME)
re: fclean all
rebonus: fclean bonus
.PHONY: all clean fclean re bonus rebonus