-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 1.29 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
44
45
46
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ssottori <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/12/05 21:19:06 by ssottori #+# #+# #
# Updated: 2023/12/07 17:34:44 by ssottori ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CCF = cc -Wall -Wextra -Werror
AR = ar -rcs
RM = rm -f
SRC = ft_printf.c \
ft_putchar.c \
ft_putptr.c \
ft_puthex.c \
ft_putstr.c \
ft_putbase.c
OBJ = $(SRC:.c=.o)
all: $(NAME)
%.o: %.c
$(CCF) -c $< -o $@
$(NAME): $(OBJ)
$(AR) $(NAME) $^
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(NAME)
# test: re
# $(CCF) main.c $(NAME)
# ./a.out
re: fclean all
.PHONY: all clean fclean re