-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (32 loc) · 1.34 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: akenji-a <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/04/14 16:47:02 by akenji-a #+# #+# #
# Updated: 2022/05/13 17:48:48 by akenji-a ### ########.fr #
# #
# **************************************************************************** #
NAME= libftprintf.a
CC= gcc
CC_FLAGS= -Wall -Wextra -Werror
RM= /bin/rm -f
SRC= ft_printf.c ft_print_helper.c
AR= ar rcs
LIBFT= libft/libft.a
all: $(NAME)
$(NAME): libft.a $(SRC:.c=.o)
@$(CC) $(CC_FLAGS) -c $(SRC)
@$(AR) $(NAME) $(SRC:.c=.o)
libft.a:
@make -C libft
@cp $(LIBFT) $(NAME)
clean:
@make clean -C libft
$(RM) $(SRC:.c=.o)
fclean: clean
$(RM) $(LIBFT) $(NAME)
re: fclean all
.PHONY: all clean fclean re libft.a