This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (48 loc) · 1.91 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
52
53
54
55
56
57
58
59
60
61
62
63
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mahautlatinis <[email protected] +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/10/07 17:50:14 by mahautlatin #+# #+# #
# Updated: 2023/10/07 17:50:42 by mahautlatin ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
LIBFT_PROJECT = ./project/libft
LIBFT_MAKE = Makefile
LIBFT_PATH = ${LIBFT_PROJECT}/libft.a
SRCS = ./project/ft_printf.c \
./project/utils/checks.c \
./project/utils/print.c \
./project/utils/initialize.c \
./project/types/type_s.c \
./project/types/type_id.c \
./project/types/type_u.c \
./project/types/type_x.c \
./project/types/type_p.c
OBJS = ${SRCS:.c=.o}
RM = rm -rf
CC = gcc
CFLAGS = -Wall -Wextra -Werror -I${LIBFT_PROJECT}
all: ${NAME}
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o}
$(NAME): $(OBJS) ${LIBFT_PROJECT}
ar -rcs ${NAME} $(OBJS)
${LIBFT_PROJECT}:
make -C ${LIBFT_PROJECT} -f ${LIBFT_MAKE} all
cp ${LIBFT_PATH} ${NAME}
clean:
${RM} ${OBJS}
make -C ${LIBFT_PROJECT} -f ${LIBFT_MAKE} clean
fclean: clean
${RM} ${NAME}
make -C ${LIBFT_PROJECT} -f ${LIBFT_MAKE} fclean
re: fclean all
test:
ls -lR; make; cd ./tester; make; ./test m
norminette:
norminette ./project
.PHONY: bonus all clean fclean re ${LIBFT_PROJECT}