all:
	cd 'src code'; $(CXX) -fprofile-arcs -ftest-coverage -fPIC main.cpp -o testcase

run: txt xml html sonarqube json

txt:
	cd 'src code'; ./testcase
	$(GCOVR) -r 'src code' -d -o coverage.txt

# generate multiple output formats together
xml html sonarqube:
	cd 'src code'; ./testcase
	$(GCOVR) -r 'src code' -d -x -o coverage.xml \
		--html-details coverage.html --sonarqube sonarqube.xml

json:
	# pass

clean:
	rm -f */testcase
	rm -f */*.gc*
	rm -f coverage.txt coverage.xml coverage*.html sonarqube.xml
