如何在MacOSX下使用Android NDK编译openssl Android.mk文件?
我正在尝试编译适用于 android 的开放 ssl 项目(https://github.com/fries/android-外部openssl)。
我确实从 git 下载了文件并尝试按照说明进行操作。我确实安装了最新的Android NDK。
我首先将文件安装在: /Users/myname/Documents/workspace/android-external-openssl
然后尝试使用 NDK-build 进行编译,我知道我需要一个 jni
目录。所以我确实将项目复制到另一个目录中。
新路径: /Users/myname/Documents/workspace/jni
但现在当我尝试以下命令时: /Users/myname/Documents/android-ndk-r5b/ndk-build NDK_PROJECT_PATH= /Users/myname/Documents/workspace Android.mk
我得到:“make:对‘Android.mk’无需执行任何操作。”
Android.mk 如下:
LOCAL_PATH := $(call my-dir)
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
crypto \
ssl \
apps \
))
include $(subdirs)
# static library
# =====================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=
LOCAL_C_INCLUDES:=
LOCAL_WHOLE_STATIC_LIBRARIES += libcrypto-static libssl-static
LOCAL_MODULE:= libopenssl-static
include $(BUILD_STATIC_LIBRARY)
有人可以告诉我我做错了什么吗?
同样在 README.Android 中,他们告诉执行此命令: 运行./Configure linux-generic32 no-idea no-bf no-cast no-seed no-md2 -DL_ENDIAN
在 openssl 分发目录中。
当我执行此操作时,没有任何反应,并且收到错误 ./Configure
是未知命令...
请帮助! :))
Im trying to compile the open ssl project for android (https://github.com/fries/android-external-openssl).
I did download the files from git and tried to follow instructionq. I did installed the latest Android NDK.
I first installed the files in : /Users/myname/Documents/workspace/android-external-openssl
Then trying to compile with NDK-build i understand that I need a jni
directory. So I did copy the project in another directory.
New path : /Users/myname/Documents/workspace/jni
But now when I try the following command : /Users/myname/Documents/android-ndk-r5b/ndk-build NDK_PROJECT_PATH=/Users/myname/Documents/workspace Android.mk
I get : "make: Nothing to be done for `Android.mk'."
The Android.mk is as follow :
LOCAL_PATH := $(call my-dir)
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
crypto \
ssl \
apps \
))
include $(subdirs)
# static library
# =====================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=
LOCAL_C_INCLUDES:=
LOCAL_WHOLE_STATIC_LIBRARIES += libcrypto-static libssl-static
LOCAL_MODULE:= libopenssl-static
include $(BUILD_STATIC_LIBRARY)
Can someone tell me what Im doing wrong ?
Also in the README.Android they telling to do this command :
Run ./Configure linux-generic32 no-idea no-bf no-cast no-seed no-md2 -DL_ENDIAN
in the openssl distribution directory.
When I do this nothing happen and I get error that ./Configure
is unknown command...
Pleae HELP ! :))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定为什么会出现错误,
我建议使用我为我的项目编译的 this (移植为独立的 NDK),
进行编译对于 Android 来说很简单:
Not sure why you get the errors,
I would suggest using this one (ported for standalone NDK) which I compiled for my project,
To compiling for Android is as simple as :