Android: add prebuild object files

徘徊边缘 提交于 2019-12-24 09:34:06

问题


I'm building static library with ndk-4 and assembler coredumps on some of my assembly files. I used codesourcery assembler to create objects for these files. Now, I have no clue how to add these prebuild object files to the project. I tried to check inside their makefiles, but I don't see anything. I tried to add them to LOCAL_OBJECTS

    LOCAL_OBJECTS    += $(NEON_LOCAL_OBJECTS)

but it doesn't work. The value LOCAL_OBJECTS is reset to nothing inside build/core/build-binary.mk

Most likely I'd be able to avoid that problem by swithing NDK, or build workstation (I'm using windows), but for now I only want to fix that simple problem by adding preassembled objects to the static library.

If that's impossible to do, maybe somebody can say what kind of rule I could add so that after my static library is build my rule kick-in and adds my preassembled files to the target lib? Anybody?


回答1:


I have run into the same problem. After much googling I may have just stumbled onto the answer, although I haven't had the time to try it out yet. This is the Google Groups question where a similar question is posted, the poster is advised to archive the object files into a library (e.g. libfoo.a) and link that. Here is an article I found on archiving the object files into a library. Hope this is helpful.



来源:https://stackoverflow.com/questions/7587965/android-add-prebuild-object-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!