-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: liabanzh <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/02/11 17:23:23 by liabanzh #+# #+# #
# Updated: 2017/02/11 17:23:25 by liabanzh ### ########.fr #
# #
# **************************************************************************** #
NAME = fdf
GCC = gcc
WWW = -Wall -Wextra -Werror
SRC = draw_line.c draw_map.c main.c math.c on_hook.c dop.c
OBJ = $(SRC:.c=.o)
LIBFT = ./libft/libft.a
LIBINC = -I./libft
LIBLINK = -L./libft -lft
SRCS = ./src/
INC = ./includes/
IGRAPH = -L/usr/local/lib/ -I/usr/local/include -lmlx -framework OpenGL \
-framework AppKit
all: libft $(NAME)
%.o:$(SRCS)%.c
$(GCC) $(WWW) $(LIBINC) -I $(INC) -o $@ -c $<
libft: $(LIBFT)
$(LIBFT):
make -C ./libft
$(NAME): $(OBJ)
$(GCC) $(WWW) $(IGRAPH) $(LIBLINK) -o $(NAME) $(OBJ)
clean: cleanlibft
rm -rf $(OBJ)
cleanlibft:
make clean -C ./libft
fclean: clean
rm -rf $(NAME) $(LIBFT)
re: fclean all