This is needed because all build control files are parsed in a single GNU Make execution context where all variables are global.The LOCAL_MODULE variable must be defined to identify each module you describe in your In this example, the macro function 'my-dir', provided by the build system, is used to return the path of the current directory (i.e. The CLEAR_VARS variable is provided by the build system and points to a special GNU Makefile that will clear many LOCAL_XXX variables for you (e.g.
Its content is: An file must begin with the definition of the LOCAL_PATH variable.
It is used to locate source files in the development tree.
This is the list of variables you should either rely on or define in an
You can define other variables for your own usage, but the NDK build system reserves the following variable names: - names that begin with LOCAL_ (e.g.
As such, you should try to minimize the variables you declare there and do not assume that anything is not defined during parsing.
- The file syntax is designed to allow you to group your sources into 'modules'.
Note that under certain circumstances the NDK might parse your several times, each with different definition for some of these variables.
CLEAR_VARS Points to a build script that undefines nearly all LOCAL_XXX variables listed in the "Module-description" section below.
Note that you should not list header and included files here, because the build system will compute dependencies automatically for you; just list the source files that will be passed directly to a compiler, and you should be good.
Note that the default extension for C source files is '.cpp'. The BUILD_SHARED_LIBRARY is a variable provided by the build system that points to a GNU Makefile script that is in charge of collecting all the information you defined in LOCAL_XXX variables since the latest 'include $(CLEAR_VARS)' and determine what to build, and how to do it exactly.
An file is written to describe your sources to the build system.