Use app-templates: Minor grammar fix and spacing updates.
[apps/app-templates.git] / docs / dev_guide / 5_autobuild.md
1 # Autobuild script usage
2
3 ## Generation
4
5 To be integrated in the Yocto build workflow you have to generate `autobuild`
6 scripts using _autobuild_ target.
7
8 To generate those scripts proceeds:
9
10 ```bash
11 mkdir -p build
12 cd build
13 cmake .. && make autobuild
14 ```
15
16 You should see _conf.d/autobuild/agl/autobuild_ file now.
17
18 ## Available targets
19
20 Here are the available targets available from _autobuild_ scripts:
21
22 - **clean** : clean build directory from object file and targets results.
23 - **distclean** : delete build directory
24 - **configure** : generate project Makefile from CMakeLists.txt files.
25 - **build** : compile all project targets.
26 - **package** : build and output a wgt package.
27
28 You can specify variables that modify the behavior of compilation using
29 the following variables:
30
31 - **CONFIGURE_ARGS** : Variable used at **configure** time.
32 - **BUILD_ARGS** : Variable used at **build** time.
33 - **DEST** : Directory where to output ***wgt*** file.
34
35 Variable as to be in CMake format. (ie: BUILD_ARGS="-DC_FLAGS='-g -O2'")
36
37 Usage example:
38
39 ```bash
40 ./conf.d/autobuild/wgt/autobuild package DEST=/tmp
41 ```