-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (46 loc) · 1.77 KB
/
Makefile
File metadata and controls
59 lines (46 loc) · 1.77 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: msousa <msousa@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/10/29 15:00:20 by msousa #+# #+# #
# Updated: 2021/11/19 10:48:00 by msousa ### ########.fr #
# #
# **************************************************************************** #
CFLAGS = -O3 -Wall -Wextra -Werror
LINKS = -lmlx -lm -Llibft -lft
CC = gcc
RM = rm -f
INC = -Iincludes -Ilibft
UNAME := ${shell uname}
OBJ = ${SRC:.c=.o}
SRC = fractol.c srcs/range.c srcs/draw.c srcs/hooks.c srcs/formulas.c
NAME = fractol
ifeq (${UNAME}, Linux)
LINKS += -lbsd -lXext -lX11
INC += -Ilinux
endif
ifeq (${UNAME}, Darwin)
LINKS += -framework OpenGL -framework AppKit
INC += -Imac
endif
${NAME}: ${OBJ}
${MAKE} -C libft
${CC} ${CFLAGS} ${OBJ} ${LINKS} -o $@
%.o:%.c
${CC} ${CFLAGS} ${INC} -c $< -o $@
all: ${NAME}
style:
-norminette $$( find . -type f \( -name "*.c" -or -name "*.h" \) )
test:
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
--num-callers=20 --track-fds=yes ./${NAME}
clean:
${MAKE} clean -C libft
${RM} ${OBJ}
fclean: clean
${RM} ${NAME}
re: fclean all
.PHONY : all clean fclean re bonus