This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (65 loc) · 1.89 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
##
## EPITECH PROJECT, 2017
## Makefile
## File description:
## Makefile for SYN_palindrome_2017
##
SRC = src/main.c \
src/core/preview/file_parsing.c \
src/core/tree/dir_parsing.c \
src/core/tree/file_details_parsing.c \
src/core/tree/list_parsing.c \
src/core/utils/free_nodes.c \
src/core/utils/free_explorer.c \
src/core/utils/free_tab.c \
src/core/utils/getpwd.c \
src/core/utils/init_explorer.c \
src/gui/utils/end_gui.c \
src/gui/utils/init_gui.c \
src/gui/utils/middle_print.c \
src/gui/color_handler.c \
src/gui/gui_main.c \
src/gui/print_preview.c \
src/keyboard/keyboard_handler.c \
SRCS_TEST =
OBJ = $(SRC:.c=.o)
INC_DIR = $(realpath ./include)
LIB_DIR = $(realpath ./lib)
NAME = explorer
NAME_LIBMY = lib/libmy.a
NAME_TEST_LIB = lib/libtestmy.a
CFLAGS = -W -Wall -Wextra -pedantic -std=c99 -I$(INC_DIR)
LDFLAGS = -L$(LIB_DIR) -lmy -lncurses
LDTESTFLAGS = -L$(LIB_DIR) -ltestmy -lncurses
all: $(NAME_LIBMY) $(NAME)
$(NAME_TEST_LIB):
make all clean -C ./lib/testmy
$(NAME_LIBMY):
make all clean -C ./lib/my
$(NAME): $(OBJ)
gcc -o $(NAME) $(OBJ) $(LDFLAGS)
clean:
rm -f $(OBJ)
make clean -C ./lib/my
make clean -C ./lib/testmy
rm -f *.gc*
rm -f vgcore.*
fclean: clean
rm -f $(NAME)
make fclean -C ./lib/my
make fclean -C ./lib/testmy
rm -f units
rm -rf ./report
rm -f rapport.info
re: fclean all
tests_run: $(NAME_TEST_LIB) $(SRCS_TEST)
gcc $(SRCS_TEST) -I./include/ -o units --coverage -lcriterion $(LDTESTFLAGS)
./units -j0 --always-succeed
gcov *
tests_coverage: fclean tests_run
lcov --directory . -c -o rapport.info
genhtml -o ./report -t "code coverage report" rapport.info
xdg-open ./report/index.html &>/dev/null
docker_test: fclean
sudo docker run -v `pwd`:/project -it epitechcontent/epitest-docker /bin/bash
.PHONY: all clean fclean re tests_run tests_coverage docker_test