-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (41 loc) · 1.5 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mrosie <mrosie@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/11/21 13:26:38 by mrosie #+# #+# #
# Updated: 2020/11/27 19:03:31 by mrosie ### ########.fr #
# #
# **************************************************************************** #
SRCS = ft_printf.c \
ft_processor.c \
ft_parser.c \
ft_print_char.c \
ft_print_string.c \
ft_print_number.c \
ft_print_pointer.c \
ft_itoa_base.c
HEAD = ft_printf.h
OBJS = $(SRCS:.c=.o)
CFLAG = -Wall -Werror -Wextra
CC = gcc
RM = rm -f
NAME = libftprintf.a
all: $(NAME)
.c.o:
@ $(CC) $(CFLAG) -c $< -o $(<:.c=.o)
$(NAME): $(OBJS) $(HEAD)
@ $(MAKE) -C ./Libft
@ cp ./Libft/libft.a $(NAME)
@ ar rcs $(NAME) $(OBJS)
clean:
@ $(MAKE) clean -C ./Libft
@ $(RM) $(OBJS) $(BONUS_OBJS)
fclean: clean
@ $(MAKE) fclean -C ./Libft
@ $(RM) $(NAME)
re: fclean all
@ $(MAKE) re -C ./Libft
.PHONY: clean fclean re all