-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (40 loc) · 1.39 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
47
48
49
50
51
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gmacias- <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/02/22 15:48:04 by gmacias- #+# #+# #
# Updated: 2022/02/23 19:26:13 by gmacias- ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
INCLUDE = pintf.h
SRC = ft_printf.c \
ft_basics.c \
ft_hexadecimals.c \
ft_pointers.c \
OBJ = ${SRC:.c=.o}
CC = gcc
RM = rm -f
AR = ar rc
RN = ranlib
CFLAGS = -Wall -Wextra -Werror
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o}
all: $(NAME)
$(NAME): ${OBJ}
@echo "Compiling .."
${AR} ${NAME} ${OBJ}
${RN} ${NAME}
@echo "Done !"
clean:
@echo "Remove .o ..."
${RM} ${OBJ}
@echo "Done !"
fclean: clean
@echo "Remove lib ..."
${RM} $(NAME)
@echo "Done !"
re: fclean all