Issue
My Application.mk is set to build arm as well as x86 shared libraries:
APP_ABI :- armeabi-v7a x86
I have prebuilt openssl static libraries:
libcrypto_v7a.a
libcrypto_x86.a
libssl_v7a.a
libssl_x86.a
These files have been copied to jni/inc directory:
Would appreciate your help in setting up Android.mk such that it picks up proper library to link with:
LOCAL_LDLIBS := -llog -L$(LOCAL_PATH)/inc/ -lcrypto_v7a -lssl_v7a
or
LOCAL_LDLIBS := -llog -L$(LOCAL_PATH)/inc/ -lcrypto_x86 -lssl_x86
Perhaps there is a $(ARCH) kind of variable defined that I could use to my advantage:
LOCAL_LDLIBS := -llog -L$(LOCAL_PATH)/inc/ -lcrypto_$(ARCH) -lssl_$(ARCH)
Solution
What about using ifeq
and TARGET_ARCH
?
LOCAL_LDLIBS := -llog -L$(LOCAL_PATH)/inc/
ifeq ($(TARGET_ARCH),arm)
LOCAL_LDLIBS += -lcrypto_v7a -lssl_v7a
else
ifeq ($(TARGET_ARCH),x86)
LOCAL_LDLIBS += -lcrypto_x86 -lssl_x86
endif
endif
Answered By - auselen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.