-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (41 loc) · 1.81 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: lbrandy <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/01/04 15:16:54 by lbrandy #+# #+# #
# Updated: 2021/03/24 10:56:16 by lbrandy ### ########.fr #
# #
# **************************************************************************** #
NAME = cub3D
CFLAGS = -Wall -Wextra -Werror -Imlx
CC = gcc
LIB = libmlx.dylib
LIBFT_DIR = ./source/libft/
LIBFT = ./source/libft/libft.a
SRCS = main.c mlx_help.c not_texture_ray.c texture_reading.c\
paint_sprites.c ft_pars_all.c argv_check.c pars_color.c\
pars_file.c pars_map.c pars_map_copy_mainmap.c\
pars_map_flood.c pars_map_part_2.c pars_resol.c\
pars_textures.c pars_utils.c error_handler.c screen_save.c\
ft_check_struct.c calc_raycast.c drawing.c sprite_array.c
OBJDIR = obj/
OBJS = $(addprefix $(OBJDIR), $(SRCS:.c=.o))
all: $(NAME)
$(NAME):$(OBJDIR) $(OBJS) cub3d.h
@make -C $(LIBFT_DIR)
$(CC) $(CFLAGS) -Lmlx -lmx -framework OpenGL -framework Appkit $(LIB) $(LIBFT) $(SRCS) -o $(NAME)
$(OBJDIR):
mkdir $(OBJDIR)
$(OBJDIR)%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(OBJDIR)
@make -C $(LIBFT_DIR) clean
fclean: clean
rm -f $(NAME)
@make -C $(LIBFT_DIR) fclean
re: fclean all
.PHONY: all clean fclean re