forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds enhanced autotools build system used by openthread and openweave projects: * Package management: 'make dist' and 'make distcheck' * Cross-platform handling: (Linux, Darwin, iOS, Android, embedded arm, etc.) * Multiple compiler support: clang, GCC * Integrates automated testing framework: 'make check' * Code style enforcement: 'make pretty' and 'make pretty-check' integration with clang-format
- Loading branch information
Showing
151 changed files
with
33,841 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,96 @@ | ||
## Build Documentation | ||
|
||
Currently using simple GNU makefiles on Linux or MacOS (Tested on MacOS and Ubuntu 18.04). | ||
The CHIP build system uses GNU autotools and helper makefiles to build | ||
various platform images on Linux or MacOS. | ||
|
||
Run: | ||
Tested on: | ||
- MacOS | ||
- Ubuntu 18.04 | ||
|
||
``` | ||
$ make all | ||
``` | ||
|
||
Assuming you have all the required tools installed, this will tidy, format, and run code | ||
coverage on the entire tree. Tests are built into the make system. | ||
Build system features: | ||
- Package management: 'make dist' and 'make distcheck' | ||
- Cross-platform handling: (Linux, Darwin, iOS, Android, embedded arm, etc.) | ||
- Multiple compiler support: clang, GCC | ||
- Integrates automated testing framework: 'make check' | ||
- Code style enforcement: 'make pretty' and 'make pretty-check' integration with clang-format | ||
|
||
Assuming you have all the required tools installed, the system will build the code, | ||
build a distribution, tidy, format, run tests, and run code coverage on the entire tree. | ||
Tests are built into the make system. | ||
|
||
|
||
### Tool Prerequisites | ||
|
||
To take advantage of all the current capabilities of the make system, you'll want: | ||
|
||
* Bash 4.0 or greater | ||
* GNU make | ||
* GNU automake | ||
* C and C++ compilers | ||
* clang-tidy | ||
* clang-format | ||
* gcov | ||
|
||
### Autotools Build Preparation | ||
|
||
``` | ||
# Initial preparation | ||
git clean -fdx | ||
./bootstrap | ||
make -f Makefile-Standalone | ||
``` | ||
|
||
### Build Standalone (Native Linux or MacOS) | ||
|
||
``` | ||
make -f Makefile-Standalone | ||
``` | ||
|
||
### Build Custom configuration | ||
|
||
``` | ||
# From top of clean tree | ||
./bootstrap | ||
mkdir out | ||
cd out | ||
../configure | ||
# Build libraries | ||
make | ||
# Build distribution | ||
make dist | ||
# Build and check distribution | ||
make distcheck | ||
# Run tests | ||
make check | ||
# Verify coding style conformance | ||
make pretty-check | ||
``` | ||
|
||
### Build iOS | ||
|
||
Install XCode and XQuarz. | ||
|
||
``` | ||
make -f Makefile-iOS | ||
``` | ||
|
||
### Build Android | ||
|
||
Install Android Studio, Java, and NDK. | ||
|
||
``` | ||
# Update these paths based on your environment and version of the tools (MacOS examples): | ||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home | ||
export ANDROID_HOME=~/Library/Android/sdk | ||
export ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/21.0.6113669 | ||
make -f Makefile-Android | ||
``` |
Oops, something went wrong.