-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (57 loc) · 1.81 KB
/
Makefile
File metadata and controls
66 lines (57 loc) · 1.81 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gconde-m <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/11/15 09:31:09 by gconde-m #+# #+# #
# Updated: 2019/12/30 09:44:23 by gconde-m ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS = ft_printf.c \
ft_parse.c \
ft_change.c \
ft_flags.c \
ft_clear.c \
ft_width.c \
ft_char.c \
ft_string.c \
ft_number.c \
ft_direct.c \
ft_printx.c \
ft_numberu.c \
ft_printaltx.c \
ft_precision.c \
libft/ft_itoa.c \
libft/ft_itoa_base.c \
libft/ft_strlen.c \
libft/ft_putnbr.c \
libft/ft_atoi.c \
libft/ft_strnew.c \
libft/ft_bzero.c \
libft/ft_putstr_n.c \
putminuscero.c \
libft/ft_putnbrmemory.c \
ft_percent.c \
OBJS := $(SRCS:.c=.o)
CC = gcc
CFLAGS = -Wall -Wextra -Werror -I.
RM = rm -f
all: ${NAME}
%.o: %.c
${CC} ${CFLAGS} -c $< -o $@
%.o: libft/%.c
${CC} ${CFLAGS} -c $< -o $@
${NAME}: ${OBJS}
ar rcs ${NAME} libft/*.o ${OBJS}
debug:
$(CC) $(CFLAGS) -g $(SRCS) libft/ft_*.c -I libft
clean:
${RM} ${OBJS}
fclean: clean
$(MAKE) -C libft fclean
${RM} ${NAME} libft/*.o *.o
re: fclean all
.PHONY: all ${NAME} clean fclean re