1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/non_foundation_paths.hrh Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,169 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: This file defines macros to be used by non-foundation code.
1.18 +* Main thing is that non_foundation code should NEVER for instance export
1.19 +* headers to same directories in epoc32/include as the foundation code.
1.20 +*
1.21 +* However to support transition from non-foundation code to foundation code asset
1.22 +* we introduce same layers as in foundation.
1.23 +
1.24 +* Usage examples:
1.25 +* #include <non_foundation_paths.hrh>
1.26 +*
1.27 +* *************************************************************
1.28 +* * MMP file related macro usages to add the system include paths
1.29 +* *
1.30 +* * The include paths has to be related to the layer in which your SW
1.31 +* * resides. Thus as an example: a component residing in middleware
1.32 +* * layer should use the MW specific macro.
1.33 +* * Keep this as a separate line in the mmp-files. If you need to
1.34 +* * add your own SYSTEMINCLUDE paths, please defined them as
1.35 +* * separate statement.
1.36 +* * In addition to these , the non-foundation code should also use
1.37 +* * one of the foundation specific macros. (APP_LAYER_SYSTEMINCLUDE,
1.38 +* * MW_LAYER_SYSTEMINCLUDE or OS_LAYER_SYSTEMINCLUDE)
1.39 +* *************************************************************
1.40 +* NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE
1.41 +* NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE
1.42 +* NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE
1.43 +* NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE
1.44 +*
1.45 +* *************************************************************
1.46 +* * Macros related to exporting non-foundation headers into
1.47 +* * correct place in the new system.
1.48 +* *
1.49 +* * The macro that you should use depends on 2 things:
1.50 +* * - in which layer your package, which exports the APIs resides
1.51 +* * - what is the visibility of the API (public or platform)
1.52 +* *************************************************************
1.53 +* // the exporting of public APIs should use one of below macros
1.54 +* // depending on which layer the API belogs to
1.55 +* NON_FOUNDATION_APP_LAYER_EXPORT_PATH
1.56 +* NON_FOUNDATION_MW_LAYER_EXPORT_PATH
1.57 +* NON_FOUNDATION_OS_LAYER_EXPORT_PATH
1.58 +* NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH
1.59 +*
1.60 +* The hierarchy how APIs should reside in foundation has been specified
1.61 +* in developer documentation. See further details from documentation.
1.62 +* Below is example case relying on the structure
1.63 +* my_own_api/group/bld.inf
1.64 +* my_own_api/inc/header1.h
1.65 +* my_own_api/inc/subdir/header2.h
1.66 +*
1.67 +* Assuming that the API is in middleware layer and a public API.
1.68 +* Then the bld.inf should have the following
1.69 +* ../inc/header1.h NON_FOUNDATION_APP_LAYER_EXPORT_PATH(header1.h)
1.70 +* ../inc/subdir/header2.h NON_FOUNDATION_APP_LAYER_EXPORT_PATH(subdir/header2.h)
1.71 +*
1.72 +* In the above case the locations are as follow (with current MACRO settings):
1.73 +* header1.h in /epoc32/include/ext/app
1.74 +* header2.h in /epoc32/include/ext/app/subdir
1.75 +*
1.76 +*
1.77 +*
1.78 +*/
1.79 +
1.80 +
1.81 +#ifndef NON_FOUNDATION_PATHS_HRH
1.82 +#define NON_FOUNDATION_PATHS_HRH
1.83 +
1.84 +/**
1.85 +* ---------------------------------------
1.86 +* Location, where the non-foundation code should export its headers.
1.87 +* These are specific to layer to which the non-foundation code belongs to.
1.88 +* See usage on top of this hrh-file.
1.89 +* ---------------------------------------
1.90 +*/
1.91 +
1.92 +#if __GNUC__ >= 3
1.93 +#define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/exported
1.94 +#define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/exported
1.95 +#define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/exported
1.96 +#define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/exported
1.97 +#else
1.98 +#define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/##exported
1.99 +#define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/##exported
1.100 +#define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/##exported
1.101 +#define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/##exported
1.102 +#endif
1.103 +
1.104 +
1.105 +/**
1.106 +**************************************************************************
1.107 +* General comments about the 3 define statements related to include paths.
1.108 +* It should be enough only to have one of the below macros and one of the include macros
1.109 +* from platform_paths.hrh.
1.110 +* No other systemincludes to epoc32/include or subdirectories.
1.111 +****************************************************************************
1.112 +*/
1.113 +
1.114 +/**
1.115 +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
1.116 +* used in the mmp-files that are part of the applications-layer.
1.117 +*
1.118 +* Applications layer is the last one in the list, since most likely the most of
1.119 +* the headers come from middleware or os-layer => thus they are first.
1.120 +*/
1.121 +#define NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
1.122 + /epoc32/include/ext/app \
1.123 + /epoc32/include/ext/mw \
1.124 + /epoc32/include/ext/os
1.125 +
1.126 +/**
1.127 +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
1.128 +* used in the mmp-files that are part of the middleware-layer.
1.129 +*/
1.130 +#define NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
1.131 + /epoc32/include/ext/mw \
1.132 + /epoc32/include/ext/os
1.133 +
1.134 +/**
1.135 +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
1.136 +* used in the mmp-files that are part of the os-layer.
1.137 +*/
1.138 +#define NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
1.139 + /epoc32/include/ext/os
1.140 +
1.141 +/**
1.142 +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be
1.143 +* used in the mmp-files that are part of the adapt-layer.
1.144 +*/
1.145 +#define NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \
1.146 + /epoc32/include/ext/os \
1.147 + /epoc32/include/ext/adapt
1.148 +
1.149 +
1.150 +/**
1.151 +****************************************************************************
1.152 +* Definitions to export IBY files to different folders where they will be taken
1.153 +* to ROM image
1.154 +****************************************************************************
1.155 +*/
1.156 +
1.157 +// Following three definitions are used for exporting IBY files to
1.158 +// Core image (ROM+ROFS1). IBY files are exported according to their layer.
1.159 +#if __GNUC__ >= 3
1.160 +#define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported
1.161 +#else
1.162 +#define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported
1.163 +#endif
1.164 +
1.165 +
1.166 +
1.167 +#endif // end of NON_FOUNDATION_PATHS_HRH
1.168 +
1.169 +
1.170 +
1.171 +
1.172 +