Version 3 (modified by 18 years ago) ( diff ) | ,
---|
The Big Picture
The make tool is called kmk and is a modified GNU make.
When invoked (without the -f
option) this will happen:
- kmk will look for
Makefile.kmk
,makefile.kmk
,GNUmakefile
,makefile
orMakefile
in that order and read the first it finds. - In the makefile there are
include
statements which in turn will causeheader.kmk
andfooter.kmk
to be loaded. header.kmk
will setup a bunch of useful variables and load the firstConfig.kmk
orconfig.kmk
file in the directory tree starting from the makefile directory and up toDEPTH
.footer.kmk
will generate make goals from the target lists and target properties defined in the makefile.- kmk will start at the default goal (
all_recursive
) and resolve all its prerequisites. - This will cause the list of passes in
DEFAULT_PASSES
to be iterated, recusing into subdirectories if configured to do so for each pass.
The Target Lists
kBuild will by default pick up and process the following target lists:
BLDPROGS
- build programs, e.g. programs that will be used later in the build process and will run on the build platform. Will by default be compiled with theBUILD_PLATFORM
as target.LIBRARIES
andIMPORT_LIBS
- object libraries.DLLS
- dynamic link libraries and shared objects.PROGRAMS
- program binaries.SYSMODS
- system modules, kernel extentions, device drivers, etc.OTHERS
- user defined targets.INSTALLS
- installation targets. This can be excluded from the default pass by addingDEFAULT_PASSES := $(filter-out INSTALLS,$(DEFAULT_PASSES))
to the relevantConfig.kmk
.PACKING
- the packing goals. These are the prerequisties for thepacking
pass.
TODO: More details.
The Target Properties
Each target has a number of properties which kBuild will look for. Some of these properties will come from the template if used, others will be picked up from the relevant tool and sdks. Which properties kBuild looks for depends on which target list the target was picked up in.
Property | Target Lists | Template Inheritance | Description |
TEMPLATE | BLDPROGS, LIBRARIES, DLLS, PROGRAMS, SYSMODS, INSTALLS | No | The property template to apply. Make sure you strip trailing tabs/spaces! |
TOOL | BLDPROGS, LIBRARIES, DLLS, PROGRAMS, SYSMODS, INSTALLS | Yes | The tool to use to build this target. |
ATOOL | BLDPROGS, LIBRARIES, DLLS, PROGRAMS, SYSMODS | Yes | The assembler tool to use to build this target or the assembly sources for this target. |
Note:
See TracWiki
for help on using the wiki.