I just lost a few hours on this one, so even if this is an old topic here is my solution for posterity:
TLDR: The short solution for OpenSSL:
# Directories
LOCAL_CFLAGS += \
-DOPENSSLDIR="\"/system/lib/ssl\"" \
-DENGINESDIR="\"/system/lib/ssl/engines\""
to
# Directories
LOCAL_CFLAGS += \
-DOPENSSLDIR=\\\"/system/lib/ssl\\\" \
-DENGINESDIR=\\\"/system/lib/ssl/engines\\\"
For the interested or the ones with different LOCAL_SHORT_COMMANDS problems the explanation:
LOCAL_SHORT_COMMANDS creates temp files with the commandline options for every command in the build process and feeds those files to the respective command (gcc for example). Launch the ndk-build command with V=1 (verbose mode) and you'll see the steps involved. You can also see where those files get created, so you can have a look at them if something is not working as expected. In the OpenSSL case I had a look at the obj\local\armeabi-v7a\objs\crypto_static\crypto\cversion.o.cflags file and saw that the OPENSSLDIR and ENGINESDIR defines were missing the backslash in front of the quotation mark. So the gcc command just omitted the quotation marks and the define wasn't a string anymore. The \\\" in the makefile resulted in a \" in the .cflags file, which was exactly what gcc needed.
There you have it, I hope this saves somebody my frustrations :)
Cheers