Definition files are used as input to the Build Tools mksys, mkapp, mkexe, and mkcomp (known collectively as the mk tools).
All def files use a Common File Format.
These definition files, together with Language-Independent APIs, make it easier to develop component-based software and allows a great deal of boiler-plate code to be automatically generated.
Interfaces are defined using .api files. Implementations of those interfaces are constructed as reusable components. Components can be combined into applications. Apps can be installed and run on target devices. Apps can also be integrated into systems of inter-communicating applications deployed together to target devices in a single step.
Component definition .cdef files are used to define the external interfaces and internal content of reusable software components.
Each component has a single Component.cdef file, which defines:
Application definition .adef files are used to define the external interfaces and internal content of applications that can be built, installed, and run on target devices.
.adef files can also be used to override some settings of components without having to change those components themselves, thereby making the components more reusable.
Each application has a .adef file, which defines:
System definition .sdef files are used to interconnect applications with each other and with the target's runtime environment (e.g., hardware devices).
.sdef files can also override some app settings eliminating actually changing the apps.
A .sdef file defines a system of one or more applications that can be deployed to target devices in the field. Each .sdef file lists:
Integers are required in some sections.
Numbers can be expressed in Kilobytes (bytes x 1024) by adding the 'K' suffix.
Two are used:
The default search path ā.ā is the current working directory where the build tool ran.
Search paths can be changed through mk tools command-line options:
Settings in a .sdef file override settings from both the .adef and Component.cdef, while the .adef overrides settings in the Component.cdef. This increases reusability by allowing an integrator to override a component's or app's settings without having to change that component or app.
Also, most configuration settings can be overridden on the target device at runtime (although, some will not take effect until the application is restarted).
It is possible to use environment variables inside of .sdef, .adef, and Component.cdef files.
This is done in the same way as in shell scripts, by prefixing the environment variable name with a dollar sign ($).
If necessary, the variable name can also be enclosed in curly braces.
Some useful environment variables:
LEGATO_ROOT = path to where the Legato framework sources are locatedTARGET = build target (e.g., ar7, wp7, localhost)LEGATO_BUILD = shorthand for $LEGATO_ROOT/build/$TARGETCopyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.