-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (66 loc) · 2.03 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
83
84
85
86
87
88
89
90
91
92
93
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ohachim <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/06/18 02:54:22 by ohachim #+# #+# #
# Updated: 2019/07/27 18:21:12 by ohachim ### ########.fr #
# #
# **************************************************************************** #
SRC_PATH = src
SRC_NAME = ft_player_put.c \
ft_make_board.c \
ft_skip_line.c \
ft_make_token.c \
ft_play.c \
ft_strdel_imp.c \
ft_dsculpt_token.c \
ft_sculpt_y.c \
ft_valid_holder.c \
ft_brute_force.c \
ft_heatmap.c \
ft_brute_forceu.c \
ft_brute_forcel.c \
ft_filler.c \
ft_out_data.c \
ft_bad_char.c
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
OBJ_PATH = obj
OBJ_NAME = $(SRC_NAME:.c=.o)
OBJ = $(addprefix $(OBJ_PATH)/,$(OBJ_NAME))
CPPFLAGS =-Iinclude -Ilibft/include
LDFLAGS = -Llibft
LDLIBS = -lft
NAME = ohachim.filler
CC = gcc
CFLAGS = -Wall -Wextra -Werror
.PHONY: all, clean, fclean, re
all: $(NAME)
visua:
@make -C visu
visuc:
@cd visu ; make clean
visufc:
@cd visu ; make fclean
visur:
@cd visu ; make re
both: all visua
bothc: clean visuc
bothfc: fclean visufc
bothr: re visur
$(NAME): $(OBJ)
@cd libft ; make
$(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c
@mkdir $(OBJ_PATH) 2> /dev/null || true
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
clean:
@make -C libft clean
@rm -vf $(OBJ)
@rmdir $(OBJ_PATH) 2> /dev/null || true
fclean: clean
@make -C libft fclean
@rm -vf $(NAME)
re: fclean all