The make environment is defined by a file containing variable definitions and rules. This file provides the rules for compiling C, C++, and assembly language. The rules are specific to your compiler - the name of the file indicates the compiler used. For example, when using the gcc compiler, the make environment file is named tgt-make/gcc-devsys.mk. This file contains the variables and rules required for building the component. The following variables are defined:
CFLAGS and CXXFLAGS specify the compilation options for C and C++ files, respectively. The compilation options are shown in Table 6-1.
Table 6-1 Compilation OptionsOption | Possible Settings | Default Setting |
---|---|---|
WARN | $(WARN_ON), $(WARN_OFF) | $(WARN_ON) |
DEBUG | $(DEBUG_ON), $(DEBUG_OFF) | $(DEBUG_OFF) |
PROF | $(PROF_ON), $(PROF_OFF) | $(PROF_OFF) |
OPT | $(OPT_ON), $(OPT_OFF) | $(OPT_ON) |
INCLUDES and DEFINES specify include and depend values. These variables can be replaced by different variables (overloaded) at the application level. The variables are contained in the CPPFLAGS flag, which is used in compilation and in computing dependencies. Both INCLUDES and DEFINES can be initialized at the application level.
LD_UCRT0, LD_SCRT0, LD_DCRTO, LD_PSCRT0, LD_PUCRT0, LD_CRTI, and LD_CRTN are used to manage different
types of crt object files. A crt object
file (crto) contains the entry point of the application
(_start
or _main
).
LD_UCRT0 |
Specifies the entry point for an embedded user actor |
LD_SCRT0 |
Specifies the entry point for an embedded supervisor actor |
LD_DCRT0 |
Specifies the entry point for drivers |
LD_PSCRT0 |
Specifies the entry point for a supervisor actor or process |
LD_PUCRT0 |
Specifies the entry point for a user actor or process |
LD_CRTI |
Contains the crti.o file. This file is always the first object file of a link list and should contain the beginning of the .init and .fini sections |
LD_CRTN |
Contains the .fini section |
LD_U_ACTOR and LD_S_ACTOR specify link information for user and supervisor actors.
EBD_U_LIBS, EBD_S_LIBS, CLX_U_LIBS, CLX_S_LIBS, EBD_CXX_LIBS, and CLX_LIBS are provided to manage the libraries for embedded actors, actors and processes.
Table 6-3 Library Variables
EBD_U_LIBS |
Manages the C library for embedded user actors |
EBD_S_LIBS |
Manages the C library for embedded supervisor actors |
CLX_U_LIBS |
Manages the C library for user actors and processes |
CLX_S_LIBS |
Manages the C library for supervisor actors and processes |
EBD_CXX_LIBS |
Manages the C++ library for embedded actors |
CLX_LIBS |
Manages the C++ library for actors and processes |
The make environment includes the following commands:
cc
ld
as
mkctors