-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (59 loc) · 1.92 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
NAME_SERVER = zappy_server
NAME_CLI = zappy_client
NAME_AI = zappy_ai
SRC_COMMON = src/my_malloc.c \
src/my_error.c \
src/my_select.c \
src/get_next_line.c \
src/socket_utils.c
SRC_SERVER = src/server/server.c \
src/server/server_socket.c \
src/server/main.c \
src/server/client.c \
src/server/client_list.c \
src/server/client_utils.c \
src/server/configuration.c \
src/server/cmd_handler.c \
src/server/init.c \
src/server/response.c \
src/server/player.c \
src/server/client_handler.c \
src/server/select_team.c \
src/server/action_list.c \
src/server/commands/map_cmd.c \
src/server/commands/move_cmd.c \
src/server/commands/obj_cmd.c \
src/server/commands/incant_cmd.c \
src/server/commands/check_cmd.c \
src/server/commands/look_cmd.c \
src/server/commands/eject_cmd.c \
src/server/commands/fork_cmd.c \
src/server/commands/graph_plr_cmd.c \
src/server/graph_protocol/game_info.c \
src/server/graph_protocol/map_info.c \
src/server/graph_protocol/player_info.c \
src/server/graph_protocol/obj_info.c \
src/server/graph_protocol/egg_info.c \
src/server/game.c \
$(SRC_COMMON)
SRC_CLI = src/client/instructions.c \
src/client/main.c
SRC_AI = src/ai/zapp_ai
OBJ_SERVER = $(SRC_SERVER:.c=.o)
OBJ_AI = $(SRC_AI:.c=.o)
OBJ_CLI = $(SRC_CLI:.c=.o)
CFLAGS = -W -Wall -Wextra -g -I./include/ -g
all: zappy_ai zappy_server
zappy_server: $(OBJ_SERVER)
gcc -o $(NAME_SERVER) $(OBJ_SERVER) $(CFLAGS) -lm
zappy_ai:
@$(shell cp src/ai/zappy_ai ./)
client: $(OBJ_CLI)
gcc -o $(NAME_CLI) $(OBJ_CLI) $(CFLAGS)
clean:
rm -rf $(OBJ_SERVER)
rm -rf $(OBJ_AI)
fclean: clean
rm -rf $(NAME_SERVER)
#rm -rf $(NAME_AI)
re: fclean all