This will build all targets (the shared library, executables, tests, etc) and
put them in out/Default. To build an individual target, replace “all” with the
target of your choice, e.g. ninja -C out/Default net_test_osi.
Run
cd ~/fluoride/bt/out/Default
LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
Eclipse IDE Support
Follows the Chromium project
Eclipse Setup Instructions
until “Optional: Building inside Eclipse” section (don’t do that section, we
will set it up differently)
Generate Eclipse settings:
cd system/bt
gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML
location under system/bt/out/Default
Right click on the project. Go to Preferences->C/C++ Build->Builder Settings.
Uncheck “Use default build command”, but instead using “ninja -C out/Default”
Goto Behaviour tab, change clean command to “-t clean”
Fluoride Bluetooth stack
Building and running on AOSP
Just build AOSP - Fluoride is there by default.
Building and running on Linux
Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang 3.8.0
Download source
Install dependencies (require sudo access):
Then fetch third party dependencies:
And third party dependencies of third party dependencies:
NOTE: If system/bt is checked out under AOSP, then create symbolic links instead of downloading sources
Generate your build files
Build
This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace “all” with the target of your choice, e.g.
ninja -C out/Default net_test_osi.Run
Eclipse IDE Support
Follows the Chromium project Eclipse Setup Instructions until “Optional: Building inside Eclipse” section (don’t do that section, we will set it up differently)
Generate Eclipse settings:
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML location under system/bt/out/Default
Right click on the project. Go to Preferences->C/C++ Build->Builder Settings. Uncheck “Use default build command”, but instead using “ninja -C out/Default”
Goto Behaviour tab, change clean command to “-t clean”