-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 651 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (37 loc) · 651 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
46
47
NAME = libftprintf.a
SRC = char_str_functions.c \
ft_abs.c \
ft_isdigit.c \
ft_printf.c \
ft_putchar_amount.c \
ft_putnbr.c \
ft_putnbr_hex.c \
ft_putstr.c \
ft_strlen.c \
get_conv.c \
get_flags.c \
nbr_length_ull.c \
parse_conv_csxup.c \
parse_conv_d.c \
print_char.c \
print_digit.c \
print_digit_p2.c \
print_str.c
OBJ = $(SRC:.c=.o)
FLAGS = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJ)
ar rc $(NAME) $(OBJ)
ranlib $(NAME)
%.o: %.c
gcc $(FLAGS) -w -c $<
clean:
/bin/rm -f $(OBJ)
/bin/rm -f bonus
fclean: clean
/bin/rm -f $(NAME)
bonus: $(OBJ)
ar rc $(NAME) $(OBJ)
ranlib $(NAME)
touch bonus
re: fclean all