-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (39 loc) · 1.5 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: amontign <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/05/30 09:20:11 by amontign #+# #+# #
# Updated: 2023/07/25 10:50:16 by amontign ### ########.fr #
# #
# **************************************************************************** #
NAMESERVER = server
NAMECLIENT = client
CC = cc
SRCSERVER = utils.c \
utils2.c \
utils3.c \
main_server.c \
main_server2.c
SRCCLIENT = main_client.c \
main_client2.c \
utils.c \
utils2.c \
utils3.c
OBJSSERVER = ${SRCSERVER:.c=.o}
OBJSCLIENT = ${SRCCLIENT:.c=.o}
.c.o :
${CC} -g -Wall -Wextra -Werror -c $< -o ${<:.c=.o}
all: ${NAMESERVER} ${NAMECLIENT}
$(NAMESERVER): ${OBJSSERVER}
${CC} -o ${NAMESERVER} ${OBJSSERVER}
$(NAMECLIENT): ${OBJSCLIENT}
${CC} -o ${NAMECLIENT} ${OBJSCLIENT}
clean:
rm -f ${OBJSSERVER} ${OBJSCLIENT}
fclean: clean
rm -f ${NAMESERVER} ${NAMECLIENT}
re: fclean all
.PHONY: all clean fclean re