-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.32 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: fflamion <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/06/01 13:57:55 by fflamion #+# #+# #
# Updated: 2024/06/01 15:45:16 by fflamion ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
LIBFT_DIR = libft
LIBFT = $(LIBFT_DIR)/libft.a
SRCS = ft_printf.c
OBJS = $(SRCS:.c=.o)
CC = gcc
CFLAGS = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJS) $(LIBFT)
cp $(LIBFT) $(NAME)
ar rcs $(NAME) $(OBJS)
$(LIBFT):
make -C $(LIBFT_DIR)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJS)
make clean -C $(LIBFT_DIR)
fclean: clean
rm -f $(NAME)
make fclean -C $(LIBFT_DIR)
re: fclean all
.PHONY: all clean fclean re