williamr@2: /* williamr@2: * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: This file defines macros to be used by non-foundation code. williamr@2: * Main thing is that non_foundation code should NEVER for instance export williamr@2: * headers to same directories in epoc32/include as the foundation code. williamr@2: * williamr@2: * However to support transition from non-foundation code to foundation code asset williamr@2: * we introduce same layers as in foundation. williamr@2: williamr@2: * Usage examples: williamr@2: * #include williamr@2: * williamr@2: * ************************************************************* williamr@2: * * MMP file related macro usages to add the system include paths williamr@2: * * williamr@2: * * The include paths has to be related to the layer in which your SW williamr@2: * * resides. Thus as an example: a component residing in middleware williamr@2: * * layer should use the MW specific macro. williamr@2: * * Keep this as a separate line in the mmp-files. If you need to williamr@2: * * add your own SYSTEMINCLUDE paths, please defined them as williamr@2: * * separate statement. williamr@2: * * In addition to these , the non-foundation code should also use williamr@2: * * one of the foundation specific macros. (APP_LAYER_SYSTEMINCLUDE, williamr@2: * * MW_LAYER_SYSTEMINCLUDE or OS_LAYER_SYSTEMINCLUDE) williamr@2: * ************************************************************* williamr@2: * NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE williamr@2: * NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE williamr@2: * NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE williamr@2: * NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE williamr@2: * williamr@2: * ************************************************************* williamr@2: * * Macros related to exporting non-foundation headers into williamr@2: * * correct place in the new system. williamr@2: * * williamr@2: * * The macro that you should use depends on 2 things: williamr@2: * * - in which layer your package, which exports the APIs resides williamr@2: * * - what is the visibility of the API (public or platform) williamr@2: * ************************************************************* williamr@2: * // the exporting of public APIs should use one of below macros williamr@2: * // depending on which layer the API belogs to williamr@2: * NON_FOUNDATION_APP_LAYER_EXPORT_PATH williamr@2: * NON_FOUNDATION_MW_LAYER_EXPORT_PATH williamr@2: * NON_FOUNDATION_OS_LAYER_EXPORT_PATH williamr@2: * NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH williamr@2: * williamr@2: * The hierarchy how APIs should reside in foundation has been specified williamr@2: * in developer documentation. See further details from documentation. williamr@2: * Below is example case relying on the structure williamr@2: * my_own_api/group/bld.inf williamr@2: * my_own_api/inc/header1.h williamr@2: * my_own_api/inc/subdir/header2.h williamr@2: * williamr@2: * Assuming that the API is in middleware layer and a public API. williamr@2: * Then the bld.inf should have the following williamr@2: * ../inc/header1.h NON_FOUNDATION_APP_LAYER_EXPORT_PATH(header1.h) williamr@2: * ../inc/subdir/header2.h NON_FOUNDATION_APP_LAYER_EXPORT_PATH(subdir/header2.h) williamr@2: * williamr@2: * In the above case the locations are as follow (with current MACRO settings): williamr@2: * header1.h in /epoc32/include/ext/app williamr@2: * header2.h in /epoc32/include/ext/app/subdir williamr@2: * williamr@2: * williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef NON_FOUNDATION_PATHS_HRH williamr@2: #define NON_FOUNDATION_PATHS_HRH williamr@2: williamr@2: /** williamr@2: * --------------------------------------- williamr@2: * Location, where the non-foundation code should export its headers. williamr@2: * These are specific to layer to which the non-foundation code belongs to. williamr@2: * See usage on top of this hrh-file. williamr@2: * --------------------------------------- williamr@2: */ williamr@2: williamr@2: #if __GNUC__ >= 3 williamr@2: #define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/exported williamr@2: #define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/exported williamr@2: #define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/exported williamr@2: #define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/exported williamr@2: #else williamr@2: #define NON_FOUNDATION_APP_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/app/##exported williamr@2: #define NON_FOUNDATION_MW_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/mw/##exported williamr@2: #define NON_FOUNDATION_OS_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/os/##exported williamr@2: #define NON_FOUNDATION_ADAPT_LAYER_EXPORT_PATH(exported) /epoc32/include/ext/adapt/##exported williamr@2: #endif williamr@2: williamr@2: williamr@2: /** williamr@2: ************************************************************************** williamr@2: * General comments about the 3 define statements related to include paths. williamr@2: * It should be enough only to have one of the below macros and one of the include macros williamr@2: * from platform_paths.hrh. williamr@2: * No other systemincludes to epoc32/include or subdirectories. williamr@2: **************************************************************************** williamr@2: */ williamr@2: williamr@2: /** williamr@2: * This define statements defines the SYSTEMINCLUDE-line, which is intended to be williamr@2: * used in the mmp-files that are part of the applications-layer. williamr@2: * williamr@2: * Applications layer is the last one in the list, since most likely the most of williamr@2: * the headers come from middleware or os-layer => thus they are first. williamr@2: */ williamr@2: #define NON_FOUNDATION_APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ williamr@2: /epoc32/include/ext/app \ williamr@2: /epoc32/include/ext/mw \ williamr@2: /epoc32/include/ext/os williamr@2: williamr@2: /** williamr@2: * This define statements defines the SYSTEMINCLUDE-line, which is intended to be williamr@2: * used in the mmp-files that are part of the middleware-layer. williamr@2: */ williamr@2: #define NON_FOUNDATION_MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ williamr@2: /epoc32/include/ext/mw \ williamr@2: /epoc32/include/ext/os williamr@2: williamr@2: /** williamr@2: * This define statements defines the SYSTEMINCLUDE-line, which is intended to be williamr@2: * used in the mmp-files that are part of the os-layer. williamr@2: */ williamr@2: #define NON_FOUNDATION_OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ williamr@2: /epoc32/include/ext/os williamr@2: williamr@2: /** williamr@2: * This define statements defines the SYSTEMINCLUDE-line, which is intended to be williamr@2: * used in the mmp-files that are part of the adapt-layer. williamr@2: */ williamr@2: #define NON_FOUNDATION_ADAPT_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ williamr@2: /epoc32/include/ext/os \ williamr@2: /epoc32/include/ext/adapt williamr@2: williamr@2: williamr@2: /** williamr@2: **************************************************************************** williamr@2: * Definitions to export IBY files to different folders where they will be taken williamr@2: * to ROM image williamr@2: **************************************************************************** williamr@2: */ williamr@2: williamr@2: // Following three definitions are used for exporting IBY files to williamr@2: // Core image (ROM+ROFS1). IBY files are exported according to their layer. williamr@2: #if __GNUC__ >= 3 williamr@2: #define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported williamr@2: #else williamr@2: #define NON_FOUNDATION_CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported williamr@2: #endif williamr@2: williamr@2: williamr@2: williamr@2: #endif // end of NON_FOUNDATION_PATHS_HRH williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: