-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (40 loc) · 1.66 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ysonmez <ysonmez@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/19 11:02:47 by ysonmez #+# #+# #
# Updated: 2021/08/20 17:36:48 by ysonmez ### ########.fr #
# #
# **************************************************************************** #
NAME = minitalk
CLIENT = client
SERVER = server
SRCS_SERVER = srcs_server/server.c \
SRCS_CLIENT = srcs_client/client.c \
OBJS_SERVER = $(SRCS_SERVER:.c=.o)
OBJS_CLIENT = $(SRCS_CLIENT:.c=.o)
LIB = make -C ./libft
CC = gcc
CFLAGS = -Wall -Werror -Wextra
RM = rm -f
$(NAME) : $(SERVER) $(CLIENT)
server : $(OBJS_SERVER)
$(LIB)
$(CC) $(CFLAGS) $(OBJS_SERVER) libft/libft.a -o $(SERVER)
client : $(OBJS_CLIENT)
$(LIB)
$(CC) $(CFLAGS) $(OBJS_CLIENT) libft/libft.a -o $(CLIENT)
bonus : all
clean :
$(RM) $(OBJS_CLIENT)
$(RM) $(OBJS_SERVER)
fclean : clean
$(RM) $(CLIENT)
$(RM) $(SERVER)
cd ./libft && make fclean
all : $(NAME)
re : fclean all
.PHONY : clean fclean all re bonus