-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (40 loc) · 1.56 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ryyashir <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/05/07 19:13:47 by ryusukeyash #+# #+# #
# Updated: 2024/05/16 13:55:08 by ryyashir ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS = srcs/ft_printf.c \
srcs/ft_print_hex.c \
srcs/ft_print_int.c \
srcs/ft_print_percent.c \
srcs/ft_print_pointa.c \
srcs/ft_print_str.c \
srcs/ft_print_unit.c \
OBJS = $(SRCS:.c=.o)
LIBFT_PATH = ./Libft
LIBFT_NAME = libft.a
INCLUDES = include
CC = cc
CFLAGS = -Wall -Wextra -Werror -I include
.c.o:
$(CC) $(CFLAGS) -c $< -o $(<:.c=.o) -I $(INCLUDES)
all : ${NAME}
$(NAME):$(OBJS)
make -C $(LIBFT_PATH) all
cp $(LIBFT_PATH)/$(LIBFT_NAME) $(NAME)
ar -rcs $(NAME) $(OBJS)
clean:
rm -f $(OBJS)
@make -C $(LIBFT_PATH) clean
fclean: clean
rm -f $(NAME)
rm -f $(LIBFT_PATH)/$(LIBFT_NAME)
re: fclean all
.PHONY: all clean fclean re