-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (37 loc) · 1.64 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: fvonsovs <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/03/06 15:12:49 by fvonsovs #+# #+# #
# Updated: 2023/03/21 16:40:56 by fvonsovs ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
CFLAGS = -Wall -Wextra -Werror -g -fsanitize=address
NAME = fdf
SRCS = fdf.c fdf_map_parser.c fdf_map_utils.c fdf_draw_bresenham_line.c \
fdf_draw_wu_line.c fdf_draw_wireframe.c fdf_draw_utils.c fdf_draw_utils_2.c
OBJS = ${SRCS:.c=.o}
LIBC = ar -cvq
RM = rm -f
LIBFT = ./libft/libft.a
MINILIBX = ./minilibx-linux/libmlx.a
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o} -I. -I./libft -I/usr/include -I./minilibx-linux -O3
all: $(NAME)
$(NAME): ${OBJS}
make -C ./libft
make -C ./minilibx-linux
${CC} ${CFLAGS} -o ${NAME} ${OBJS} ${LIBFT} ${MINILIBX} -L/usr/lib -lm -lXext -lX11
clean:
${MAKE} clean -C ./libft
${MAKE} clean -C ./minilibx-linux
${RM} ${OBJS}
fclean: clean
${MAKE} fclean -C ./libft
${RM} ${NAME}
re: fclean all
.PHONY: all clean fclean re