-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (36 loc) · 1.55 KB
/
Makefile
File metadata and controls
54 lines (36 loc) · 1.55 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: polmarti <polmarti@student.42barcel> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/12/27 20:09:02 by polmarti #+# #+# #
# Updated: 2023/12/27 20:09:04 by polmarti ### ########.fr #
# #
# **************************************************************************** #
NAME = So_long
SRCS = gnl/get_next_line.c gnl/get_next_line_utils.c printf/ft_printf.c \
printf/ft_printf_utils.c src/errors_check.c src/graphic.c src/matrix.c src/movements.c\
src/utils.c src/main.c
INCLUDES = inc/so_long.h
FLAGS = -Wall -Wextra -Werror -MMD -g
MLX = -framework OpenGL -framework AppKit
OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.d)
all: makemlx $(NAME)
CC = gcc
%.o:%.c Makefile
$(CC) $(FLAGS) -I ./ -c $< -o $@
$(NAME): $(OBJS)
$(CC) $(FLAGS) mlx/libmlx.a $(MLX) $(OBJS) -o $(NAME)
makemlx:
$(MAKE) -C mlx/
clean:
rm -rf $(OBJS) $(DEPS)
$(MAKE) -C mlx clean
fclean: clean
rm -f $(NAME)
re: fclean all
-include $(DEPS)
.PHONY: all clean fclean re makemlx