-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (37 loc) · 958 Bytes
/
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
SRCS = srcs/ft_init.c \
srcs/utils.c \
srcs/ft_update.c \
srcs/vect.c \
srcs/ft_key.c \
srcs/sprite.c \
config/config.c \
config/get_map.c \
config/util.c \
gnl/get_next_line.c \
gnl/get_next_line_utils.c \
bmp/bmp.c \
srcs/main.c
NAMELIB = ./libft/libft.a
OBJS = $(SRCS:.c=.o)
CC = gcc
RM = rm -f
CFLAGS = -Wall -Werror -Wextra
MLX = -lmlx -framework OpenGL -framework AppKit
NAME = cub3D
BMP = cub3D.bmp
all: $(NAME)
%.o: %.c
@gcc $(CFLAGS) -c $< -o $@
$(NAME): $(OBJS)
@$(MAKE) -C ./libft
@$(MAKE) bonus -C ./libft
@$(CC) $(OBJS) $(NAMELIB) $(MLX) -o $(NAME)
@echo "\033[34m\n************ Done ! ************\n\n"
clean:
@$(RM) $(OBJS)
@$(MAKE) fclean -C ./libft
fclean: clean
@$(RM) $(NAME) $(BMP)
@$(MAKE) fclean -C ./libft
@echo "\033[34m\n************ clean ! ************\n\n"
re: fclean $(NAME)