diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 53 |
1 files changed, 46 insertions, 7 deletions
@@ -18,7 +18,8 @@ mkdir ~/bin PATH=~/bin:$PATH ``` -Download the Repo tool and ensure that it is executable: +Download the [Repo tool](https://gerrit.googlesource.com/git-repo) and ensure +that it is executable: ``` curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo @@ -28,11 +29,15 @@ chmod a+x ~/bin/repo # Checkout code ``` +mkdir ~/weave +cd ~/weave repo init -u https://weave.googlesource.com/weave/manifest repo sync ``` -# Directory structure +This checks out libweave and its dependencies into the ~/weave directory. + +# libweave Directory structure | Path | Description | |--------------------------|------------------------------------| @@ -78,8 +83,8 @@ sudo apt-get install \ ### For tests - cmake - - gtest (included; see third_party/get_gtest.sh) - - gmock (included; see third_party/get_gtest.sh) + - gtest (included; see third_party/googletest/googletest/) + - gmock (included; see third_party/googletest/googlemock/) ### For examples @@ -87,12 +92,14 @@ sudo apt-get install \ - hostapd - libavahi-client-dev - libcurl4-openssl-dev - - libevhtp (included; see third_party/get_libevhtp.sh) + - libevhtp (included; see third_party/libevhtp/) - libevent-dev # Compiling +From the `libweave` directory: + The `make --jobs/-j` flag is encouraged, to speed up build time. For example ``` @@ -103,7 +110,7 @@ which happens to be the same as ``` make all -j -```` +``` ### Build library @@ -119,6 +126,24 @@ make all-examples See [the examples README](/examples/daemon/README.md) for details. +### Cross-compiling + +The build supports transparently downloading & using a few cross-compilers. +Just add `cross-<arch>` to the command line in addition to the target you +want to actually build. + +This will cross-compile for an armv7 (hard float) target: + +``` +make cross-arm all-libs +``` + +This will cross-compile for a mips (little endian) target: + +``` +make cross-mipsel all-libs +``` + # Testing ### Run tests @@ -134,8 +159,22 @@ or make testall ``` +### Cross-testing + +The build supports using qemu to run non-native tests. + +This will run armv7 tests through qemu: + +``` +make cross-arm testall +``` + # Making changes +The [Android Developing site](https://source.android.com/source/developing.html) +has a lot of good tips for working with git and repo in general. The tips below +are meant as a quick cheat sheet rather than diving deep into relevant topics. + ### Configure git Make sure to have correct user in local or global config e.g.: @@ -164,4 +203,4 @@ repo upload . ### Request code review -Go to the url from the output of "repo upload" and add reviewers. +Go to the url from the output of `repo upload` and add reviewers. |