documentation/common_mmh.pod
changeset 16 18a55d594fba
parent 12 d0b16e01f384
child 19 cb341c55f6e8
equal deleted inserted replaced
15:6bb86f60191e 16:18a55d594fba
    10 # Accenture - Initial contribution
    10 # Accenture - Initial contribution
    11 #
    11 #
    12 
    12 
    13 =head1 common.mmh and platform.mmh Syntax
    13 =head1 common.mmh and platform.mmh Syntax
    14 
    14 
    15 The fshell build system uses a number of macros to control what should be built and how. These are defined in F<fshell/build/common/common.mmh> and F<fshell/platforms/E<lt>PLATFORME<gt>/platform.mmh>. Each platform defines the things it does and doesn't support in its platform.mmh. common.mmh takes these and defines some derived macros. This system allows fshell to be built in a large number of configurations, ranging from minimal base textshell on Symbian OS v9.1 to full GUI on the latest Symbian Foundation codeline.
    15 The fshell build system uses a number of macros to control what should be built and how. These are defined in F<fshell/build/common/common.mmh> and F<fshell/build/E<lt>PLATFORME<gt>/platform.mmh>. Each platform defines the things it does and doesn't support in its platform.mmh. common.mmh takes these and defines some derived macros. This system allows fshell to be built in a large number of configurations, ranging from minimal base textshell on Symbian OS v9.1 to full GUI on the latest Symbian Foundation codeline.
    16 
    16 
    17 Any code wishing to use the fshell conditional system should C<< #include <fshell/common.mmh> >> and use the macros below and/or the ones defined in common.mmh to decide how to behave. Below follows the complete list of things that the platform.mmh can define. This isn't the complete list of all the macros that can be I<used>, for that see common.mmh directly. common.mmh can be included anywhere that the preprocessor is used - eg in source code, MMP files, RSS files or bld.infs.
    17 Any code wishing to use the fshell conditional system should C<< #include <fshell/common.mmh> >> and use the macros below and/or the ones defined in common.mmh to decide how to behave. Below follows the complete list of things that the platform.mmh can define. This isn't the complete list of all the macros that can be I<used>, for that see common.mmh directly. common.mmh can be included anywhere that the preprocessor is used - eg in source code, MMP files, RSS files or bld.infs.
    18 
    18 
    19 The macros that have a [NO_] in are assumed to be supported unless the [NO_] variant is defined. Eg in your MMP file you would check for btrace support with C<#ifdef FSHELL_BTRACE_SUPPORT> and to say a platform didn't support it you'd add C<#define FSHELL_NO_BTRACE_SUPPORT> to the platform.mmh. Unless the platform.mmh says otherwise, common.mmh would define C<FSHELL_BTRACE_SUPPORT>. Everything in fshell that uses btrace checks for C<FSHELL_SUPPORT_BTRACE> in either the bld.inf (in the case of a command that shouldn't be built at all if btrace isn't available) or in its MMP and/or source code (for a command that can still offer some functionality when btrace isn't available).
    19 The macros that have a [NO_] in are assumed to be supported unless the [NO_] variant is defined. Eg in your MMP file you would check for btrace support with C<#ifdef FSHELL_BTRACE_SUPPORT> and to say a platform didn't support it you'd add C<#define FSHELL_NO_BTRACE_SUPPORT> to the platform.mmh. Unless the platform.mmh says otherwise, common.mmh would define C<FSHELL_BTRACE_SUPPORT>. Everything in fshell that uses btrace checks for C<FSHELL_SUPPORT_BTRACE> in either the bld.inf (in the case of a command that shouldn't be built at all if btrace isn't available) or in its MMP and/or source code (for a command that can still offer some functionality when btrace isn't available).
    20 
    20 
    22 
    22 
    23 =over 4
    23 =over 4
    24 
    24 
    25 =item FSHELL_[NO_]BTRACE_SUPPORT
    25 =item FSHELL_[NO_]BTRACE_SUPPORT
    26 
    26 
    27 BTrace (including timestamp2) supported in kernel.
    27 BTrace (including timestamp2) supported in kernel. Everything except legacy v9.1-based platforms support btrace.
    28 
    28 
    29 =item FSHELL_[NO_]PIPS_SUPPORT
    29 =item FSHELL_[NO_]PIPS_SUPPORT
    30 
    30 
    31 Pips runtime available.
    31 Pips runtime available.
    32 
    32 
   130 
   130 
   131 Create a launch icon for running fshell remotely via rcons.
   131 Create a launch icon for running fshell remotely via rcons.
   132 
   132 
   133 =item FSHELL_CORE_SUPPORT_LICENSE
   133 =item FSHELL_CORE_SUPPORT_LICENSE
   134 
   134 
   135 Build platform specific license support into fshell. Note, the platform must export F<\epoc32\build\fshell\core\generated\license.cpp> that provides the implementation of the interface defined in F<\fshell\core\src\license.h>.
   135 Build platform specific license support into fshell. Note, the platform must export F<\epoc32\build\fshell\core\generated\license.cpp> that provides the implementation of the interface defined in F<\fshell\core\src\license.h>. Obsolete.
   136 
   136 
   137 =item FSHELL_[NO_]SAMPLINGPROFILER_SUPPORT
   137 =item FSHELL_[NO_]SAMPLINGPROFILER_SUPPORT
   138 
   138 
   139 Samping profiler (profiler.h) is present. (foundation forgot to include it in S^2).
   139 Samping profiler (profiler.h) is present. (foundation forgot to include it in S^2).
   140 
   140 
   233 =head2 Example platform.mmh file
   233 =head2 Example platform.mmh file
   234 
   234 
   235 An example platform.mmh is included below. This is for an imaginary platform based on the S^4 release, that is text-only but supports most other things. Generally the older and/or more restricted the platform is, the more C<FSHELL_NO_...> macros you have to define.
   235 An example platform.mmh is included below. This is for an imaginary platform based on the S^4 release, that is text-only but supports most other things. Generally the older and/or more restricted the platform is, the more C<FSHELL_NO_...> macros you have to define.
   236 
   236 
   237 	// platform.mmh for the imaginary Mythic platform
   237 	// platform.mmh for the imaginary Mythic platform
       
   238 	// This would belong in \fshell\build\mythic\platform.mmh
   238 
   239 
   239 	#ifndef FSHELL_PLATFORM_MMH
   240 	#ifndef FSHELL_PLATFORM_MMH
   240 	#define FSHELL_PLATFORM_MMH
   241 	#define FSHELL_PLATFORM_MMH
   241 
   242 
   242 	// We support all Platsec capabilities
   243 	// We support all Platsec capabilities