-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·56 lines (42 loc) · 1.7 KB
/
Makefile
File metadata and controls
executable file
·56 lines (42 loc) · 1.7 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aobshatk <aobshatk@mail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/23 17:00:05 by aobshatk #+# #+# #
# Updated: 2025/01/05 19:24:47 by aobshatk ### ########.fr #
# #
# **************************************************************************** #
SRCS = ft_check_width.c ft_fnd_frmtr.c ft_set_width.c \
ft_print_format.c ft_set_flags.c ft_prt_arg.c \
ft_print_str.c ft_print_char.c ft_print_decimal.c \
ft_utoa.c ft_print_uint.c ft_print_x.c \
ft_btoa.c ft_print_cx.c ft_print_pointer.c \
ft_printf.c ft_print_hex.c ft_print_digit.c
OBJS = $(SRCS:.c=.o)
CC = cc
RM = rm -f
CFLAGS = -Wall -Wextra -Werror
LIBFTPATH = ./libft
LIBFT = $(LIBFTPATH)/libft.a
NAME = libftprintf.a
%.o: %c
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(LIBFT) $(OBJS)
cp $(LIBFT) $(NAME)
ar rcs $(NAME) $(OBJS)
all: $(NAME)
clean:
make -C $(LIBFTPATH) clean
$(RM) $(OBJS)
$(LIBFT):
make -C $(LIBFTPATH) bonus
fclean:
make -C $(LIBFTPATH) fclean
$(RM) $(OBJS)
$(RM) $(NAME)
bonus: all
re: fclean $(NAME)
.PHONY: all clean fclean re