Android JNI makefiles: where to set CFLAGS?

Phonon picture Phonon · Jun 15, 2011 · Viewed 9.1k times · Source

I'm stuck figuring out how exactly to tell Android to use VFP on Cortex-A8 for floating-point operations in my native C code. I know the compiler flags I need to set. The question is where do I do it? Can someone guide me through the process?

I'm using Eclipse. I use Cygwin to run ndk-build. My program works, so I've definitely got the procedure figured out. The question is where (in which file) do I tell Android to use VFP? The command is something like CFLAGS += -mfpu=vfp. When I insert this code into Android.mk, nothing happens.

Answer

Torid picture Torid · Jun 15, 2011

The line you need in Android.mk is LOCAL_CFLAGS += -mfpu=vfp