-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (47 loc) · 1.7 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kfaustin <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/06 15:49:49 by kfaustin #+# #+# #
# Updated: 2023/01/09 15:58:48 by kfaustin ### ########.fr #
# #
# **************************************************************************** #
LIBFT = includes/libft
PRINTF = includes/ft_printf
LIBA = libft.a
PRIA = libftprintf.a
CC = cc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
SRCS = ./src/server.c
SRCC = ./src/client.c
SRCSB = ./src/bonusserver.c
SRCCB = ./src/bonusclient.c
all: sc clean
sc: printf libft
$(CC) $(CFLAGS) $(SRCS) $(PRIA) -o server
$(CC) $(CFLAGS) $(SRCC) $(LIBA) $(PRIA) -o client
bonus: printf libft
$(CC) $(CFLAGS) $(SRCSB) $(PRIA) -o server
$(CC) $(CFLAGS) $(SRCCB) $(LIBA) $(PRIA) -o client
$(RM) libft.a libftprintf.a
libft:
@make -C $(LIBFT)
@cp $(LIBFT)/$(LIBA) .
printf:
@make -C $(PRINTF)
@cp $(PRINTF)/$(PRIA) .
clean:
$(RM) libft.a libftprintf.a
make -C $(LIBFT) clean
make -C $(PRINTF) clean
fclean: clean
make -C $(LIBFT) fclean
make -C $(PRINTF) fclean
finish: fclean
$(RM) server client
re: fclean all
reall: finish all