-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (51 loc) · 1.9 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
#******************************************************************************#
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tdemay <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2014/01/03 20:21:55 by tdemay #+# #+# #
# Updated: 2014/01/03 20:21:58 by tdemay ### ########.fr #
# #
#******************************************************************************#
.PHONY: clean fclean re
NAME = raytracer
CC = cc $(FLAGS)
FLAGS = -Wall -Wextra -Werror
LIB = -L libft/ -lft -L/usr/X11/lib -lmlx -lXext -lX11
SRC = vector.c\
vector_op.c\
sphere.c\
plan.c\
scene.c\
cam.c\
parse.c\
cylinder.c\
light.c\
color.c
OBJ = $(SRC:.c=.o)
.SILENT:
all: $(NAME)
$(NAME): $(OBJ) $(NAME).h main.c ./libft/libft.a
printf "\r\033[38;5;11m⌛ MAKE $(NAME) plz wait ...\033[K\033[0m"
$(CC) $(OBJ) main.c -o $(NAME) $(LIB)
echo -en "\r\033[38;5;22m✅ MAKE $(NAME)\033[K\033[0m"
echo -en "\r\033[38;5;22m🍺 ENJOY !🍺\033[K\033[0m"
%.o: %.c %.h
$(CC) $(FLAGS) -c $< -o $@
./libft/libft.a:
make -C libft/ fclean
make -C libft/
clean:
printf "\r\033[38;5;25m⌛ CLEAN $(NAME) plz wait ...\033[K\033[0m"
rm -f $(OBJ)
echo -en "\r\033[38;5;124m❌ CLEAN $(NAME)\033[K\033[0m"
fclean: clean
printf "\r\033[38;5;25m⌛ FCLEAN $(NAME) plz wait ...\033[K\033[0m"
rm -f $(NAME)
make -C ./libft/ fclean
echo -en "\r\033[38;5;124m❌ FCLEAN $(NAME)\033[K\033[0m"
re: fclean all
rew: all
./raytracer