-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 1.41 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: isousa <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/29 13:18:00 by isousa #+# #+# #
# Updated: 2021/03/29 13:18:04 by isousa ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
NAME = libftprintf.a
INCLUDE = ft_printf.h
SRCS = ft_printf.c ft_conv_char.c ft_aux_conv.c ft_flags.c ft_check.c \
ft_utils.c ft_conv_int.c ft_conv_un.c ft_conv_addr.c \
ft_conv_hexa.c ft_plus_utils.c
OBJS = $(SRCS:.c=.o)
all: $(NAME)
$(NAME): $(OBJS) $(INCLUDE)
ar -rcs $(NAME) $(OBJS)
ranlib $(NAME)
.c.o:
$(CC) $(CFLAGS) -I$(INCLUDE) -c $< -o $(<:.c=.o)
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re