-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
135 lines (79 loc) · 1.95 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
NAME = fdf
SRC = main.c \
bresenham.c \
render.c \
events.c \
file.c \
instance.c \
map.c \
color.c \
rotate.c \
interaction.c \
utils.c
LIBFT = ./libft/libft.a
SRCS_PATH = src
OBJS_PATH = obj
SRCS = $(addprefix $(SRCS_PATH)/, $(SRC))
OBJS = $(addprefix $(OBJS_PATH)/, $(SRC:.c=.o))
CC = cc -Wall -Wextra -Werror -O3
#MLX = -lmlx -lXext -lX11 -lm
MLX_LIB = ./minilibx/libmlx.a -lXext -lX11 -lm
RM = rm -rf
all: $(NAME)
$(NAME): $(OBJS_PATH) $(LIBFT) $(OBJS)
$(CC) $(OBJS) $(LIBFT) $(MLX_LIB) -o $(NAME)
$(OBJS_PATH):
mkdir -p $(OBJS_PATH)
$(OBJS_PATH)/%.o: $(SRCS_PATH)/%.c
$(CC) -c $< -o $@
$(LIBFT):
make -C ./libft
1: $(NAME)
valgrind ./fdf maps/42.fdf
2: $(NAME)
valgrind ./fdf maps/10-2.fdf
3: $(NAME)
valgrind ./fdf maps/10-70.fdf
4: $(NAME)
valgrind ./fdf maps/20-60.fdf
5: $(NAME)
valgrind ./fdf maps/50-4.fdf
6: $(NAME)
valgrind ./fdf maps/100-6.fdf
7: $(NAME)
valgrind ./fdf maps/basictest.fdf
8: $(NAME)
valgrind ./fdf maps/elem-col.fdf
9: $(NAME)
./fdf maps/elem-fract.fdf
10: $(NAME)
valgrind ./fdf maps/elem.fdf
11: $(NAME)
valgrind ./fdf maps/elem2.fdf
12: $(NAME)
./fdf maps/julia.fdf
13: $(NAME)
valgrind ./fdf maps/mars.fdf
14: $(NAME)
valgrind ./fdf maps/pentenegpos.fdf
15: $(NAME)
valgrind ./fdf maps/plat.fdf
16: $(NAME)
valgrind ./fdf maps/pnp_flat.fdf
17: $(NAME)
valgrind ./fdf maps/pylone.fdf
18: $(NAME)
valgrind ./fdf maps/pyra.fdf
19: $(NAME)
valgrind ./fdf maps/pyramide.fdf
20: $(NAME)
./fdf maps/t1.fdf
21: $(NAME)
./fdf maps/t2.fdf
clean:
$(RM) $(OBJS_PATH)
fclean: clean
make fclean -C ./libft
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re