-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (40 loc) · 1.46 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mcoskune <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/04/13 14:18:02 by mcoskune #+# #+# #
# Updated: 2024/05/10 10:47:29 by mcoskune ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CC = cc
CFLAGS = -Wall -Werror -Wextra
AR = ar rcs
SRC = ft_printf_c \
ft_printf_di \
ft_printf_p \
ft_printf_s \
ft_printf_u \
ft_printf_xx \
ft_printf
SRCS = $(addsuffix .c, $(SRC))
OBJS = $(SRCS:.c=.o)
LIBFT_PATH = ./libft
LIBFT = $(LIBFT_PATH)/libft.a
$(NAME): $(LIBFT) $(OBJS)
@cp $(LIBFT) $(NAME)
@$(AR) $(NAME) $(OBJS)
all: $(NAME)
$(LIBFT):
@make -C $(LIBFT_PATH) all
clean:
@make -C $(LIBFT_PATH) clean
@rm -rf $(OBJS)
fclean: clean
@make -C $(LIBFT_PATH) fclean
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re