-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (42 loc) · 1.71 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aaljaber <[email protected] +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/11/13 17:00:26 by aaljaber #+# #+# #
# Updated: 2022/08/09 14:20:02 by aaljaber ### ########.fr #
# #
# **************************************************************************** #
SSM = ./SRC/Mandatory/server.c
CSM = ./SRC/Mandatory/client.c
SSB = ./SRC/Bonus/server_bonus.c
CSB = ./SRC/Mandatory/client_bonus.c
SOM = $(SSM:.c=.o)
COM = $(CSM:.c=.o)
SOB = $(SSB:.c=.o)
COB = $(CSB:.c=.o)
RM = rm -f
CC = gcc
CFLAGS = -Wall -Wextra -Werror
all : server client
bonus : serverb clientb
serverb :
${MAKE} -C ./LIB/libft
$(CC) $(CFLAGS) $(SSB) ./LIB/libft/libft.a -o server
clientb :
${MAKE} -C ./LIB/libft
$(CC) $(CFLAGS) $(CSB) ./LIB/libft/libft.a -o client
server :
${MAKE} -C ./LIB/libft
$(CC) $(CFLAGS) $(SSM) ./LIB/libft/libft.a -o server
client :
${MAKE} -C ./LIB/libft
$(CC) $(CFLAGS) $(CSM) ./LIB/libft/libft.a -o client
clean :
${MAKE} clean -C ./LIB/libft
$(RM) $(SOM) $(COM) ${SOB} ${COB}
fclean : clean
$(RM) server client ./LIB/libft/libft.a
re : fclean all