Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
.clang-format | 06-Dec-2016 | 225 | |
.gitignore | 06-Dec-2016 | 105 | |
Android.mk | 06-Dec-2016 | 4.3K | |
AUTHORS | 06-Dec-2016 | 310 | |
CONTRIBUTORS | 06-Dec-2016 | 1K | |
examples/ | 06-Dec-2016 | ||
file_lists.mk | 06-Dec-2016 | 6.4K | |
include/ | 06-Dec-2016 | ||
libweave-test.pc.in | 06-Dec-2016 | 136 | |
libweave.pc.in | 06-Dec-2016 | 136 | |
LICENSE | 06-Dec-2016 | 1.5K | |
Makefile | 06-Dec-2016 | 2.4K | |
README.md | 06-Dec-2016 | 2.6K | |
src/ | 06-Dec-2016 | ||
tests.mk | 06-Dec-2016 | 2.2K | |
third_party/ | 06-Dec-2016 |
1 # Overview 2 3 libWeave is the library with device side implementation of Weave protocol. 4 5 # Sources 6 7 Sources are located in git repository at 8 https://weave.googlesource.com/weave/libweave/ 9 10 11 # Install Repo 12 13 Make sure you have a bin/ directory in your home directory 14 and that it is included in your path: 15 16 ``` 17 mkdir ~/bin 18 PATH=~/bin:$PATH 19 ``` 20 21 Download the Repo tool and ensure that it is executable: 22 23 ``` 24 curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 25 chmod a+x ~/bin/repo 26 ``` 27 28 # Checkout code 29 30 ``` 31 repo init -u https://weave.googlesource.com/weave/manifest 32 repo sync 33 ``` 34 35 # Directory structure 36 37 | Path | Description | 38 |--------------------------|------------------------------------| 39 | include/ | Includes to be used by device code | 40 | src/ | Implementation sources | 41 | examples/ | Example of device code | 42 | third_party/ | Dependencies | 43 | Makefile, \*.mk files | Build files | 44 45 46 # Quick start on Debian/Ubuntu 47 48 ### Install prerequisites 49 50 ``` 51 sudo apt-get update 52 sudo apt-get install \ 53 autoconf \ 54 automake \ 55 binutils \ 56 g++ \ 57 hostapd \ 58 libavahi-client-dev \ 59 libcurl4-openssl-dev \ 60 libevent-dev \ 61 libexpat1-dev \ 62 libnl-3-dev \ 63 libnl-route-3-dev \ 64 libssl-dev \ 65 libtool 66 ``` 67 68 # Prerequisites 69 70 ### Common 71 72 - autoconf 73 - automake 74 - binutils 75 - libtool 76 - libexpat1-dev 77 78 ### For tests 79 80 - cmake 81 - gtest (included; see third_party/get_gtest.sh) 82 - gmock (included; see third_party/get_gtest.sh) 83 84 ### For examples 85 86 - cmake 87 - hostapd 88 - libavahi-client-dev 89 - libcurl4-openssl-dev 90 - libevhtp (included; see third_party/get_libevhtp.sh) 91 - libevent-dev 92 93 94 # Compiling 95 96 The `make --jobs/-j` flag is encouraged, to speed up build time. For example 97 98 ``` 99 make -j 100 ``` 101 102 which happens to be the same as 103 104 ``` 105 make all -j 106 ```` 107 108 ### Build library 109 110 ``` 111 make out/Debug/libweave.so 112 ``` 113 114 ### Build examples 115 116 ``` 117 make all-examples 118 ``` 119 120 See [the examples README](/examples/daemon/README.md) for details. 121 122 # Testing 123 124 ### Run tests 125 126 ``` 127 make test 128 make export-test 129 ``` 130 131 or 132 133 ``` 134 make testall 135 ``` 136 137 # Making changes 138 139 ### Configure git 140 Make sure to have correct user in local or global config e.g.: 141 142 ``` 143 git config --local user.name "User Name" 144 git config --local user.email user.name (a] example.com 145 ``` 146 147 ### Start local branch 148 149 ``` 150 repo start <branch name> . 151 ``` 152 153 ### Edit code and commit locally e.g. 154 155 ``` 156 git commit -a -v 157 ``` 158 159 ### Upload CL 160 161 ``` 162 repo upload . 163 ``` 164 165 ### Request code review 166 167 Go to the url from the output of "repo upload" and add reviewers. 168