-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 1.08 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
61
62
63
64
##
## EPITECH PROJECT, 2019
## base_repo
## File description:
## Makefile file
##
SRC = src/ftp.c\
src/sessions.c\
src/sockets.c\
src/tools.c\
src/commands/cwd.c\
src/commands/help.c\
src/commands/noop.c\
src/commands/pasv.c\
src/commands/pwd.c\
src/commands/retr.c\
src/commands/user.c\
src/commands/dele.c\
src/commands/list.c\
src/commands/pass.c\
src/commands/port.c\
src/commands/quit.c\
src/commands/cdup.c\
src/commands/syst.c\
src/commands/invalid.c\
src/commands/stor.c
OBJ = $(SRC:%.c=%.o)
MAIN = src/main.c
OMAIN = $(MAIN:.c=.o)
CFLAGS = -Iinclude/ -Wall -Wextra
NAME = myftp
all: $(NAME)
$(NAME): $(OBJ) $(OMAIN)
gcc -o $(NAME) $(OBJ) $(OMAIN) $(CFLAGS)
clean:
rm -rf $(OBJ)
rm -rf $(OTRC)
rm -rf $(OMAIN)
fclean: clean
rm -rf $(NAME)
rm -rf unit_test
gclean: fclean clean
find . -name "*.gc*" -delete
re: gclean all
tests_run: $(OTRC) $(OBJ)
gcc -o unit_test $(TRC) $(SRC) $(CFLAGS) -lcriterion --coverage
#./$(NAME) 5800 `pwd` &
./unit_test
.PHONY: gclean clean fclean re tests_run all