Skip to content

Incorporate changes from SourceForge #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 96 additions & 96 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
CXX = g++
CXXFLAGS ?= -g -Wall -W -ansi # -pedantic
LDFLAGS ?=
SED = sed
MV = mv
RM = rm
.SUFFIXES: .o .cpp
lib = libUnitTest++.a
test = TestUnitTest++
src = src/AssertException.cpp \
src/Test.cpp \
src/Checks.cpp \
src/TestRunner.cpp \
src/TestResults.cpp \
src/TestReporter.cpp \
src/TestReporterStdout.cpp \
src/ReportAssert.cpp \
src/TestList.cpp \
src/TimeConstraint.cpp \
src/TestDetails.cpp \
src/MemoryOutStream.cpp \
src/DeferredTestReporter.cpp \
src/DeferredTestResult.cpp \
src/XmlTestReporter.cpp \
src/CurrentTest.cpp
ifeq ($(MSYSTEM), MINGW32)
src += src/Win32/TimeHelpers.cpp
else
src += src/Posix/SignalTranslator.cpp \
src/Posix/TimeHelpers.cpp
endif
test_src = src/tests/Main.cpp \
src/tests/TestAssertHandler.cpp \
src/tests/TestChecks.cpp \
src/tests/TestUnitTest++.cpp \
src/tests/TestTest.cpp \
src/tests/TestTestResults.cpp \
src/tests/TestTestRunner.cpp \
src/tests/TestCheckMacros.cpp \
src/tests/TestTestList.cpp \
src/tests/TestTestMacros.cpp \
src/tests/TestTimeConstraint.cpp \
src/tests/TestTimeConstraintMacro.cpp \
src/tests/TestMemoryOutStream.cpp \
src/tests/TestDeferredTestReporter.cpp \
src/tests/TestXmlTestReporter.cpp \
src/tests/TestCurrentTest.cpp
objects = $(patsubst %.cpp, %.o, $(src))
test_objects = $(patsubst %.cpp, %.o, $(test_src))
dependencies = $(subst .o,.d,$(objects))
test_dependencies = $(subst .o,.d,$(test_objects))
define make-depend
$(CXX) $(CXXFLAGS) -M $1 | \
$(SED) -e 's,\($(notdir $2)\) *:,$(dir $2)\1: ,' > $3.tmp
$(SED) -e 's/#.*//' \
-e 's/^[^:]*: *//' \
-e 's/ *\\$$//' \
-e '/^$$/ d' \
-e 's/$$/ :/' $3.tmp >> $3.tmp
$(MV) $3.tmp $3
endef
all: $(test)
$(lib): $(objects)
@echo Creating $(lib) library...
@ar cr $(lib) $(objects)
$(test): $(lib) $(test_objects)
@echo Linking $(test)...
@$(CXX) $(LDFLAGS) -o $(test) $(test_objects) $(lib)
@echo Running unit tests...
@./$(test)
clean:
-@$(RM) $(objects) $(test_objects) $(dependencies) $(test_dependencies) $(test) $(lib) 2> /dev/null
%.o : %.cpp
@echo $<
@$(call make-depend,$<,$@,$(subst .o,.d,$@))
@$(CXX) $(CXXFLAGS) -c $< -o $(patsubst %.cpp, %.o, $<)
ifneq "$(MAKECMDGOALS)" "clean"
-include $(dependencies)
-include $(test_dependencies)
endif
CXX = g++
CXXFLAGS ?= -g -Wall -W -Winline -ansi
LDFLAGS ?=
SED = sed
MV = mv
RM = rm

.SUFFIXES: .o .cpp

lib = libUnitTest++.a
test = TestUnitTest++

src = src/AssertException.cpp \
src/Test.cpp \
src/Checks.cpp \
src/TestRunner.cpp \
src/TestResults.cpp \
src/TestReporter.cpp \
src/TestReporterStdout.cpp \
src/ReportAssert.cpp \
src/TestList.cpp \
src/TimeConstraint.cpp \
src/TestDetails.cpp \
src/MemoryOutStream.cpp \
src/DeferredTestReporter.cpp \
src/DeferredTestResult.cpp \
src/XmlTestReporter.cpp \
src/CurrentTest.cpp

ifeq ($(MSYSTEM), MINGW32)
src += src/Win32/TimeHelpers.cpp
else
src += src/Posix/SignalTranslator.cpp \
src/Posix/TimeHelpers.cpp
endif

test_src = src/tests/Main.cpp \
src/tests/TestAssertHandler.cpp \
src/tests/TestChecks.cpp \
src/tests/TestUnitTest++.cpp \
src/tests/TestTest.cpp \
src/tests/TestTestResults.cpp \
src/tests/TestTestRunner.cpp \
src/tests/TestCheckMacros.cpp \
src/tests/TestTestList.cpp \
src/tests/TestTestMacros.cpp \
src/tests/TestTimeConstraint.cpp \
src/tests/TestTimeConstraintMacro.cpp \
src/tests/TestMemoryOutStream.cpp \
src/tests/TestDeferredTestReporter.cpp \
src/tests/TestXmlTestReporter.cpp \
src/tests/TestCurrentTest.cpp

objects = $(patsubst %.cpp, %.o, $(src))
test_objects = $(patsubst %.cpp, %.o, $(test_src))
dependencies = $(subst .o,.d,$(objects))
test_dependencies = $(subst .o,.d,$(test_objects))

define make-depend
$(CXX) $(CXXFLAGS) -M $1 | \
$(SED) -e 's,\($(notdir $2)\) *:,$(dir $2)\1: ,' > $3.tmp
$(SED) -e 's/#.*//' \
-e 's/^[^:]*: *//' \
-e 's/ *\\$$//' \
-e '/^$$/ d' \
-e 's/$$/ :/' $3.tmp >> $3.tmp
$(MV) $3.tmp $3
endef


all: $(test)


$(lib): $(objects)
@echo Creating $(lib) library...
@ar cr $(lib) $(objects)

$(test): $(lib) $(test_objects)
@echo Linking $(test)...
@$(CXX) $(LDFLAGS) -o $(test) $(test_objects) $(lib)
@echo Running unit tests...
@./$(test)

clean:
-@$(RM) $(objects) $(test_objects) $(dependencies) $(test_dependencies) $(test) $(lib) 2> /dev/null

%.o : %.cpp
@echo $<
@$(call make-depend,$<,$@,$(subst .o,.d,$@))
@$(CXX) $(CXXFLAGS) -c $< -o $(patsubst %.cpp, %.o, $<)


ifneq "$(MAKECMDGOALS)" "clean"
-include $(dependencies)
-include $(test_dependencies)
endif
169 changes: 169 additions & 0 deletions TestUnitTestPP_vs6.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading