-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (34 loc) · 1.38 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: phelebra <xhelp00@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/02/06 18:10:21 by phelebra #+# #+# #
# Updated: 2023/02/10 12:47:10 by phelebra ### ########.fr #
# #
# **************************************************************************** #
SRC = ft_printf.c ft_putchar.c ft_putstr.c ft_putnbr.c ft_putptr.c ft_puthex.c ft_putunsign.c
INC = ft_printf.h
OBJ = $(SRC:.c=.o)
NAME = libftprintf.a
RM = rm -f
CFLAGS = -Wall -Wextra -Werror
LIBC = ar rc
LIBFT = ./libft/libft.a
.c.o:
cc ${CFLAGS} -c $< -o ${<:.c=.o} -I ${INC}
${NAME}: ${OBJ}
make -C ./libft
cp ./libft/libft.a ${NAME}
${LIBC} ${NAME} ${OBJ}
all: ${NAME}
clean:
${MAKE} clean -C ./libft
${RM} ${OBJ}
${RM} ${BONUS_O}
fclean: clean
${MAKE} fclean -C ./libft
${RM} ${NAME}
re: fclean all