#!/usr/bin/make -f include /usr/share/dpkg/buildtools.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all LIBNAME := liblodepng0.1 SONAME := liblodepng.so.0.1 %: dh $@ override_dh_auto_clean: dh_auto_clean rm -rf $(SONAME) liblodepng.so pngdetail override_dh_auto_configure: override_dh_auto_build: $(CXX) -o $(SONAME) -shared -fPIC -rdynamic lodepng.cpp \ $(shell dpkg-buildflags --get CXXFLAGS) \ $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get LDFLAGS) \ -Wl,-soname,$(SONAME) ln -s $(SONAME) liblodepng.so $(CXX) -o pngdetail -fPIE pngdetail.cpp lodepng_util.cpp $(SONAME) \ $(shell dpkg-buildflags --get CXXFLAGS) \ $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get LDFLAGS) override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) $(MAKE) unittest ./unittest endif override_dh_auto_install: install -Dm0755 -t debian/liblodepng-dev/usr/include lodepng.h mkdir -p debian/liblodepng-dev/usr/lib/$(shell dpkg-architecture -q DEB_HOST_MULTIARCH)/ cp -av liblodepng.so debian/liblodepng-dev/usr/lib/$(shell dpkg-architecture -q DEB_HOST_MULTIARCH)/ install -Dm0755 -t debian/$(LIBNAME)/usr/lib/$(shell dpkg-architecture -q DEB_HOST_MULTIARCH) $(SONAME) install -Dm0755 -t debian/lodepng-utils/usr/bin pngdetail