#!/usr/bin/make -f export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) %: dh $@ override_dh_auto_configure: dh_auto_configure -- \ -DBUILD_SHARED_LIBS=1 \ -DTRACY_ON_DEMAND=1 \ -DTRACY_TIMER_FALLBACK=1 # -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" tracy-client: dh_auto_build tracy-capture: cmake -B ./capture/build -S capture -DCMAKE_BUILD_TYPE=Release cmake --build ./capture/build --config Release --parallel tracy-profiler: cmake -B ./profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release cmake --build ./profiler/build --config Release --parallel tracy-csvexport: cmake -B ./csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release cmake --build ./csvexport/build --config Release --parallel tracy-import-chrome: cmake -B ./import-chrome/build -S import-chrome -DCMAKE_BUILD_TYPE=Release cmake --build ./import-chrome/build --config Release --parallel tracy-import-fuchsia: cmake -B ./import-fuchsia/build -S import-fuchsia -DCMAKE_BUILD_TYPE=Release cmake --build ./import-fuchsia/build --config Release --parallel tracy-docs: cd manual && pdflatex tracy.tex \ && bibtex tracy \ && pdflatex tracy.tex \ && pdflatex tracy.tex \ && pdflatex techdoc.tex \ && pdflatex techdoc.tex override_dh_auto_build: tracy-client tracy-capture tracy-csvexport tracy-profiler \ tracy-import-chrome tracy-import-fuchsia tracy-docs override_dh_auto_clean: dh_auto_clean # Clean capture utility rm -rf ./capture/build/* # Clean profiler rm -rf ./profiler/build/* # Clean csvexport rm -rf ./csvexport/build/* # Clean import-chrome rm -rf ./import-chrome/build # Clean import-fuchsia rm -rf ./import-fuchsia/build # Clear files left over from building documentation cd manual && \ rm -f tracy.out tracy.log tracy.blg tracy.aux tracy.bbl tracy.toc tracy.pdf && \ rm -f techdoc.out techdoc.log techdoc.aux techdoc.toc techdoc.pdf override_dh_auto_install: dh_auto_install sed -i -e 's/^#include "\.\.\/client/#include "\.\/client/g' debian/tmp/usr/include/tracy/*.h* sed -i -e 's/^#include "\.\.\/common/#include "\.\/common/g' debian/tmp/usr/include/tracy/*.h* mkdir ./debian/tmp/usr/bin find . -type d -path './capture/build' -exec cp '{}/tracy-capture' ./debian/tmp/usr/bin/tracy-capture ';' find . -type d -path './profiler/build' -exec cp '{}/tracy-profiler' ./debian/tmp/usr/bin/tracy-profiler ';' find . -type d -path './csvexport/build' -exec cp '{}/tracy-csvexport' ./debian/tmp/usr/bin/tracy-csvexport ';' find . -type d -path './import-chrome/build' -exec cp '{}/tracy-import-chrome' ./debian/tmp/usr/bin/tracy-import-chrome ';' find . -type d -path './import-fuchsia/build' -exec cp '{}/tracy-import-fuchsia' ./debian/tmp/usr/bin/tracy-import-fuchsia ';' mkdir debian/tmp/usr/share/doc/ install -m 644 manual/tracy.pdf debian/tmp/usr/share/doc/ install -m 644 manual/techdoc.pdf debian/tmp/usr/share/doc/ mkdir debian/tmp/usr/share/doc/tracy-profiler pandoc debian/tracy-profiler.1.rst --standalone \ --variable=header:"tracy-profiler User Manual" \ --variable=section:1 \ --from rst \ --to man > debian/tmp/usr/share/doc/tracy-profiler/tracy-profiler.1 mkdir debian/tmp/usr/share/doc/tracy-capture pandoc debian/tracy-capture.1.rst --standalone \ --variable=header:"tracy-capture User Manual" \ --variable=section:1 \ --from rst \ --to man > debian/tmp/usr/share/doc/tracy-capture/tracy-capture.1 mkdir debian/tmp/usr/share/doc/tracy-csvexport pandoc debian/tracy-csvexport.1.rst --standalone \ --variable=header:"tracy-csvexport User Manual" \ --variable=section:1 \ --from rst \ --to man > debian/tmp/usr/share/doc/tracy-csvexport/tracy-csvexport.1 mkdir debian/tmp/usr/share/doc/tracy-import-chrome pandoc debian/tracy-import-chrome.1.rst --standalone \ --variable=header:"tracy-import-chrome User Manual" \ --variable=section:1 \ --from rst \ --to man > debian/tmp/usr/share/doc/tracy-import-chrome/tracy-import-chrome.1 mkdir debian/tmp/usr/share/doc/tracy-import-fuchsia pandoc debian/tracy-import-fuchsia.1.rst --standalone \ --variable=header:"tracy-import-fuchsia User Manual" \ --variable=section:1 \ --from rst \ --to man > debian/tmp/usr/share/doc/tracy-import-fuchsia/tracy-import-fuchsia.1