PREBUILT_STATIC_LIBRARY and multiple ABI

classic Classic list List threaded Threaded
2 messages Options
pps
Reply | Threaded
Open this post in threaded view
|

PREBUILT_STATIC_LIBRARY and multiple ABI

pps
I build my project for multiple ABI, now also for android-x86 for Intel phones. I use prebuilt static and dynamic libs.

So, I have my libAAA.so build by this make file:

nclude $(CLEAR_VARS)
LOCAL_MODULE := AAA

LOCAL_SRC_FILES := AAA.cpp
include Android-BBB.mk
LOCAL_STATIC_LIBRARIES
:= BBB include $(BUILD_SHARED_LIBRARY)


Here's Android-BBB.mk (static prebuilt):
include $(CLEAR_VARS)
LOCAL_MODULE := BBB
LOCAL_SRC_FILES := libBBB.a
include $(PREBUILT_STATIC_LIBRARY)


All of this works well as long as all the libs are armeabi. Now I need to add x86 to the mix. How do I do it properly? If I specify
APP_ABI := armeabi x86 in Application.mk I expect that correct prebuilts will be selected for arm and x86 builts.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/5KI3ggFPCZEJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: PREBUILT_STATIC_LIBRARY and multiple ABI

Bruce J Beare
That's just not going to work. I don't see how it worked for ARM at all.
You can't include a Android-BBB.mk like that... particularly when it calls clear and you are doing a build.

You can get away with:

Android:mk
  include Android-AAA.mk
  include Android-BBB.mk



Android-AAA.mk
include $(CLEAR_VARS)
LOCAL_MODULE := AAA
LOCAL_SRC_FILES := AAA.cpp
LOCAL_STATIC_LIBRARIES
:= BBB include $(BUILD_SHARED_LIBRARY)

Android-BBB.mk
include $(CLEAR_VARS)
LOCAL_MODULE := BBB
LOCAL_SRC_FILES := libBBB.a
include $(PREBUILT_STATIC_LIBRARY)


Still... I don't see why you would want to put these in separate files... rather than having both rules in Android.mk


On Sunday, January 6, 2013 4:54:08 PM UTC-8, pps wrote:
I build my project for multiple ABI, now also for android-x86 for Intel phones. I use prebuilt static and dynamic libs.

So, I have my libAAA.so build by this make file:

nclude $(CLEAR_VARS)
LOCAL_MODULE := AAA

LOCAL_SRC_FILES := AAA.cpp
include Android-BBB.mk
LOCAL_STATIC_LIBRARIES
:= BBB include $(BUILD_SHARED_LIBRARY)


Here's Android-BBB.mk (static prebuilt):
include $(CLEAR_VARS)
LOCAL_MODULE := BBB
LOCAL_SRC_FILES := libBBB.a
include $(PREBUILT_STATIC_LIBRARY)


All of this works well as long as all the libs are armeabi. Now I need to add x86 to the mix. How do I do it properly? If I specify
APP_ABI := armeabi x86 in Application.mk I expect that correct prebuilts will be selected for arm and x86 builts.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/PLQ1MZ4lV2YJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.