-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (56 loc) · 1.83 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
53
54
55
56
57
58
59
60
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: lbrandy <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/01/04 15:16:54 by lbrandy #+# #+# #
# Updated: 2021/03/11 14:54:23 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 = cub3D.c parser.c mlx_help.c not_texture_ray.c map_check.c texture_reading.c paint_sprites.c
OBJDIR = obj/
OBJS = $(addprefix $(OBJDIR), $(SRCS:.c=.o))
all: $(NAME)
$(NAME):$(OBJDIR) $(OBJS)
@make bonus -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 $@
# NAME = cub_3d.a
# CFLAGS = -Wall -Wextra -Werror -Imlx
#
# SRCS = test.c
# OBJDIR = obj/
# OBJS = $(addprefix $(OBJDIR), $(SRCS:.c=.o))
#
# all: $(NAME)
#
# $(NAME): $(OBJDIR) $(OBJS)
# ar rc $(NAME) $(OBJS)
# ranlib $(NAME)
#
#$(OBJDIR):
# mkdir $(OBJDIR)
#
# $(OBJDIR)%.o: %.c
# gcc $(CFLAGS) -c $< -o $@
#
# clean:
# rm -rf $(OBJDIR)
#
# fclean: clean
# rm -rf $(NAME)
#
# re: fclean all
#
# .PHONY: all clean fclean re bonus