-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (37 loc) · 1.56 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: trahman <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/10/08 12:01:00 by trahman #+# #+# #
# Updated: 2020/10/08 12:14:21 by trahman ### ########.fr #
# #
# **************************************************************************** #
NAME = fdf
FLAG = -Wall -Wextra -Werror
SRCS = main.c
OBJECTS = $(SRCS:.c=.o)
INCLUDES = Libft/
LIBRARY = Libft/libft.a
HEADER = fdf.h
LIBDIR = Libft
MLX_LINK = /usr/local/lib/ -l mlx -framework OpenGL -framework AppKit
all: $(NAME)
$(NAME):
@$(MAKE) -C $(LIBDIR)
@gcc -c $(SRCS)
@gcc $(FLAG) $(LIBRARY) $(OBJECTS) -I $(INCLUDES) -o $(NAME) -L $(MLX_LINK)
@echo "\033[32mBuilt library.\033[0m"
$(SRCS): $(HEADER)
clean:
@$(MAKE) clean -C $(LIBDIR)
@/bin/rm -f $(OBJECTS)
@echo "\033[32mCleaned up object files.\033[0m"
fclean: clean
@$(MAKE) fclean -C $(LIBDIR)
@/bin/rm -f $(NAME)
@echo "\033[32mCleaned up compiled files.\033[0m"
re: fclean all
.PHONY: all clean fclean re