-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (64 loc) · 2.26 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jmoussu <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/01/29 15:54:54 by jmoussu #+# #+# #
# Updated: 2019/02/15 15:43:04 by jmoussu ### ########.fr #
# #
# **************************************************************************** #
NAME = fdf
SRC = srcs/main.c \
srcs/ligne.c \
srcs/utils.c \
srcs/valid_file.c \
srcs/valid_bn.c \
srcs/parsing.c \
srcs/make_link.c \
srcs/freelist.c \
srcs/mlx_main.c \
srcs/maths.c \
srcs/maths_iso.c \
srcs/img.c \
srcs/ligne_img.c \
srcs/deal_key.c \
srcs/deal_mouse.c
OBJ = $(SRC:.c=.o)
CFLAGS = -Wall -Wextra -Werror
GREEN_OK = "\033[0;32mDONE !\033[00m"
all: $(NAME)
$(NAME): $(OBJ)
@cd libft && make
@cd minilibx_macos && make
@gcc -o $(NAME) $(CFLAGS) -I minilibx_macos $(OBJ) libft/libft.a -L minilibx_macos -lmlx -framework OpenGL -framework Appkit
@echo fdf ${GREEN_OK}
%.o : %.c
@clang -c $(CFLAGS) $< -o $@
onlyfdf:
@gcc -o $(NAME) $(CFLAGS) -I minilibx_macos $(SRC) libft/libft.a -L minilibx_macos -lmlx -framework OpenGL -framework Appkit
@echo onlyfdf ${GREEN_OK}
onlyfdfdebug:
@gcc -o $(NAME) $(CFLAGS) -g -I minilibx_macos $(SRC) libft/libft.a -L minilibx_macos -lmlx -framework OpenGL -framework Appkit
@echo onlyfdf debug ${GREEN_OK}
onlylibft:
@cd libft && make
onlyminilibx:
@cd minilibx_macos && make
clean:
@rm -f $(OBJ)
@cd libft && make clean
@cd minilibx_macos && make clean
@echo clean fdf ${GREEN_OK}
fclean: clean
@rm -f $(NAME)
@rm -rf fdf.dSYM
@cd libft && make fclean
@cd minilibx_macos && make fclean
@echo fclean fdf ${GREEN_OK}
mclean: all clean
cleanexe:
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re