I looked at Makefiles and can see instruction

# WARNING: do not add mode=debug or mode=release anymore in the Makefile,
# use make mode=debug all instead. By default Kamailio is compiled with
# debugging symbols in all cases (-g) and without optimization (-O0).


https://github.com/kamailio/kamailio/blob/master/src/Makefile.defs#L749-L751

I do not understand how properly build Kamailio with disabled optimization.
Could you let me know how to use "mode=debug"?

Sergey