4

In my jni directory, I run the following command:

$ ./libvpx/configure --target=armv7-android-gcc --disable-examples --sdk-path=/home/peter/adt/android-ndk-r9/

This results in generating Android.mk in libvpx/build/make directory

Next, I create Android.mk in jni directory:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include libvpx/build/make/Android.mk

When I run ndk-build, it ends up creating libvpx.so.

However, I would really like to create a static library.

I started all over and ran the configuration with an extra flag:

$ ./libvpx/configure --target=armv7-android-gcc --disable-examples --sdk-path=/home/peter/adt/android-ndk-r9/ --enable-static

However, running ndk-build still results in creating libvpx.so.

Does any know how I can configure libvpx to create a static library? Thank you in advance for your help.

Zong
  • 6,160
  • 5
  • 32
  • 46
Peter
  • 11,260
  • 14
  • 78
  • 155

1 Answers1

1

I was able to successfully build an arm static library, though I have not yet integrated it with an Android application as I am building libvpx as a component for another native library.

Note that in my case the Android.mk already existed in the directory tree and was unaffected by the configure script, which is apparently contrary to your experience. To build the static library I simply invoked configure and then make:

$ make clean
$ ./configure --target=armv7-android-gcc --disable-examples --sdk-path=/home/me/android-ndk-r9b/
$ make

In my case I had to do a clean build because I had some cruft left from an earlier build attempt that would break the build otherwise.

The result is libvpx.a and libvpx_g.a.

user650881
  • 2,214
  • 19
  • 31