-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (30 loc) · 1.37 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
# **************************************************************************** #
# #
# ::: :::::::: #
# makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: oseivane <oseivane@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/10/09 15:23:57 by oseivane #+# #+# #
# Updated: 2023/10/09 15:24:08 by oseivane ### ########.fr #
# #
# **************************************************************************** #
SERVER_NAME = server
CLIENT_NAME = client
SRC = server.c client.c utils.c
OBJ = $(SRC:.c=.o)
CC = gcc
GCC = gcc -Wall -Wextra -Werror
all : $(SERVER_NAME) $(CLIENT_NAME)
$(SERVER_NAME): server.o utils.o
$(CC) $(CFLAGS) -o $(SERVER_NAME) server.o utils.o
$(CLIENT_NAME): client.o utils.o
$(CC) $(CFLAGS) -o $(CLIENT_NAME) client.o utils.o
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean :
rm -f *.o
fclean : clean
rm -f $(SERVER_NAME) $(CLIENT_NAME)
re : fclean all
.PHONY : all clean fclean re