-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.61 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: lumaret <lumaret@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/07/20 16:03:21 by lumaret #+# #+# #
# Updated: 2024/08/21 17:37:28 by lumaret ### ########.fr #
# #
# **************************************************************************** #
SRC = fdf.c srcs/parser.c srcs/coords.c srcs/drawing.c srcs/movement.c \
srcs/utils.c srcs/line.c srcs/init.c
OBJ = $(SRC:.c=.o)
BINARY_NAME = fdf
COMPILER = cc
MANDATORY_FLAGS = -Wall -Wextra -Werror -g3
MINILIBX_FLAGS = -L./minilibx/ -lmlx -lXext -lX11 -lm -lbsd
LIBFT_FLAGS = -L./libft/ -lft
all: $(BINARY_NAME)
$(BINARY_NAME): $(OBJ)
make -C libft
make -C minilibx
$(COMPILER) $(MANDATORY_FLAGS) $(OBJ) $(MINILIBX_FLAGS) $(LIBFT_FLAGS) -o $(BINARY_NAME)
%.o: %.c
$(COMPILER) $(MANDATORY_FLAGS) -c $< -o $@
clean:
rm -f $(OBJ)
fclean: clean
rm -f $(BINARY_NAME)
ffclean: fclean
make -C libft fclean
make -C minilibx clean
re: fclean all
@echo "🚀 done"
fre: ffclean all
@echo "🚀 done"
.PHONY: all clean fclean ffclean re fre