aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4837cab..26db30e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,27 @@
-RM = rm -f
+# **************************************************************************** #
+# #
+# ::: :::::::: #
+# Makefile :+: :+: :+: #
+# +:+ +:+ +:+ #
+# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
+# +#+#+#+#+#+ +#+ #
+# Created: 2020/02/01 09:48:56 by cacharle #+# #+# #
+# Updated: 2020/02/01 10:11:21 by cacharle ### ########.fr #
+# #
+# **************************************************************************** #
-CC = clang++
-CCFLAGS = -Wall -Wextra #-Werror
+RM = rm -f
-SRC_DIR = src
+INCLUDE_DIR = include
TEST_DIR = test
OBJ_DIR = obj
+CC = clang++
+CCFLAGS = -I$(INCLUDE_DIR) -Wall -Wextra #-Werror
+
+INCLUDE = $(shell find $(INCLUDE_DIR) -type f -name "*.hpp")
TEST_SRC = $(shell find $(TEST_DIR) -type f -name "*.cpp")
OBJ = $(TEST_SRC:$(TEST_DIR)/%.cpp=$(OBJ_DIR)/%.o)
-$(info $(OBJ))
NAME = ft_containers_test
@@ -21,7 +33,7 @@ prebuild:
$(NAME): $(OBJ)
$(CC) -o $@ $^
-$(OBJ_DIR)/%.o: $(TEST_DIR)/%.cpp
+$(OBJ_DIR)/%.o: $(TEST_DIR)/%.cpp $(INCLUDE)
$(CC) $(CCFLAGS) -c -o $@ $<
clean: