|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-8DB5E558-9774-5CC3-AF8C-6C50D9FE0496" xml:lang="en"><title>How |
|
13 to use makmake</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Symbian projects are defined by an <filepath>.mmp</filepath> file which |
|
15 specifies the essential elements of the project. The <filepath>makmake</filepath> tool |
|
16 then uses this environment-neutral file to build makefiles for use in various |
|
17 environments. These makefiles are then used for project development. </p> |
|
18 <p>Some makefiles are built for use in building the project from the command-line, |
|
19 while others are for use with an IDE. Command-line makefiles created by <filepath>makmake</filepath> contain |
|
20 syntax which it is not possible to incorporate into makefiles intended for |
|
21 an IDE: these are discussed below. </p> |
|
22 <section><title>Building and running a project for WINSCW</title> <p>Starting |
|
23 with <filepath>hello.mmp</filepath>, you can build the makefile file <filepath>hello.winscw</filepath> using: </p> <p><userinput>makmake |
|
24 hello winscw</userinput> </p> <p>You then build the project from the command |
|
25 line by running: </p> <p><userinput>make -f hello.winscw</userinput> </p> </section> |
|
26 <section><title>Building debug and release variants</title> <p>A command line |
|
27 makefile produced by <filepath>makmake</filepath> allows the executable (an |
|
28 EXE or any type of <filepath>DLL</filepath>) to be produced in one of two |
|
29 variants: </p> <ul> |
|
30 <li id="GUID-277C7FEF-E82E-534B-9D4A-E7202C55D902"><p> <filepath>udeb</filepath>: |
|
31 debug mode </p> </li> |
|
32 <li id="GUID-3E123400-CB9C-593B-8D10-9717FE0B52D4"><p> <filepath>urel</filepath>: |
|
33 release mode </p> </li> |
|
34 </ul> <p>which may be selected by specifying the variant as a target. </p> <p>For |
|
35 example, to build the <filepath>udeb</filepath> variant of the executable, |
|
36 you can do: </p> <p><userinput>make -f hello.armi udeb</userinput> </p> <p>If <filepath>make</filepath> /<filepath>nmake</filepath> is |
|
37 invoked with no target specified, then the following default targets will |
|
38 be built: the default for ARM is release mode; the default for WINSCW, and |
|
39 WINC is debug mode. </p> <p>You may use path specifications to locate the <filepath>.mmp</filepath> file |
|
40 in any directory. </p> <p>For example: </p> <p><userinput>makmake ..\..epoc32ex\e32\hello |
|
41 armv5</userinput> </p> <p>or </p> <p><userinput>makmake ..\..epoc32ex\e32\hello |
|
42 cw_ide</userinput> </p> <p>will locate the specified <filepath>.mmp</filepath> file. |
|
43 However, the generated <filepath>makmake</filepath> files are always written |
|
44 into the current directory. </p> </section> |
|
45 <section><title>Command line makefile utilities</title> <p>Command-line makefiles |
|
46 provide extra makefile targets which enable you to use <filepath>make</filepath> or <filepath>nmake</filepath> to |
|
47 create work directories and erase non-source files for a particular build |
|
48 variant of a project. </p> <p>For example, </p> <ul> |
|
49 <li id="GUID-E6B4369D-C966-59F4-A44B-E708930DB07F"><p> <systemoutput>make |
|
50 -f hello.winscw clean</systemoutput> attempts to delete the non-source files |
|
51 created during a build of all variants of the project <filepath>hello</filepath> </p> </li> |
|
52 <li id="GUID-C9E915E0-6339-5A74-9BDC-BD62D3B79B67"><p> <systemoutput>make |
|
53 -f hello.winscw makework</systemoutput> will create the work directories for |
|
54 a build of all variants of the project hello, while <codeph>nmake |
|
55 -f hello.wins makeworkurel</codeph> will create the work directories |
|
56 for a wide release build of the project. </p> </li> |
|
57 </ul> <p>The build-specific <codeph>makework</codeph> targets are listed as |
|
58 dependencies of the main build-specific targets in command-line makefiles, |
|
59 so work directories will automatically be created when a target is built with |
|
60 a command-line makefile if these directories do not already exist. </p> </section> |
|
61 </conbody><related-links> |
|
62 <link href="GUID-BBBB5000-90A2-503A-9521-2FC6DEC69DC8.dita"><linktext>mmp file |
|
63 syntax</linktext></link> |
|
64 </related-links></concept> |