-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.33 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: gandrade <gandrade@student.42sp.org.br> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/07/09 18:35:29 by gandrade #+# #+# #
# Updated: 2021/08/04 16:11:04 by gandrade ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CC = clang
CFLAGS = -Wall -Wextra -Werror
LIB = ar -rcs
RM = rm -rf
SRCS = ft_printf.c ft_chars.c ft_numbers.c \
OBJS = $(SRCS:.c=.o)
all: libft $(NAME)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -I ./libft
$(NAME): $(OBJS)
cp ./libft/libft.a $(NAME)
$(LIB) $(NAME) $(OBJS)
clean:
$(MAKE) -C libft clean
$(RM) $(OBJS)
fclean: clean
$(MAKE) -C libft fclean
$(RM) $(NAME)
libft:
$(MAKE) -C libft
re: fclean all
.PHONY: all clean fclean libft re