Symbian3/SDK/Source/GUID-60B98AFE-6DE6-5086-B70C-F377562E60D9.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
--- a/Symbian3/SDK/Source/GUID-60B98AFE-6DE6-5086-B70C-F377562E60D9.dita	Fri Jul 16 17:23:46 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
-<!-- This component and the accompanying materials are made available under the terms of the License 
-"Eclipse Public License v1.0" which accompanies this distribution, 
-and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
-<!-- Initial Contributors:
-    Nokia Corporation - initial contribution.
-Contributors: 
--->
-<!DOCTYPE concept
-  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
-<concept xml:lang="en" id="GUID-60B98AFE-6DE6-5086-B70C-F377562E60D9"><title>Extension makefile targets</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Extension makefiles can be used where certain build steps are required that are not catered for by the generated makefiles. Extension makefiles are makefiles to be run by <filepath>make.exe</filepath> (the GCC make utility) or <filepath>nmake.exe</filepath> (the Microsoft make utility). They must contain certain make targets. During build activities, <filepath>abld</filepath> will call the target corresponding to the build activity that is being carried out. This will then execute whatever commands your makefile specifies for that target. </p> <p>The following table lists the required make targets: </p> <table id="GUID-058134AF-E473-577E-B6E8-6309B859E5D7"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><tbody><row><entry><p> <b>Target</b> </p> </entry> <entry><p> <b>Corresponding abld command</b> </p> </entry> </row> <row><entry><p> <codeph>makmake</codeph> </p> </entry> <entry><p> <codeph>makefile</codeph> </p> </entry> </row> <row><entry><p> <codeph>freeze</codeph> </p> </entry> <entry><p> <codeph>freeze</codeph> </p> </entry> </row> <row><entry><p> <codeph>lib</codeph> </p> </entry> <entry><p> <codeph>library</codeph> </p> </entry> </row> <row><entry><p> <codeph>cleanlib</codeph> </p> </entry> <entry><p> <codeph>tidy</codeph> </p> </entry> </row> <row><entry><p> <codeph>clean</codeph> </p> </entry> <entry><p> <codeph>clean</codeph> </p> </entry> </row> <row><entry><p> <codeph>final</codeph> </p> </entry> <entry><p> <codeph>final</codeph>. This target is provided specifically to allow extension makefiles to execute final commands. </p> </entry> </row> <row><entry><p> <codeph>resource</codeph> </p> </entry> <entry><p> <codeph>resource</codeph> </p> </entry> </row> <row><entry><p> <codeph>bld</codeph> </p> </entry> <entry><p> <codeph>target</codeph> </p> </entry> </row> <row><entry><p> <codeph>savespace</codeph> </p> </entry> <entry><p> <codeph>target -savespace</codeph> </p> </entry> </row> <row><entry><p> <codeph>releasables</codeph> </p> </entry> <entry><p> <codeph>target [-what | -check]</codeph> </p> </entry> </row> </tbody> </tgroup> </table> <p> <i>All</i> targets must be provided in an extension makefile. This should be done even if no commands are listed with a particular target, for the following two reasons: </p> <ul><li id="GUID-5CA8259A-E725-56BC-9A94-F21BDBA5978B"><p>The target will be called, during the build, whether commands are listed or not </p> </li> <li id="GUID-0D4E6BCE-D220-57F5-AB09-4218BE2F7F8E"><p> <filepath>nmake.exe</filepath> /<filepath>make.exe</filepath> will generate an error if the target cannot be found. </p> </li> </ul> <section><title>Simple example</title> <p>An example of a simple extension makefile is given below: </p> <codeblock id="GUID-D7CE4F11-3B2F-5766-A31F-4D3BFD46AB38" xml:space="preserve">MAKMAKE :
-       echo this is an example
-
-FINAL FREEZE LIB CLEANLIB RESOURCE RELEASABLES CLEAN BLD SAVESPACE : </codeblock> <p>This prints <systemoutput>this is an example</systemoutput> to the console at the makefile construction stage of an <filepath>abld</filepath>, and does nothing for the other targets. </p> <p>Note that: </p> <ul><li id="GUID-C4E2B509-3BF9-55B5-9B31-739A3920839A"><p>You can put multiple targets on the same line, as above. </p> </li> <li id="GUID-31C8B7BD-EC0D-5406-B533-598764B5A1BB"><p>You must have a space or a tab at the start of lines containing target commands. </p> </li> <li id="GUID-E9DACA4B-8C30-535D-B93F-34D9437CD6F0"><p>Commands listed with each target can be calls to any tools or system commands that are available at build-time. </p> </li> </ul> </section> <section><title>Platform-specific commands example</title> <p>If different commands are required for the same target for different platforms, special <filepath>nmake.exe</filepath> /<filepath>make.exe</filepath> syntax can be used in conjunction with the <codeph>$(PLATFORM)</codeph> and <codeph>$(CFG)</codeph> macros that <filepath>abld</filepath> defines to carry out the different commands. </p> <p> <codeph>$(CFG)</codeph> is defined as UDEB or UREL. <codeph>$(PLATFORM)</codeph> is WINS, ARMI, etc. </p> <p>For example, the following <codeph>nmake</codeph> makefile prints <systemoutput>ARMI MAKEMAKE COMMAND</systemoutput> at the makefile stage for the ARMI target, or <systemoutput>NOT ARMI BUILD</systemoutput> for any other platform: </p> <codeblock id="GUID-D3976893-2BC7-53EE-99F0-A1A502E33E39" xml:space="preserve">!IF "$(PLATFORM)" == "ARMI"
-MAKMAKE:
-    echo ARMI MAKEMAKE COMMAND
-!ELSE
-MAKMAKE:
-    echo NOT ARMI BUILD
-!ENDIF
-    
-FINAL FREEZE LIB CLEANLIB RESOURCE RELEASABLES CLEAN BLD SAVESPACE : </codeblock> </section> </conbody></concept>
\ No newline at end of file