-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (31 loc) · 884 Bytes
/
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
SERVER = server
CLIENT = client
SERVER_B = server_bonus
CLIENT_B = client_bonus
LIBFT = ./libft/libft.a
HEADER = includes/minitalk.h
HEADER_B = includes/*_bonus.h
CFLAGS = -Wall -Wextra -Werror
all: $(LIBFT) $(CLIENT) $(SERVER) $(HEADER)
$(SERVER): src/server.c $(HEADER)
@gcc src/server.c $(LIBFT) -o $@
@echo $@ ready
$(CLIENT): src/client.c $(HEADER)
@gcc $(CFLAGS) src/client.c $(LIBFT) -o $@
@echo $@ ready
$(SERVER_B): src/server_bonus.c $(HEADER_B)
@gcc src/server_bonus.c $(LIBFT) -o $@
@echo $@ readymake
$(CLIENT_B): src/client_bonus.c $(HEADER_B)
@gcc src/client_bonus.c $(LIBFT) -o $@
@echo $@ ready
$(LIBFT):
@make -C./libft
bonus: $(LIBFT) $(SERVER_B) $(CLIENT_B) $(HEADER_B)
clean:
@make clean -C ./libft
fclean: clean
rm -rf $(SERVER) $(CLIENT) $(SERVER_B) $(CLIENT_B)
make fclean -C ./libft
re: fclean all
.PHONY: all re clean fclean bonus