Remove the -pg from CFLAGS, you don't need it to build the library, and with it the generated code will be slightly slower than necessary.
If you really need to profile the code, you will need your own implementation of __gnu_mcount_nc. For more details, see
http://doc.ironwoodlabs.com/arm-arm-none-eabi/html/getting-started/arm-mcount.html https://code.google.com/p/android-ndk-profiler/wiki/HowItWorks