-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (49 loc) · 1.88 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
#******************************************************************************#
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ptao <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/01/30 12:40:14 by ptao #+# #+# #
# Updated: 2016/01/31 19:51:01 by eleclet ### ########.fr #
# #
#******************************************************************************#
NAME = game_2048
SRC_PATH = ./
OBJ_PATH =
INC_PATH = -I.
LIB_NAME = -lncurses -lcurses
CFLAGS = -g
CC = gcc
SRC_NAME = main.c \
message.c \
grid.c \
tool.c \
movement_down.c \
movement_up.c \
movement_left.c \
movement_right.c \
random.c \
check.c \
draw_tab.c \
print512.c \
printn.c \
sys.c \
OBJ_NAME = $(SRC:.c=.o)
SRC = $(addprefix $(SRC_PATH),$(SRC_NAME))
OBJ = $(addprefix $(OBJ_PATH),$(OBJ_NAME))
.PHONY: all clean fclean re
all: $(NAME)
$(NAME): $(OBJ)
make -C ./libft
$(CC) $^ -o $@ $(LIB_NAME) ./libft/libft.a
$(OBJ_PATH)%.o: $(SRC_PATH)%.c
$(CC) $(CFLAGS) $(INC_PATH) -c $(LIB_NAME) $<
clean:
rm -f $(OBJ)
fclean: clean
rm -f $(NAME)
cd libft/
rm -f *.o
re: fclean all