使用 ./configure 为 Android 生成 config.h 时要使用什么主机和目标?

发布于 2024-12-27 01:18:43 字数 1270 浏览 1 评论 0原文

我目前正在使用 Windows 7 x64 PC 构建 Android NDK 项目。我正在编译 Tremor Ogg/Vorbis 解码器(并尝试 SoundTouchRubberBand/FFTW3) 嵌入到 Visual Studio 项目中vs-android。我所做的是使用 Cygwin 生成 config.h 文件,一切似乎都工作正常。 但是,我想确保我传入的标志尽可能兼容和最佳。

我了解 构建主机和目标之间的差异 标志,但我不确定要传入哪些字符串。主机和目标应该采用完全相同的字符串吗?

我在网上发现了一些不同的命令行示例,但没有解释他们的差异:

--host=arm --target=arm-android-linux-uclibcgnueabi

--host=arm-android-linux --target=arm-android-linux

-–target=arm-eabi

--target=arm-linux-androideabi --host=arm-linux-androideabi

arm-linux-androideabi-4.4.3 (used in vs-android)
--target=arm-androideabi4.4.3-linux -- host=target=arm-androideabi4.4.3-linux

我还可以选择使用 ./autogen.sh./configure,它们会生成具有不同选项的 config.h...

I'm currently using a Windows 7 x64 PC to build an NDK project for Android. I'm compiling the Tremor Ogg/Vorbis decoder (and trying out SoundTouch and RubberBand/FFTW3) embedded into a Visual Studio project with vs-android. What I've done is to generate the config.h file with Cygwin and everything seems to be working fine. But, I want to make sure the flags I'm passing in are as compatible and optimal as possible.

I understand a bit the differences between the build host and target flags, but I'm not sure exactly which strings to pass in. Should host and target take exactly the same strings?

I've found a few different examples of command lines around the net, but with no explanation of their differences:

--host=arm --target=arm-android-linux-uclibcgnueabi

--host=arm-android-linux --target=arm-android-linux

-–target=arm-eabi

--target=arm-linux-androideabi --host=arm-linux-androideabi

arm-linux-androideabi-4.4.3 (used in vs-android)
--target=arm-androideabi4.4.3-linux -- host=target=arm-androideabi4.4.3-linux

I also have the option of using ./autogen.sh or ./configure, which generate a config.h with different options...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短叹 2025-01-03 01:18:44

Tremor 不使用 config.h 文件。所以不需要运行./configure来进行颤抖。只需将所需的 .c 文件包含在 Android.mk 文件中即可。

看看谷歌是如何在 Android 源代码中编译 Tremor 的。以下是包含 Android.mk 文件的 git 存储库的链接:https://android.googlesource。 com/platform/external/tremor.git

顺便说一句,在你的 博客文章< /a> 您写道 Tremor 拥有 LGPL 许可证。那是错误的。 Tremor 拥有类似 BSD 的许可证。 BSD 的条款比 LGPL 宽松得多。 LGPL 基本上要么要求您将库链接为共享,要么将所有项目置于 LGPL 下。使用 BSD,您可以以静态方式链接到库并完成。

实际上,ARM 上有比 tremor 更快的 vorbis 解码器库。它被称为tremolo。它的最新版本也是类似 BSD 的,并且确实比 tremor 运行得更快。

Tremor doesn't use config.h file. So there is no need to run ./configure for tremor. Just include needed .c files in your Android.mk file and you are done.

Take look how google does compiling of Tremor in Android sources. Here's a link to git repository that includes Android.mk file: https://android.googlesource.com/platform/external/tremor.git

Btw, in your blog post you wrote that Tremor has LGPL license. That is wrong. Tremor has BSD-like license. BSD is much more relaxed terms than LGPL. LGPL basically either requires you to link library as shared, or to make all your project under LGPL. With BSD you can link to library as static and be done.

And actually there is more faster vorbis decoder library than tremor for ARM. It's called tremolo. It's latest version is also BSD-like and it really works faster than tremor.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文