主题 : 一定要執行 ./build-android 來全部編譯嗎? 能不能只有編譯 bluez 就好?(產生我要的 bluetoothd) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 37502
精华: 0
发帖: 48
金钱: 240 两
威望: 48 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2011-02-11
最后登录: 2011-09-06
楼主  发表于: 2011-03-25 18:59

 一定要執行 ./build-android 來全部編譯嗎? 能不能只有編譯 bluez 就好?(產生我要的 bluetoothd)

各位好,

    我想請問一個關於 android 編輯單一程式的問題,在 Android-2.2/external/bluetooth/bluez 目錄之中,是 BlueZ 的源碼,我對這個源碼進行修改。增加 BlueZ 沒有提供的 Bluetooth profiles , 我想請問,我一定要執行 ./build-android 來編譯全部的模組嗎?    我能不能單純只有編譯 bluez 就好?(產生我要的 bluetoothd ) ...    

   可否請問該要如何做呢?


謝謝您。
级别: 荣誉会员
UID: 34761
精华: 0
发帖: 1348
金钱: 6835 两
威望: 1367 点
贡献值: 0 点
综合积分: 2696 分
注册时间: 2010-12-21
最后登录: 2017-06-02
1楼  发表于: 2011-03-25 20:06
在ANDROID根目录执行
. setenv

再到bluetoothd的目录执行
mmm ./
级别: 新手上路
UID: 37502
精华: 0
发帖: 48
金钱: 240 两
威望: 48 点
贡献值: 0 点
综合积分: 96 分
注册时间: 2011-02-11
最后登录: 2011-09-06
2楼  发表于: 2011-03-30 11:41
引用第1楼hacker于2011-03-25 20:06发表的  :
在ANDROID根目录执行
. setenv

再到bluetoothd的目录执行
mmm ./


謝謝您的指點,我看了一下 setenv

會執行 build/envsetup.sh

這個 sh  會加入一些 function :

e ". build/envsetup.sh" from your shell to add the following functions to your environment:
- croot:   Changes directory to the top of the tree.
- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory.
- mmm:     Builds all of the modules in the supplied directories.
- cgrep:   Greps on all local C/C++ files.
- jgrep:   Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir:   Go to the directory containing a file.

function mmm()
{
    T=$(gettop)
    if [ "$T" ]; then
        local MAKEFILE=
        local ARGS=
        local DIR TO_CHOP
        local DASH_ARGS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')


...

目前我的 root fs 還在編譯中,還沒有完成。因為我使用 VMWare, 所以比較慢。稍晚我在試試看您的方法。看看能不能成功。

謝謝您。
级别: 荣誉会员
UID: 34761
精华: 0
发帖: 1348
金钱: 6835 两
威望: 1367 点
贡献值: 0 点
综合积分: 2696 分
注册时间: 2010-12-21
最后登录: 2017-06-02
3楼  发表于: 2011-03-30 11:50
可以用 mm 和 mmm 编译单个模块,但并不是所有模块都可以单独编译的,
一般app和lib通常都可以单独编译,但一些公共的库就不行。