-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (28 loc) · 1.36 KB
/
Makefile
File metadata and controls
41 lines (28 loc) · 1.36 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kmoutaou <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/11/07 19:40:06 by kmoutaou #+# #+# #
# Updated: 2021/12/19 14:03:14 by kmoutaou ### ########.fr #
# #
# **************************************************************************** #
CLIENT = client
SERVER = server
CC = cc
FLAGS = -Wall -Wextra -Werror
all: $(CLIENT) $(SERVER)
$(CLIENT) :
$(CC) $(FLAGS) srcs/client.c srcs/ft_atoi.c srcs/ft_isdigit.c srcs/ft_putstr_fd.c -o client
$(SERVER):
$(CC) $(FLAGS) srcs/server.c srcs/ft_putnbr_fd.c srcs/ft_putchar_fd.c -o server
%.o: %.c
$(CC) $(FLAGS) -c $< -o $(<:.c=.o)
ar rcs $(CLIENT) $(SERVER) ${<:.c=.o}
clean:
rm -f $(CLIENT) $(SERVER)
fclean: clean
re: fclean all
.PHONY: all re clean fclean