-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (21 loc) · 694 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (21 loc) · 694 Bytes
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
UNITTEST_CPP_INCLUDE ?= /usr/include/UnitTest++
ifneq (,$(findstring g++,$(CXX)))
CXXFLAGS += --coverage
endif
CXXFLAGS += -Wall -pedantic -std=c++14 -g -I$(UNITTEST_CPP_INCLUDE) -Iinclude
LDFLAGS = -lUnitTest++ -lgcov
HEADERS = $(shell find include/ -type f)
all: FixedPointTests
FixedPointTests: FixedPointTests.o
$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS)
FixedPointTests.o: FixedPointTests.cpp $(HEADERS)
tests: FixedPointTests
./FixedPointTests
coverage: FixedPoint.hpp.gcov
FixedPoint.hpp.gcov: FixedPointTests
rm -rf *.gcov *.gcda
./FixedPointTests
gcov FixedPointTests.gcda
.PHONY: clean tests coverage
clean:
rm -rf FixedPointTests.o FixedPointTests *.gcov *.gcda *.gcno