-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (46 loc) · 1.61 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: yochered <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/08 11:16:16 by yochered #+# #+# #
# Updated: 2018/11/27 13:14:25 by yochered ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
SRC = main.c\
algorithm_x.c\
create_matrix.c\
delete_restore.c\
fill_cords.c\
print_functions.c\
row_col_functions.c\
set_dlist.c\
set_dlist_module.c\
stack.c\
validate.c\
free_memory.c
LIBFT = $(LIBDIR)libft.a
OBJ = $(addprefix $(SRCDIR), $(SRC:.c=.o))
SRCDIR = ./src/
LIBDIR = ./libft/
FLAGS = -c -Wall -W -Werror
all: $(NAME)
$(NAME): $(LIBFT) $(OBJ)
gcc -o $(NAME) $(OBJ) -L $(LIBDIR) -lft -I $(LIBDIR)
$(SRCDIR)%.o: $(SRCDIR)%.c
gcc $(FLAGS) -o $@ $< -I $(LIBDIR)
$(LIBFT):
@make -C $(LIBDIR) --silent
clean:
@make -C $(LIBDIR) clean --silent
@/bin/rm -f $(OBJ)
fclean: clean
@make -C $(LIBDIR) fclean --silent
@/bin/rm -f $(NAME)
re: fclean all
run: re
clear
./$(NAME) test.fillit