My project has a mix of cpp and c files, and I am trying to compile both of them under Android.
The problem is, my C code isn’t ANSI, and needs to be compiled with c99 standard.
In order to compile under that standard, I tried adding the following flag:
LOCAL_CFLAGS := -std=c99
In Android.mk, but unfortunately, it keeps showing a warning while compiling:
cc1plus: warning: command line option '-std=c99' is valid for C/ObjC but not for C++ [enabled by default]
How can I properly add the flag to the c sources only?
I have considered that approach earlier, but the process of compiling the source into a library seemed awfully tedious, especially since I have to compile for multiple architectures. (Not to mention the fact that I am still tweaking the C source code).
I need to resolve this issue within a week, max. If I couldn’t figure out the current problem, at least I can be assured there is a Plan B
(i.e. I’ll just use the linking approach)