-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (28 loc) · 820 Bytes
/
Makefile
File metadata and controls
45 lines (28 loc) · 820 Bytes
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
NAME = libftprintf.a
SRC = ft_printf.c ft_lenin.c ft_putnbr_fd.c \
ft_putudigit_fd.c ft_putxd.c check_flags.c\
ft_symbol.c ft_percent.c ft_lenptr.c \
ft_row.c ft_digit.c ft_udigit.c ft_xdigit.c \
ft_pointer.c ft_atoi_width.c ft_gfd.c\
print_width_bonus.c print_precision_bonus.c \
BONUS_FILES = print_precision_bonus.c print_width_bonus.c \
OBJ_BONUS = ${BONUS_FILES:.c=.o}
OBJ = ${SRC:.c=.o}
HEADER = ft_printf.h
CC = gcc
FLAGS = -Wall -Wextra -Werror
RM = rm -f
.c.o: ft_printf.h
${CC} ${FLAGS} -c $< -I ${HEADER} -o ${<:.c=.o}
${NAME}: ${OBJ}
ar rcs ${NAME} ${OBJ}
all: ${NAME}
clean:
${RM} ${OBJ} ${OBJ_BONUS}
fclean: clean
${RM} ${NAME}
re: fclean all
rebonus: fclean bonus
bonus: all ${OBJ_BONUS}
ar rcs ${NAME} ${OBJ_BONUS}
.PHONY: all clean fclean re bonus