-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (56 loc) · 1.98 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
# **************************************************************************** #
# LE - / #
# / #
# Makefile .:: .:/ . .:: #
# +:+:+ +: +: +:+:+ #
# By: bpajot <[email protected]> +:+ +: +: +:+ #
# #+# #+ #+ #+# #
# Created: 2019/10/09 10:49:27 by bpajot #+# ## ## #+# #
# Updated: 2020/01/07 14:39:13 by bpajot ### #+. /#+ ###.fr #
# / #
# / #
# **************************************************************************** #
.PHONY: all clean fclean re
NAME = scop
CC = gcc
CC_FLAGS = -Wall -Wextra -Werror
LMLX_FLAGS = -L minilibx_macos/ -lmlx -framework OpenGl -framework Appkit
PATH_SRCS = ./srcs/
PATH_OBJS = .
PATH_INCS = ./includes/
FILES = center.c \
event.c \
free.c \
indices.c \
matrice_pipeline.c \
matrice_rot.c \
matrice_tr_proj.c \
matrice_utils.c \
parser.c \
scop.c \
shader1.c \
shader2.c \
textures.c \
vbo.c \
vertices.c
FILES_INC = scop.h
SRCS = $(addprefix $(PATH_SRCS), $(FILES))
OBJS = $(addprefix $(PATH_OBJS), $(FILES:.c=.o))
INCS = $(addprefix $(PATH_INCS), $(FILES_INC))
all: $(NAME)
$(NAME): $(OBJS)
@make -C minilibx_macos
@echo "CREATION DE L'EXECUTABLE"
@$(CC) $(CC_FLAGS) -o $@ $^ $(LMLX_FLAGS)
@echo "COMPILATION EXECUTABLE REUSSIE 👍"
$(PATH_OBJS)%.o: $(PATH_SRCS)%.c $(INCS)
@echo "creation $@ "
@$(CC) $(CC_FLAGS) -o $@ -c $<
@echo "compilation $@ ok 👍"
clean:
@make -C minilibx_macos clean
@/bin/rm -f $(OBJS)
@echo "NETTOYAGE REUSSIE 👍"
fclean: clean
@/bin/rm -f $(NAME)
re: fclean all