Probably, your photon.mk
looks like
...
ifdef DEBUG
include debug_android_armeabi.mk
else
include release_android_armeabi.mk
endif
...
This way you can simply use
ndk-build DEBUG=1
If you want to lean on the ndk
official features for release/debug build, you may prefer
...
ifeq ($(APP_OPTIM),debug)
include debug_android_armeabi.mk
else
include release_android_armeabi.mk
endif
...