waf: format README into GFM

Use GitHub Flavored Markdown for README.
This commit is contained in:
Gustavo Jose de Sousa 2016-01-27 17:05:46 +00:00 committed by Lucas De Marchi
parent 14947da5e5
commit a06359c0c6

View File

@ -1,39 +1,52 @@
# WAF Build #
To keep access to waf convenient, use the following alias from the To keep access to waf convenient, use the following alias from the
root ardupilot directory: root ardupilot directory:
```bash
alias waf="$PWD/modules/waf/waf-light" alias waf="$PWD/modules/waf/waf-light"
```
Waf should always be called from the ardupilot's root. Waf should always be called from the ardupilot's root.
Differently from the make-based build, with waf there's a configure step Differently from the make-based build, with waf there's a configure step
to choose the board to be used to choose the board to be used
```bash
# Configure the Linux board. # Configure the Linux board.
waf configure --board=linux waf configure --board=linux
```
by default the board used is 'sitl'. by default the board used is `sitl`.
To build, use the 'waf build' command. This is the default command, so To build, use the 'waf build' command. This is the default command, so
calling just 'waf' is enough calling just `waf` is enough
```bash
# From the root ardupilot directory, build everything. # From the root ardupilot directory, build everything.
waf waf
# Waf also accepts '-j' option to parallelize the build. # Waf also accepts '-j' option to parallelize the build.
waf -j8 waf -j8
```
It's possible to build for just a vehicle or an example by specifying it as the It's possible to build for just a vehicle or an example by specifying it as the
target: target:
```bash
# From the top directory # From the top directory
waf --targets bin/ArduCopter waf --targets bin/ArduCopter
# List all the targets available # List all the targets available
waf list waf list
```
There are also shortcuts for vehicle builds, for example: There are also shortcuts for vehicle builds, for example:
```bash
# Shortcut for waf --targets bin/ArduCopter # Shortcut for waf --targets bin/ArduCopter
waf copter waf copter
```
By default all the files produced by the build will be inside the build/ By default all the files produced by the build will be inside the build/
subdirectory. The binaries will also be there, with the name identifying subdirectory. The binaries will also be there, with the name identifying
@ -41,16 +54,18 @@ the target board.
To clean things up use To clean things up use
```bash
# Clean the build products, but keep configure information # Clean the build products, but keep configure information
waf clean waf clean
# Clean everything, will need to call configure again # Clean everything, will need to call configure again
waf distclean waf distclean
```
using git to clean the files also work fine. using git to clean the files also work fine.
There's also a make wrapper called "Makefile.waf". You can use There's also a make wrapper called `Makefile.waf`. You can use
`make -f Makefile.waf help` for instructions on how to use it. `make -f Makefile.waf help` for instructions on how to use it.
TODO: Add explanation on how the build system is organized once we *TODO: Add explanation on how the build system is organized once we
settle down. settle down.*