-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (34 loc) · 1.55 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ttshivhu <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/08/11 11:29:48 by ttshivhu #+# #+# #
# Updated: 2018/08/15 11:48:27 by ttshivhu ### ########.fr #
# #
# **************************************************************************** #
SERVER = server
CLIENT = client
CC = gcc
CFLAGS = -Wall -Werror -Wextra -I. -Ilibft
SRC = file_dir.c get_dir.c cutils.c file_handling.c generic.c ls.c pwd_cd.c local.c
SILENT = --no-print-directory
OBJ = $(SRC:.c=.o)
all: $(SERVER)
$(SERVER): $(OBJ)
make -C libft $(SILENT)
gcc -c $(CFLAGS) smain.c
gcc -c $(CFLAGS) cmain.c
gcc $(OBJ) smain.o $(CFLAGS) -Llibft -lft -o $(SERVER)
gcc $(OBJ) cmain.o $(CFLAGS) -Llibft -lft -lreadline -o $(CLIENT)
@printf "\x1b[32mCompiled $(SERVER) and $(CLIENT)\x1b[0m\n"
clean:
make clean -C libft $(SILENT)
/bin/rm -f $(OBJ)
/bin/rm -f smain.o cmain.o
fclean: clean
make fclean -C libft $(SILENT)
/bin/rm -f $(SERVER) $(CLIENT)
re: fclean all