-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (39 loc) · 1.71 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/04/24 20:21:03 by charles #+# #+# #
# Updated: 2020/04/26 09:34:27 by charles ### ########.fr #
# #
# **************************************************************************** #
FT_CONTAINERS_DIR = ../ft_containers
PYTHON = python3
PRETTIER = prettier.py
NAME = ft_containers_test
SEGV_WRAPPER = segv_wrapper.sh
SEGV_WRAPPER_OUT = segv_wrapper.out
SRC_DIR = src
CXX = clang++
CXXFLAGS = -std=c++98 -O0 -Wall -Wextra -I$(FT_CONTAINERS_DIR) -I.
SRC = $(shell find $(SRC_DIR) -type f -name '*.cpp')
OBJ = $(SRC:.cpp=.o)
INC = ft_containers_test.hpp
run: all
@./$(SEGV_WRAPPER) ./$(NAME) $(SEGV_WRAPPER_OUT) $(PRETTIER)
all: $(NAME)
$(NAME): $(OBJ)
$(CXX) -o $@ $(OBJ)
$(SRC_DIR)/vector_test.o: $(SRC_DIR)/vector_test.cpp $(INC) $(FT_CONTAINERS_DIR)/Vector.hpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(SRC_DIR)/list_test.o: $(SRC_DIR)/list_test.cpp $(INC) $(FT_CONTAINERS_DIR)/List.hpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: %.cpp $(INC)
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f $(OBJ)
fclean: clean
rm -f $(NAME)
re: fclean all