diff --git a/CMakeLists.txt b/CMakeLists.txt index 84fd5c98d..a08b90763 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -737,4 +737,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libre.pc # Test # -add_subdirectory(test) +add_subdirectory(test EXCLUDE_FROM_ALL) diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..775a099b1 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +.PHONY: build +build: + [ -d build ] || cmake -B build + cmake --build build --parallel + +.PHONY: ninja +ninja: + [ -d build ] || cmake -B build -G Ninja + make build + +.PHONY: dist +dist: build + cmake --install build --prefix dist + +.PHONY: test +test: build + cmake --build build --parallel -t retest + build/test/retest -rv + +.PHONY: clean +clean: + @rm -Rf build dist CMakeCache.txt CMakeFiles + + +############################################################################### +# +# Documentation section +# +DOX_DIR=../re-dox + +$(DOX_DIR): + @mkdir $@ + +$(DOX_DIR)/Doxyfile: mk/Doxyfile Makefile + @cp $< $@ + @perl -pi -e 's/PROJECT_NUMBER\s*=.*/PROJECT_NUMBER = $(VERSION)/' \ + $(DOX_DIR)/Doxyfile + +.PHONY: +dox: $(DOX_DIR) $(DOX_DIR)/Doxyfile + @doxygen $(DOX_DIR)/Doxyfile 2>&1 | grep -v DEBUG_ ; true + echo "Doxygen docs in $(DOX_DIR)"