SUBDIRS = . src docs EXTRA_DIST = regen.sh TO_LOCAL_CLEAN= ALL_CHECKS= LINT= if CHECK SUBDIRS += tests ALL_CHECKS += check CHECK_STAMP=tests/test-suite.log $(CHECK_STAMP): $(MAKE) check if HAVE_GCOV if HAVE_LCOV LCOV_INFO=lcov.info LCOV_HTML=lcov_html TO_LOCAL_CLEAN += $(LCOV_INFO) $(LCOV_HTML) $(LCOV_INFO): $(CHECK_STAMP) $(LCOV) --base-directory $(top_builddir)/src/ --capture --directory $(top_builddir)/src/ --output-file $@ $(LCOV_HTML): $(LCOV_INFO) genhtml $< --output-directory $@ endif # HAVE_LCOV endif # HAVE_GCOV ALL_CHECKS += coverage coverage: $(LCOV_HTML) endif # CHECK if HAVE_CPPCHECK LINT += cppcheck cppcheck: $(CPPCHECK) --enable=all --inline-suppr --check-config --suppress=missingIncludeSystem -q $(top_builddir)/src -I $(top_builddir)/src/ endif # HAVE_CPPCHECK checks: $(ALL_CHECKS) lint: $(LINT) doxygen: $(MAKE) -C docs DEB_BUILD=$(PACKAGE)-$(VERSION) DEB_PREF=$(PACKAGE)_$(VERSION)-1_amd64 DEB_PKG=$(DEB_PREF).deb DEB_FOLDER=$(DEB_BUILD)/debian RPM_BUILD=rpm_build PKGV=$(PACKAGE)-$(VERSION).tar.gz TO_LOCAL_CLEAN+=$(PACKAGE)_$(VERSION)-1.debian.tar.xz $(PACKAGE)_$(VERSION)-1.dsc\ $(PACKAGE)_$(VERSION).orig.tar.gz \ $(PACKAGE)-dbgsym_$(VERSION)-1_amd64.deb \ $(DEB_PREF).buildinfo \ $(DEB_PREF).changes \ $(DEB_PREF).deb \ $(PACKAGE)_$(VERSION).tar.gz \ $(PACKAGE)-$(VERSION) \ $(RPM_BUILD) \ *.rpm $(PKGV): dist $(DEB_BUILD): $(PACKAGE)-$(VERSION).tar.gz tar -xf $< $(DEB_FOLDER): deb_folder $(DEB_BUILD) cp -R $< $@ $(DEB_PKG): $(PKGV) $(DEB_BUILD) $(DEB_FOLDER) cd $(DEB_BUILD);\ dh_make -a -y -s -f ../$(PACKAGE)-$(VERSION).tar.gz;\ rm debian/*.ex debian/*.EX debian/README.Debian debian/README.source ;\ dpkg-buildpackage $(shell [ -z ${DEB_SIGN_KEYID} ] && echo "-us -uc" || echo "--sign-key='${DEB_SIGN_KEYID}'"); deb: $(DEB_PKG) rpm: $(DEB_PKG) mkdir -p $(RPM_BUILD);\ cd $(RPM_BUILD); \ fakeroot alien -k --to-rpm ../$(DEB_PKG);\ mv *.rpm ../; release: deb rpm clean-local: -rm -rf $(TO_LOCAL_CLEAN)