-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (37 loc) · 1.79 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: asfaihi <asfaihi@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/11 18:52:49 by asfaihi #+# #+# #
# Updated: 2021/07/22 10:59:37 by asfaihi ### ########.fr #
# #
# **************************************************************************** #
NAME = cub3d
SRC = cub3d.c check_args.c ft_draw_walls.c ft_map_parsing.c ft_movement.c \
ft_player.c ft_put_error.c ft_read_file.c ft_rotation.c ft_screenshot.c \
ft_sprites.c ft_texture.c ft_update.c get_map_size.c libft_functions.c libft_functions_2.c \
get_next_line.c get_next_line_utils.c parse_color.c parse_params.c
LIBNAME = ft_cub3d.a
FLAGS = -Wall -Wextra -Werror
MLX = -L /usr/local/lib/ -lmlx -framework OpenGL -framework AppKit
OBJECT = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OBJECT) cub3d.h get_next_line.h
@ar rcs $(LIBNAME) $(OBJECT)
@gcc $(MLX) $(LIBNAME) -o $(NAME)
@echo "\033[34m[Compiling is done !]"
%.o:%.c
@gcc $(FLAGS) -c $<
clean:
@echo "\033[31m[Removing Files ...!]\033[0m"
/bin/rm -f $(OBJECT)
fclean: clean
@echo "\033[31m[Removing Cub3D ...!]\033[0m"
/bin/rm -f $(NAME)
/bin/rm -f $(LIBNAME)
@echo "\033[31m[Deleting Old Screenshot...!]\033[0m"
/bin/rm -f screenshot.bmp
re: fclean all