Build System Alien Code Module


Overview

The alien code module provides the build system the ability to incoporate foreign build systems in a somewhat seamless fashion into the native build environment. The primary intend is to deal with modules/code that is also part of a 'alien' project. A good example of that is all kernel related work. Kernel modules are better of getting build in their native build environments.

Macros and Controls

XXX Not yet doc'ed

Targets


ALIEN_TARGETS

ALIEN_TARGETS Overview

ALIEN_TARGETS is the alien code pattern target. This pattern target is used to produce object/executable code from alien project code. ALIEN_TARGETS patten targets will be built during the "target" phase of a build.
<alien> <alien flags> -o <alien target> <alien source>

The <lex flags> used to build the source code file are assembled from the following macros in the indicated order:

FLAGS_ALIEN

ALIEN_TARGETS Options

<lex target>_ALIEN
Override the default lex binary for the current target.

<lex target>_ALIENFLAGS
Override FLAGS_ALIEN for the current <lex target>.

<lex target>_DEP
Specify additional dependancies for the current <lex target>.

<lex target>_SRC
Override the default source file location of <lex target:%.yy.c=%.l>


codegen_lex

codegen_lex Overview

Simple target to trigger the building of ALIEN_TARGETS pattern targets independent of the main build "pretarget" phase.

codegen_info

codegen_info Overview

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

codegen_man

codegen_man Overview

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

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

#
# Set up global C flags for Alien Code compilation
#

FLAGS_CC+=-I$(BS_ARCH_TARGET_DIR)

# Generate src code from lex code.
ALIEN_TARGETS=foo.yy.o

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