-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.41 KB
/
Makefile
File metadata and controls
42 lines (31 loc) · 1.41 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: marcrodr < marcrodr@student.42sp.org.br +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/10 18:30:29 by marcrodr #+# #+# #
# Updated: 2021/09/15 18:57:51 by marcrodr ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CC = gcc
CFLAGS = -Wall -Wextra -Werror
LIB = ar -rcs
RM = rm -rf
SRCS = ft_printf.c ft_numbers.c ft_putstr_fd.c ft_strlen.c ft_memcpy.c \
ft_strdup.c ft_ullitoa_base.c ft_itoa.c ft_putchar_fd.c \
ft_calloc.c ft_bzero.c ft_memset.c
OBJS = $(SRCS:.c=.o)
PROGRAM = a.out
all: $(NAME)
.c.o = $(CC) $(CFLAGS) -c fPIC $< -o $(<:.c=.o)
$(NAME): $(OBJS)
$(LIB) $(NAME) $(OBJS)
clean:
@$(RM) $(OBJS)
fclean: clean
@$(RM) $(NAME) $(PROGRAM) *.a
re: fclean all
.PHONY: all clean fclean re compile .c.o $(NAME)