-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 826 Bytes
/
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
##
## EPITECH PROJECT, 2019
## minishell1
## File description:
## Makefile
##
SRC = $(shell find ./ -name '*.cpp' ! -name unit_test.cpp) \
OBJ = $(SRC:.c=.o)
TEST = $(shell find ./ -name '*.cpp' ! -name 'main.cpp') \
CC = g++ -I./include
NAME = plazza
CPP_FLAGS = -lpthread -W -Wall -Wextra -std=c++11 -g3
all: $(NAME)
tests_run: $(TEST)
$(CC) -o unit_tests $(TEST) -lcriterion --coverage
./unit_tests | gcovr
$(NAME): $(OBJ)
$(CC) -o $(NAME) $(CPP_FLAGS) $(OBJ)
clean:
@rm -f $(shell find $(SOURCEDIR) -name '*.o')
@rm -f $(shell find $(SOURCEDIR) -name '*~')
@rm -f $(shell find $(SOURCEDIR) -name '*#')
@rm -f $(shell find $(SOURCEDIR) -name '*vg*')
@rm -f $(shell find $(SOURCEDIR) -name '*.gc*')
@echo -e "is clean"
fclean: clean
@rm -f $(NAME)
re: fclean all
.PHONY: all tests_run clean fclean re