export DEB_CFLAGS_SET=-DDEBUG=1 dpkg-buildflags --get CFLAGS dpkg-buildpackage -uc -us
SUPPORTED FLAGS
CFLAGS Options for the C compiler. The default value set by the vendor includes -g and the default optimization level (-O2 usually, or -O0 if the
DEB_BUILD_OPTIONS environment variable defines noopt).
CPPFLAGS
Options for the C preprocessor. Default value: empty.
CXXFLAGS
Options for the C++ compiler. Same as CFLAGS.
FFLAGS Options for the Fortran compiler. Same as CFLAGS.
LDFLAGS
Options passed to the compiler when linking executables or shared objects (if the linker is called directly, then -Wl and , have to be
stripped from these options). Default value: empty.