Monday, April 25, 2011

override system ld dirs

在mydroid build時
有時會需要link device上的library
(這方法有待商確 畢竟在compile時還是用AOSP上的header file 但至少目前出來的binary可以在device上link)
而需要改變-L的location, 不要讓他去link device的system/lib

在看了android build system裡的code之後
發現可以使用 TARGET_GLOBAL_LD_DIRS 這個var
也就是在自己的Android.mk裡
最後加上下面這行override掉他

TARGET_GLOBAL_LD_DIRS:=-L$(path to the device library)

No comments: