-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (46 loc) · 1.65 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: npineau <npineau@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2013/12/20 18:01:14 by npineau #+# #+# #
# Updated: 2014/05/09 15:45:53 by npineau ### ########.fr #
# #
# **************************************************************************** #
CC = llvm-gcc
NAME = fdf
LIBDIR = libft/
LIBFT = libft.a
HEADDIR = includes/ \
-I libft/includes/
SRC = sources/draw/ft_coo.c \
sources/draw/ft_draw_line.c \
sources/draw/ft_print_grid.c \
sources/query/fdf.c \
sources/query/ft_get_grid.c \
sources/query/ft_getnbr.c
OBJ = ft_coo.o \
ft_draw_line.o \
ft_print_grid.o \
fdf.o \
ft_get_grid.o \
ft_getnbr.o
EFLAG = -Wall -Wextra -Werror
OFLAG = -O3
MLXLIB = -L /usr/X11/lib -lmlx -lXext -lX11
all: $(NAME)
$(NAME): $(LIBDIR)$(LIBFT) $(OBJ)
$(CC) -o $(NAME) $(OBJ) -L $(LIBDIR) -lft $(MLXLIB)
$(LIBDIR)$(LIBFT):
make -C libft/
$(OBJ): $(SRC)
$(CC) $(EFLAG) $(OFLAG) -c $(SRC) -I $(HEADDIR)
clean:
rm -f $(OBJ)
make -C libft/ clean
fclean: clean
rm -f $(NAME)
make -C libft/ fclean
re: fclean all