The nativesdk
class provides common
functionality for recipes that wish to build tools to run as part of
an SDK (i.e. tools that run on
SDKMACHINE
).
You can create a recipe that builds tools that run on the SDK machine a couple different ways:
Create a
nativesdk-
myrecipe
.bb
recipe that inherits the nativesdk
class.
If you use this method, you must order the inherit statement
in the recipe after all other inherit statements so that the
nativesdk
class is inherited last.
Create a nativesdk
variant
of any recipe by adding the following:
BBCLASSEXTEND
= "nativesdk"
Inside the recipe, use _class-nativesdk
and
_class-target
overrides to specify any
functionality specific to the respective SDK machine or target
case.
nativesdk-myrecipe
.bb
Not doing so can lead to subtle problems because code exists
that depends on the naming convention.
Although applied differently, the nativesdk
class
is used with both methods.
The advantage of the second method is that you do not need to have two
separate recipes (assuming you need both) for the SDK machine and the
target.
All common parts of the recipe are automatically shared.