-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.52 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: gscarama <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/03/07 12:08:26 by gscarama #+# #+# #
# Updated: 2022/03/08 17:32:17 by gscarama ### ########.fr #
# #
# **************************************************************************** #
NAME = fractol
SOURCE = main.c \
fractol.c \
color.c \
hook.c \
setfractol.c \
utils.c
GCC = gcc
RM = rm -rf
CFLAGS = -Wall -Wextra -Werror
HEADER = incl
MLX = minilibx
PATH_SRC = srcs
PATH_OBJ = objs
SRCS = $(addprefix $(PATH_SRC)/,$(SOURCE))
OBJS = $(addprefix $(PATH_OBJ)/,$(SOURCE:.c=.o))
$(PATH_OBJ)/%.o : $(PATH_SRC)/%.c
${GCC} ${CFLAGS} -c $< -o ${<:$(PATH_SRC)/%.c=$(PATH_OBJ)/%.o}
${NAME}: ${OBJS}
$(GCC) $(CFLAGS) $(OBJS) -I ${MLX} -L minilibx -lmlx -framework OpenGL -framework AppKit -o $(NAME)
all: ${NAME}
clean:
${RM} ${OBJS}
fclean: clean
${RM} ${NAME}
re: fclean all
.PHONY: all clean fclean re .c.o