forked from schaaban42/fillit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (53 loc) · 1.84 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: schaaban <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/11/29 12:02:10 by schaaban #+# #+# #
# Updated: 2018/04/26 16:37:06 by msabwat ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
CC = clang
FLAGS = -Wall -Wextra -Werror
LIB_P = ./libft
SRC_PATH = src
OBJ_PATH = bin
CPPFLAGS = -Iinc
LDFLAGS = -Llibft
LDLIBS = -lft
SRC_NAME = get_one_line.c \
main.c \
read_file.c \
checker.c \
tetri.c \
tools1.c \
tools2.c \
solve.c \
ft_atoi_base.c \
map.c \
ft_sqrt.c \
ft_free.c \
ft_itoa_base.c
OBJ_NAME = $(SRC_NAME:.c=.o)
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
OBJ = $(addprefix $(OBJ_PATH)/,$(OBJ_NAME))
all: $(NAME)
$(NAME): $(OBJ)
@$(MAKE) -C $(LIB_P)
@echo "FILLIT - Exe creation"
@$(CC) $(LDFLAGS) $(LDLIBS) $^ -o $@
$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c
@mkdir -p bin
@$(CC) $(FLAGS) $(CPPFLAGS) -c $< -o $@
clean:
@echo "FILLIT - Cleaning objects"
@rm -Rf $(OBJ_PATH)
@$(MAKE) -C $(LIB_P) clean
fclean: clean
@echo "FILLIT - Full clean (objects + exe)"
@rm -Rf $(NAME)
@$(MAKE) -C $(LIB_P) fclean
re: fclean all