From 81fc6d71112e8e6a3dc4a78fbaeac5b89674f786 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Fri, 7 Nov 2014 11:37:27 +0000 Subject: [PATCH 1/2] Remove missing catch_self_test.cpp, fixes #348 --- projects/SelfTest/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/SelfTest/makefile b/projects/SelfTest/makefile index e5dec0dc..8c72c076 100644 --- a/projects/SelfTest/makefile +++ b/projects/SelfTest/makefile @@ -9,7 +9,7 @@ SOURCES = ApproxTests.cpp \ TrickyTests.cpp \ BDDTests.cpp \ VariadicMacrosTests.cpp \ - catch_self_test.cpp + OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) CXX = g++ CXXFLAGS = -I../../include From aaa1970a06960bc3a05865f28c4ad8ef6514bea3 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Sat, 8 Nov 2014 18:57:03 +0000 Subject: [PATCH 2/2] More generic and maintainable makefile. Fixes #348 - implicit recipes - wildcard glob of C++ files in directory --- projects/SelfTest/makefile | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/projects/SelfTest/makefile b/projects/SelfTest/makefile index 8c72c076..f828c526 100644 --- a/projects/SelfTest/makefile +++ b/projects/SelfTest/makefile @@ -1,21 +1,14 @@ -SOURCES = ApproxTests.cpp \ - ClassTests.cpp \ - ConditionTests.cpp \ - ExceptionTests.cpp \ - GeneratorTests.cpp \ - MessageTests.cpp \ - MiscTests.cpp \ - TestMain.cpp \ - TrickyTests.cpp \ - BDDTests.cpp \ - VariadicMacrosTests.cpp \ -OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) +EXEC=CatchSelfTest +SOURCES = $(wildcard *.cpp) +OBJECTS = $(SOURCES:.cpp=.o) + CXX = g++ -CXXFLAGS = -I../../include +CXXFLAGS = -I../../include -I../../include/internal -CatchSelfTest: $(OBJECTS) +$(EXEC): $(OBJECTS) $(CXX) -o $@ $^ clean: - rm -f $(OBJECTS) + $(RM) $(OBJECTS) + $(RM) $(EXEC)