|
1 # Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # |
|
15 |
|
16 |
|
17 package Makhelp; |
|
18 require Exporter; |
|
19 @ISA=qw(Exporter); |
|
20 @EXPORT=qw( |
|
21 Help_Invocation |
|
22 Help_Mmp |
|
23 Help_Plat |
|
24 ); |
|
25 |
|
26 use strict; |
|
27 |
|
28 use E32tpver; |
|
29 use featurevariantparser; |
|
30 # also requires main module to have loaded platform module(s) and Modload.pm and Trgtype.pm |
|
31 |
|
32 sub Help_Invocation () { |
|
33 |
|
34 print |
|
35 "\n", |
|
36 "MAKMAKE - Makefile Creation Utility (Build ",&E32tpver,")\n", |
|
37 "\n", |
|
38 "MAKMAKE {flags} [{MMPFilePath}MMPFileRoot] [Platform[.Feature Variant]]\n", |
|
39 "\n", |
|
40 "Flags: (case insensitive)\n", |
|
41 " -D -> create makefile in ", $E32env::Data{BldPath}, "[project]\\[platform]\\\n", |
|
42 " -MMP -> information - basic mmp syntax\n", |
|
43 " -PLAT [platform] -> information - platform-specific mmp syntax\n", |
|
44 " -V -> verbose mode\n", |
|
45 " -ND -> generate no dependencies info\n", |
|
46 " -[debug|no_debug]-> enable/disable generation of symbolic debug information for ARM ABI compliant platforms\n", |
|
47 " -LOGFC -> enable function call logging\n", |
|
48 " -INVARIANT -> force default feature variant processing only, unless FEATUREVARIANT is present in the .mmp file\n", |
|
49 "\n" |
|
50 ; |
|
51 |
|
52 my @Plats=&main::Plat_List; |
|
53 print |
|
54 "Available Platforms: (case insensitive)\n", |
|
55 " @Plats\n" |
|
56 ; |
|
57 |
|
58 my @BuildableFeatureVariants=featurevariantparser->GetBuildableFeatureVariants(); |
|
59 if (@BuildableFeatureVariants) |
|
60 { |
|
61 @BuildableFeatureVariants = map{uc($_)} @BuildableFeatureVariants; |
|
62 |
|
63 print |
|
64 "\nAvailable Feature Variants for Supporting Platforms: (case insensitive)\n", |
|
65 " @BuildableFeatureVariants\n" |
|
66 ; |
|
67 } |
|
68 } |
|
69 |
|
70 sub Help_Mmp () { |
|
71 |
|
72 my @TrgTypes=&main::Trg_List; |
|
73 my $TrgTypes='TARGETTYPE ['; |
|
74 my $Spacing=length($TrgTypes); |
|
75 my $LineLen=$Spacing; |
|
76 foreach (@TrgTypes) { |
|
77 $TrgTypes.=$_.'|'; |
|
78 $LineLen+=(length($_)+1); |
|
79 if ($LineLen>($Spacing+50)) { |
|
80 $TrgTypes.="\n".(' 'x$Spacing); |
|
81 $LineLen=$Spacing; |
|
82 } |
|
83 } |
|
84 chop $TrgTypes; |
|
85 $TrgTypes.=']'; |
|
86 |
|
87 print <<ENDHERE; |
|
88 |
|
89 Makmake Project File - Basic Syntax |
|
90 |
|
91 /* Use C++ comments if required */ |
|
92 START BITMAP [target] |
|
93 TARGETPATH [emulated_path_on_target_machine] |
|
94 HEADER |
|
95 SOURCEPATH [.mmp-relative_source_path (default - .mmp_dir)] |
|
96 SOURCE [color_depth] [source_bitmaps] |
|
97 END |
|
98 |
|
99 START RESOURCE [source] |
|
100 TARGET [target (default - source)] |
|
101 TARGETPATH [emulated_path_on_target_machine] |
|
102 HEADER |
|
103 LANG [languages (overrides global LANG)] |
|
104 UID [uid(s) for resource file] |
|
105 END |
|
106 |
|
107 START STRINGTABLE [source] |
|
108 EXPORTPATH [location] |
|
109 HEADERONLY [export only header file] |
|
110 END |
|
111 |
|
112 AIF [target] [src_path] [resource] {[color_depth] [bitmaps]} |
|
113 ALWAYS_BUILD_AS_ARM |
|
114 ARMFPU [SOFTVFP | VFPV2] |
|
115 ASSPABI |
|
116 ASSPEXPORTS |
|
117 ASSPLIBRARY [ASSP_libraries] |
|
118 BYTEPAIRCOMPRESSTARGET |
|
119 CAPABILITY [NONE | list of {-}CAPABILITY_NAME] |
|
120 COMPRESSTARGET |
|
121 DEBUGGABLE [Executable can be debugged in a running system] |
|
122 DEBUGGABLE_UDEBONLY [Only Debug (UDEB) executables can be debugged in a running system] |
|
123 DEBUGLIBRARY [libraries - use in addition to LIBRARY for DEBUG builds] |
|
124 |
|
125 DEFFILE [{path}{deffile} (default - |
|
126 \[project]\B[platform]\[target basename].DEF) |
|
127 If the path ends in \~\ the ~ is replace by B[platform] ] |
|
128 |
|
129 DOCUMENT [sourcepath-relative_documents] |
|
130 EPOCALLOWDLLDATA |
|
131 EPOCCALLDLLENTRYPOINTS |
|
132 EPOCDATALINKADDRESS [relocation_address] |
|
133 EPOCFIXEDPROCESS |
|
134 EPOCHEAPSIZE [min_size][max_size] |
|
135 EPOCPROCESSPRIORITY [PRIORITY_NAME] |
|
136 EPOCSTACKSIZE [stack_size] |
|
137 EXPORTLIBRARY [executables export library name if different from TARGET] |
|
138 EXPORTUNFROZEN |
|
139 FIRSTLIB [first link object - overrides EEXE.LIB or EDLL.LIB] |
|
140 FEATUREVARIANT [process for all variants when '-invariant' is used in MAKMAKE calls] |
|
141 INFLATECOMPRESSTARGET |
|
142 LANG [languages (defaults to SC)] |
|
143 LIBRARY [libraries] |
|
144 LINKAS [executable's linking name if different from TARGET] |
|
145 LINKEROPTION [COMPILER] [rest of line is linker options] |
|
146 MACRO [user-defined_macros] |
|
147 NEWLIB [override default operator new/operator delete library] |
|
148 NOCOMPRESSTARGET |
|
149 NOEXPORTLIBRARY [don't generate an export library] |
|
150 NOSTRICTDEF |
|
151 OPTION [COMPILER] [rest of line is extra compiler options] |
|
152 OPTION_REPLACE [oldComplierOption] [newOption] |
|
153 PAGED |
|
154 PAGEDCODE |
|
155 PAGEDDATA |
|
156 RAMTARGET // syntax not yet finalized |
|
157 RESOURCE [sourcepath-relative_resources] |
|
158 ROMTARGET // syntax not yet finalized |
|
159 SECUREID [secure ID] |
|
160 SMPSAFE [mark executable as SMP safe] |
|
161 SOURCE [sourcepath-relative_sources] |
|
162 SOURCEPATH [.mmp relative_source_path (default - .mmp_dir] |
|
163 SRCDBG |
|
164 STATICLIBRARY [static_libraries] |
|
165 STDCPP |
|
166 NOSTDCPP |
|
167 STRICTDEPEND |
|
168 SYSTEMINCLUDE [system_include_path] |
|
169 SYSTEMRESOURCE [sourcepath-relative_system_resources] |
|
170 TARGET [target] |
|
171 TARGETPATH [emulated_path_on_target_machine] |
|
172 $TrgTypes |
|
173 UID [uid2|0 {uid3}] |
|
174 UNPAGED |
|
175 UNPAGEDCODE |
|
176 UNPAGEDDATA |
|
177 USERINCLUDE [user_include_path - source_dir searched first always] |
|
178 VENDORID [vendorid] |
|
179 VERSION [MAJOR.minor {explicit} - specify version number of |
|
180 the target. If EXPLICIT specified decorate target |
|
181 filename and DEF file name with version.] |
|
182 WCHARENTRYPOINT |
|
183 |
|
184 #if defined([PLATFORM]) |
|
185 [universal keyword statements restricted to [PLATFORM] ] |
|
186 #endif |
|
187 |
|
188 START [PLATFORM] |
|
189 [platform-specific keyword statements] |
|
190 // use MAKMAKE /PLAT [PLATFORM] to display these |
|
191 END |
|
192 |
|
193 ENDHERE |
|
194 |
|
195 } |
|
196 |
|
197 sub Help_Plat ($$$$$) { |
|
198 my ($Plat,$CPU,$DefFile,$MmpMacrosRef, $MacrosRef)=@_; |
|
199 |
|
200 # list of source macros is incomplete in this function. It may also contain: |
|
201 # __MARM_<ABI>__ if the platform CPU is MARM - (ABI may vary according to .MMP contents though) |
|
202 # Any macros defined in the .MMP file |
|
203 # __DLL__ or __EXE__ respectively if the $BasicTrgType is DLL or EXE |
|
204 # WIN32 and _WINDOWS if the project links to Win32 libraries |
|
205 # |
|
206 # Furthermore, build macros _UNICODE, _DEBUG or _NDEBUG aren't listed - the _UNICODE |
|
207 # macro should probably be defined as a permanent macro now that we're not doing Narrow |
|
208 # builds anymore. |
|
209 |
|
210 $DefFile= 'B'.$DefFile unless ($DefFile eq 'EABI'); |
|
211 print |
|
212 "\n", |
|
213 "Makmake Project File - Platform-specific Syntax\n", |
|
214 "\n", |
|
215 "// Platform -> $Plat\n", |
|
216 "// Default_Def_Dir -> \\[project]\\$DefFile\\\n", |
|
217 "// MMP_Macros -> @$MmpMacrosRef\n", |
|
218 "// Source_Macros -> @$MacrosRef (+ others)\n", |
|
219 "\n", |
|
220 "START [MMP_Macro]\n" |
|
221 ; |
|
222 &main::PMHelp_Mmp if defined &main::PMHelp_Mmp; |
|
223 print "END\n"; |
|
224 } |
|
225 |
|
226 1; |