Build System Base Module


Overview

The Build System Base Module provides the build system with basic macros and system information that should be sufficient for bootstrapping other build system modules. This information can also be used by build system users to make platform adjustments in their build targets.

Macros and Controls

BS_ROOT
This macro MUST be set in every Makefile, and indicates the location of the build system directory, typically "build3".

COMPONENT_ROOT
This macro MUST be set in every Makefile, and indicates the root location of the source tree of the component using the build system.

BS_VERBOSE
This macro controls the verbosity of make. "0" is the least verbose, "1" is more verbose, etc.

BS_VTAG
This macro can be set by products to tag a build with a variant name. Different build variants will have their build targets put into different target directories, allowing a single build tree to simultaniously maintain debug and optimized builds, build with different compiler settings, etc.

BS_ROOT_TARGET_DIR
This macro is set by the build system and indicates the relative path to the root target dir.

BS_ARCH_TARGET_DIR
DEPRECATED: use the BS_FUNC_GEN_TARGET_DIRfunction.
This macro is set by the build system and indicates the relative path to the architecture specific target directory.

BS_NOARCH_TARGET_DIR
DEPRECATED: use the BS_FUNC_GEN_TARGET_DIRfunction.
This macro is set by the build system and indicates the relative path to the architecture neutral target directory.


Targets


Functions


base_targetdirs

base_targetdirs Overview

Simple target create dirs for targets created by other build rules. The base_targetdirs target will be built during the "pretarget" phase of a build, and can be built in isolation by requesting the base_targetdirs target.

base_nuke

base_nuke Overview

Simple target to remove target dirs created base_targetdirs. The base_nuke target will be built during the "nuke" phase of a build, and can be built in isolation by requesting the base_nuke target. The "nuke" build phase capabilities provided by the base module should be addaquate for for most modules, freeing module writers from having to provide their own commands for the "nuke" build phase.

base_info

base_info Overview

Simple target to display information about the macro settings of all global macros used by the base module of the build system. The base_info target will be built during the "info" phase of a build, and can be built in isolation by requesting the base_info target.

base_man

base_man Overview

Simple target to display usage information and help pertaining to the base module of the build system. The base_man target will be built during the "man" phase of a build, and can be built in isolation by requesting the base_man target.

BS_FUNC_GEN_TARGET_DIR(<platform>)

This function will return the architecture appropriate target directory for products of the make process. This fuction takes one argument, which is the name of the platform in question. Suitable values for this argument may be constructed with
BS_FUNC_GEN_PLATFORM_FULL, or taken from global build host system defaults BS_PLATFORM_ARCH_FULL or BS_PLATFORM_NOARCH.

BS_FUNC_GEN_PLATFORM_FULL( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the most canonical form of the platform name string.

BS_FUNC_GEN_PLATFORM_FALLBACK1( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the first fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK2( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the second fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK3( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the third fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK4( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the fourth fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK5( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the fifth fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK6( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the sixth fallback value.

BS_FUNC_GEN_PLATFORM_FALLBACK7( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the seventh fallback value.

BS_FUNC_GEN_PLATFORM_LEGACYFALLBACK1( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the first legacy fallback value.

BS_FUNC_GEN_PLATFORM_LEGACYFALLBACK2( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the second legacy fallback value.

BS_FUNC_GEN_PLATFORM_LEGACYFALLBACK3( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the third legacy fallback value.

BS_FUNC_GEN_PLATFORM_LEGACYFALLBACK4( <OS name>, <OS major>, <OS minor>, <OS patch>, <machine instruciton set>, <machine type>, <runtime name>, <runtime major>, <runtime minor>, <runtime patch>)

This function will generate a normalized platform name string from the various elements that are used to identify the operating system, runtime environments, and hardware architecture. The version of the platform name string generated by this function is the fourth legacy fallback value.

Example Makefile


# The source root of this component
COMPONENT_ROOT=../..

# The root of the build system
BS_ROOT=$(COMPONENT_ROOT)/../build3

# Boostrap Build system definitions.
include $(BS_ROOT)/defines.mk


#
# Base module provides no pattern targets, so no
# additional macros need be specified in Makefiles.
#


# Finally, include the rules to make the build system go.
include $(BS_ROOT)/rules.mk