-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (43 loc) · 1.93 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: anaouadi <[email protected] +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/03/04 11:41:04 by anaouadi #+# #+# #
# Updated: 2022/03/13 14:35:10 by anaouadi ### ########.fr #
# #
# **************************************************************************** #
# Client #
CNAME = client # Name of the client
CSOURCE = client.c client_utils.c # Source files that make the client
CSOURCE_bonus = client_bonus.c client_utils.c # Source files that make the client
# Server #
SNAME = server # Name of the server
SSOURCE = server.c server_utils.c # Source files that make the server
SSOURCE_bonus = server_bonus.c server_utils.c # Source files that make the server
# Compile #
CC = gcc # compiler that will comile the files
FLAGS = -Wall -Werror -Wextra -g # flags that will be used to compile source files
all: $(SNAME) $(CNAME)
$(CNAME): client.o client_utils.c ft_printf/libftprintf.a
$(CC) $(FLAGS) $^ -o $@
$(SNAME): server.o server_utils.c ft_printf/libftprintf.a
$(CC) $(FLAGS) $^ -o $@
ft_printf/libftprintf.a :
make -C ft_printf/
client.o : client.c client_utils.c
$(CC) $(FLAGS) -c $^
server.o : server.c server_utils.c
$(CC) $(FLAGS) -c $^
clean :
rm -rf *.o
fclean :
rm -rf $(CNAME) $(SNAME) *.o
make fclean -C ft_printf/
bonus : $(SNAME) $(CNAME)
re : fclean all
no :
norminette *.c *.h
.PHONY: all clean fclean no