Include /usr/share/dpkg/buildflags.mk and use DPKG_EXPORT_BUILDFLAGS in debian/rules...