From 954e0d148d2e6cc0d0e8d57cb8d4d1e8fc197103 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 30 Mar 2015 08:12:41 +0200 Subject: Remove plain makefiles. Use cmake. --- test/Makefile | 78 ----------------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 test/Makefile (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 57b9df50..00000000 --- a/test/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -TARGET:=usdx-tests -include ../Makefile.inc - -headers+=$(wildcard *.hpp) $(wildcard */*.hpp) $(wildcard */*/*.hpp) -sources+=$(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard */*/*.cpp) - -LDFLAGS+=-lcppunit -CXXFLAGS-COVERAGE:=-fprofile-arcs -ftest-coverage -LDFLAGS-COVERAGE:=-coverage -TARGET-COVERAGE:=$(TARGET)-coverage -COVERAGE-DIR:=$(TOP)coverage - -objects-coverage:=$(patsubst %,$(COVERAGE-DIR)/obj/test/%,$(sources:.cpp=.o)) -coverage:=$(COVERAGE-DIR)/coverage.info.tmp $(COVERAGE-DIR)/coverage.info \ - $(objects-coverage:.o=.gcda) $(objects-coverage:.o=.gcno) \ - $(COVERAGE-DIR)/obj/ - -# include the apropriate dir from main src tree -SRC_INC=$(addprefix -I$(TOP)src/,$(filter-out ..%,$(dir $<))) - -############################################################################## - -.PHONY: all clean run - -all: $(TARGET) - -clean: - -$(RM) -r $(TARGET) $(TARGET-COVERAGE) $(objects) $(deps) $(coverage) - -run: $(TARGET) - ./$(TARGET) - -ifneq ($(MAKECMDGOALS),clean) --include $(deps) -endif - -############################################################################## -# normal build - -$(TARGET): $(objects) $(deps) - $(CXX) $(LDFLAGS) -o $(TARGET) $(objects) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) $(SRC_INC) -MMD -c $< -o $@ - -%.d: %.cpp - $(CXX) $(CXXFLAGS) $(SRC_INC) -MM -c $< -MF $@ - -############################################################################## -# build and execute tests with code coverage and build nice html pages - -test-with-coverage: $(COVERAGE-DIR)/html/index.html - @test ! -e .error - -$(COVERAGE-DIR)/html/index.html: $(COVERAGE-DIR)/coverage.info - genhtml $(COVERAGE-DIR)/coverage.info -o $(COVERAGE-DIR)/html/ -p \ - "$(realpath ./$(TOP)/src)" - -$(COVERAGE-DIR)/coverage.info: $(COVERAGE-DIR)/coverage.info.tmp - lcov --extract $(COVERAGE-DIR)/coverage.info.tmp \ - "$(realpath ./$(TOP))/src/*" \ - -o $(COVERAGE-DIR)/coverage.info - -$(COVERAGE-DIR)/coverage.info.tmp: $(TARGET-COVERAGE) - -$(RM) .error - lcov --directory $(TOP) --zerocounters - ./$(TARGET-COVERAGE) || touch .error - lcov --directory $(TOP) --capture \ - --output-file $(COVERAGE-DIR)/coverage.info.tmp -b . - -$(TARGET-COVERAGE): $(objects-coverage) $(deps) - $(CXX) $(LDFLAGS) $(LDFLAGS-COVERAGE) -o $(TARGET-COVERAGE) \ - $(objects-coverage) - -$(COVERAGE-DIR)/obj/test/%.o: %.cpp - @[ -d $(dir $@) ] || mkdir -p $(dir $@) - $(CXX) $(CXXFLAGS) $(CXXFLAGS-COVERAGE) $(SRC_INC) -MMD -c $< -o $@ - -- cgit v1.2.3