sbsv1/abld/platform/e32plat.pm
author jjkang
Tue, 29 Jun 2010 14:52:54 +0800
changeset 606 30b30f9da0b7
parent 599 fa7a3cc6effd
permissions -rw-r--r--
Add ..\dev\.. to path
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
# Description:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
# Module providing platform details for platforms supported
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
# by Symbian OS
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
# all data is uppercase
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
# 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
package E32Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
require Exporter;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
@ISA=qw(Exporter);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
@EXPORT=qw(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
	Plat_SetVerbose
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
	Plat_Init
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
	Plat_GetL
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
	Plat_List
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
	Plat_AssocIDE
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
	Plat_Customizations
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
	Plat_Customizes
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
	Plat_Root
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
	Plat_SupportsFeatureVariants
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
use Winutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
use RVCT_plat2set;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
use BPABIutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
use E32Variant;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
my $variantABIV2Keyword = &Variant_GetMacro();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
my %Mode=(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
	Verbose=>0
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
my $ModulePath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
sub Plat_SetVerbose () {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
	$Mode{Verbose}=1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
my %BldLists=(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	EPOC32=>['UREL','UDEB'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
	WINS=>['UDEB','UREL'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
	TOOLS=>['DEB','REL'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
	TOOLS2=>['DEB','REL'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
my %BldMacros=(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
	DEB=>['_DEBUG'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
	REL=>['NDEBUG'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
	UDEB=>['_DEBUG','_UNICODE'],
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
	UREL=>['NDEBUG','_UNICODE']
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
my @EpocMacros=('__SYMBIAN32__');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
my @BPABIPlats = &BPABIutl_Plat_List;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
my %Plat=(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
	ARM4=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
		ABI=>'ARM4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
	ARM4SMP=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
		ABI=>'ARM4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
		SMP=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
		StatLink=>'ARM4SMP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    87
	ARM4T=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    88
		ABI=>'ARM4T',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    89
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    92
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    93
	ARMI=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    94
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    95
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    96
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    97
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    98
	SARM4=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    99
		ABI=>'ARM4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   100
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   101
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   102
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   103
		Single=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   104
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   105
	SARMI=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   106
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   107
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   108
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   109
		Single=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   110
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   111
	STHUMB=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   112
		ABI=>'THUMB',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   113
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   114
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   115
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   116
		Single=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   117
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   118
	THUMB=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   119
		ABI=>'THUMB',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   120
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   121
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   122
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   123
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   124
	TOOLS=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   125
		ABI=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   126
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   127
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   128
		CPU=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   129
		OS=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   130
		MakeMod=>'Cl_win',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   131
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   132
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   133
	TOOLS2=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   134
		ABI=>'TOOLS2',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   135
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   136
		Compiler=>'GCC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   137
		CPU=>'TOOLS2',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   138
		OS=>'TOOLS2',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   139
		MakeMod=>'Cl_mingw',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   140
		MakeCmd=>'make',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   141
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   142
	CWTOOLS=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   143
		ABI=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   144
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   145
		Compiler=>'CW32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   146
		CPU=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   147
		OS=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   148
		MakeMod=>'Cl_tools',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   149
		MakeCmd=>'make',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   150
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   151
	VC6TOOLS=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   152
		ABI=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   153
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   154
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   155
		CPU=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   156
		Ext=>'.DSP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   157
		MakeMod=>'Ide_vc6',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   158
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   159
		OS=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   160
		Real=>'TOOLS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   161
		UsrHdrsOnly=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   162
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   163
	WINS=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   164
		ABI=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   165
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   166
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   167
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   168
		MakeMod=>'Cl_win',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   169
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   170
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   171
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   172
	VC6=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   173
		ABI=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   174
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   175
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   176
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   177
		Ext=>'.DSP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   178
		MakeMod=>'Ide_vc6',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   179
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   180
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   181
		Real=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   182
		UsrHdrsOnly=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   183
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   184
	WINSCW=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   185
		ABI=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   186
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   187
		Compiler=>'CW32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   188
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   189
		MakeMod=>'Cl_codewarrior',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   190
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   191
		DefFile=>'WINS',	# use the MSVC def files
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   192
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   193
	CW_IDE=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   194
		ABI=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   195
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   196
		Compiler=>'CW32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   197
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   198
		Ext=>'.xml',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   199
		MakeMod=>'Ide_cw',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   200
		MakeCmd=>'make',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   201
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   202
		Real=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   203
		DefFile=>'WINS',	# use the MSVC def files
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   204
		UsrHdrsOnly=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   205
		SupportsMultiplePlatforms=>1,	# supports more than one real platform
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   206
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   207
	X86=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   208
		ABI=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   209
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   210
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   211
		CPU=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   212
		MakeMod=>'Cl_x86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   213
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   214
		OS=>'EPOC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   215
		DefFile=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   216
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   217
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   218
	X86SMP=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   219
		ABI=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   220
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   221
		Compiler=>'VC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   222
		CPU=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   223
		MakeMod=>'Cl_x86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   224
		MakeCmd=>'nmake',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   225
		OS=>'EPOC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   226
		DefFile=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   227
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   228
		SMP=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   229
		StatLink=>'X86SMP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   230
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   231
	X86GCC=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   232
		ABI=>'X86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   233
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   234
		Compiler=>'X86GCC',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   235
		CPU=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   236
		MakeMod=>'Cl_x86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   237
		OS=>'EPOC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   238
		DefFile=>'x86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   239
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   240
	},	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   241
	X86GMP=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   242
		ABI=>'X86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   243
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   244
		Compiler=>'X86GCC',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   245
		CPU=>'X86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   246
		MakeMod=>'Cl_x86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   247
		OS=>'EPOC32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   248
		DefFile=>'x86gcc',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   249
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   250
		SMP=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   251
		StatLink=>'X86GMP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   252
	},	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   253
	ARMV4=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   254
		ABI=>'ARMV4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   255
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   256
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   257
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   258
		MakeMod=>'Cl_arm',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   259
		Compiler=>'ARMCC',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   260
		DefFile=>'EABI',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   261
		EABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   262
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   263
	ARMV4SMP=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   264
		ABI=>'ARMV4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   265
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   266
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   267
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   268
		MakeMod=>'Cl_arm',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   269
		Compiler=>'ARMCC',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   270
		DefFile=>'EABI',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   271
		EABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   272
		SMP=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   273
		StatLink=>'ARMV4SMP',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   274
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   275
	ARMV5_ABIV1=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   276
		ABI=>'ARMV5',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   277
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   278
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   279
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   280
		MakeMod=>'Cl_arm',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   281
		Compiler=>'ARMCC',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   282
		DefFile=>'EABI',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   283
		EABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   284
		SupportsFeatureVariants=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   285
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   286
	ABIV2=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   287
		ABI=>'ARMV5',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   288
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   289
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   290
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   291
		MakeMod=>'Cl_bpabi',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   292
		DefFile=>'EABI',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   293
		EABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   294
		SupportsFeatureVariants=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   295
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   296
	GCCXML=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   297
		ABI=>'ARM4',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   298
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   299
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   300
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   301
		MakeMod=>'cl_gccxml',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   302
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   303
	VS6=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   304
		ABI=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   305
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   306
		Compiler=>'CW32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   307
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   308
		MakeMod=>'Cl_vscw',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   309
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   310
		Real=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   311
		DefFile=>'WINS',	# use the MSVC def files
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   312
		Ext=>'.mak'		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   313
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   314
	VS2003=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   315
		ABI=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   316
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   317
		Compiler=>'CW32',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   318
		CPU=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   319
		MakeMod=>'Cl_vscw',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   320
		OS=>'WINS',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   321
		Real=>'WINSCW',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   322
		DefFile=>'WINS',	# use the MSVC def files
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   323
		Ext=>'.mak'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   324
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   325
	EDG=>{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   326
		ABI=>'ARMV5',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   327
		ASSP=>'MARM',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   328
		ASSPABI=>'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   329
		Generic=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   330
		MakeMod=>'cl_edg',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   331
	},
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   332
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   333
	# ASSP platforms should be described using .ASSP files
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   334
	# Do not add additional ASSP platforms to this file.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   335
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   336
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   337
sub Set_Plat() 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   338
{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   339
	@BPABIPlats = &BPABIutl_Plat_List;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   340
	foreach my $Candidate (@BPABIPlats)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   341
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   342
# All BPABI platforms inherit from ABIV2 properties as listed in the platlist
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   343
# and Platlist is updated to include the BPABI platforms.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   344
		my ( $key, $value);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   345
		while (($key, $value) = each %{$Plat{ABIV2}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   346
			$Plat{$Candidate}{$key}=$value;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   347
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   348
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   349
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   350
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   351
sub Plat_SupportsFeatureVariants($)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   352
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   353
	my ($plat) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   354
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   355
	# In a non-ABIV2 world, ARMV5 means ARMV5_ABIV1 within e32plat content
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   356
	if (!$variantABIV2Keyword && $plat =~ /^ARMV5$/i)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   357
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   358
		$plat .= "_ABIV1";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   359
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   360
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   361
	return ($plat && defined $Plat{$plat}{SupportsFeatureVariants}) ? $Plat{$plat}{SupportsFeatureVariants} : 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   362
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   363
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   364
sub Plat_Customizations($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   365
        my ($plat) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   366
	my @empty = ();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   367
	return @{$Plat{$plat}{'CUSTOMIZATIONS'}} if $Plat{$plat}{'CUSTOMIZATIONS'};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   368
	return @empty;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   369
      }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   370
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   371
sub Plat_Customizes($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   372
	my ($plat) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   373
	return $Plat{$plat}{'CUSTOMIZES'} ? $Plat{$plat}{'CUSTOMIZES'} : "";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   374
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   375
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   376
sub Plat_Root($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   377
	my ($plat) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   378
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   379
	my $RootName = $Plat{$plat}{'ROOTPLATNAME'};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   380
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   381
	if ($RootName) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   382
		return $RootName;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   383
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   384
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   385
		# A non-BSF platform is its own root.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   386
		return $plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   387
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   388
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   389
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   390
sub Init_BSFs($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   391
	my ($Path)=@_;  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   392
#	get a list of modules
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   393
	opendir DIR, $Path;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   394
	my @BSFs=grep s/^([^\.].*)\.BSF$/$1/, map { uc $_ } sort readdir DIR;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   395
	closedir DIR;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   396
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   397
	my $BSF;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   398
	foreach $BSF (@BSFs) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   399
		my $File=$Path.$BSF.'.bsf';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   400
#		check whether the assp is already defined
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   401
		if (defined %{$Plat{$BSF}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   402
			warn(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   403
				"$File : warning: Platform \"$BSF\" already defined\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   404
				" ... skipping this spec\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   405
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   406
			delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   407
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   408
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   409
#		open the module
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   410
		unless (open FILE, $File) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   411
			delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   412
			warn "warning: Can't open BSF specification \"$File\"\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   413
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   414
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   415
		my $line1 = <FILE>;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   416
		$line1 = uc($line1);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   417
		unless ($line1 =~ /^\#\<BSF\>\#/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   418
			warn "warning: \"$File\" Invalid BSF specification - missing #<bsf>#\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   419
			delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   420
			close FILE;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   421
                  next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   422
            }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   423
            my $custom;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   424
            while ($custom = <FILE>) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   425
					#skip blank lines and comments
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   426
			delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   427
					last unless ($custom =~ /^$|^\#/);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   428
            }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   429
            $custom = uc $custom;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   430
            unless ($custom =~ /^\s*CUSTOMIZES\s+(\S+)/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   431
				warn "warning: \"$File\" Invalid BSF specification - 'customizes' missing\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   432
				delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   433
				close FILE;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   434
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   435
            }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   436
		my $root = $1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   437
		my $platname = '';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   438
		my $CustomizedPlatName = '';		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   439
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   440
		# In v1 mode, ARMV5 platform implies ARMV5_ABIV1 platform listed in the platlist		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   441
		my $Armv5Flag = 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   442
		if (!$variantABIV2Keyword && $root =~ /^ARMV5$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   443
			$Armv5Flag = 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   444
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   445
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   446
		# Support for Hierarchy of Customizations (BSF file customization of another BSF file)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   447
		# 1. Check whether the BSF file customizes another BSF file.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   448
		# 2. If so, check whether the root BSF file has already been read.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   449
		# 3. If not read, then defer the current BSF file reading until the root file is read.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   450
		my $rootPlatFound = 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   451
		if (defined %{$Plat{$root}} || $Armv5Flag) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   452
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   453
			# BSF platform customizes another valid BSF platform
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   454
			if (defined $Plat{$root}{'CUSTOMIZES'}) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   455
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   456
				$rootPlatFound = 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   457
				$platname = $root;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   458
				$CustomizedPlatName = $root;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   459
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   460
				# Set the root platform name which is same as of customizes platform
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   461
				$Plat{$BSF}{'ROOTPLATNAME'} = $Plat{$root}{'ROOTPLATNAME'};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   462
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   463
			# BSF platform customizes to one of the existing ABI platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   464
			else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   465
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   466
				# All BPABI platforms inherits from ABIV2 platform listed in the platlist
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   467
				if (grep /^$root$/i, @BPABIPlats) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   468
					$platname = "ABIV2";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   469
				}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   470
				elsif ($Armv5Flag) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   471
				# In v1 mode, ARMV5 platform implies ARMV5_ABIV1 platform listed in the platlist
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   472
					$platname = "ARMV5_ABIV1";	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   473
				}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   474
				else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   475
					$platname = $root;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   476
				}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   477
				
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   478
				$CustomizedPlatName=$root;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   479
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   480
				# BSF File check Begins 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   481
				# The following check is included to handle the existing BSF files which has to behave in different manner
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   482
				# in default v1 mode and v2 mode. The following code changes the BSF name and the custmoized platform name
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   483
				# to the implied names. This is done to support switching between v1 and v2 modes by enabling the keyword in
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   484
				# the variant configuration file.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   485
				# In v1 mode, the ARMV6_ABIV1 => ARMV6 platform and ARMV6 => ARMV6_ABIV2 platform.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   486
				if (!$variantABIV2Keyword) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   487
					if ($BSF =~ /^ARMV6_ABIV1$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   488
						$BSF = "ARMV6";	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   489
						$CustomizedPlatName = "ARMV5";	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   490
					}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   491
					elsif ($BSF =~ /^ARMV6$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   492
						$BSF = "ARMV6_ABIV2";	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   493
						$CustomizedPlatName = "ARMV5_ABIV2";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   494
						$platname = "ABIV2";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   495
					}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   496
				}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   497
				# BSF File check Ends
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   498
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   499
				# Set the root platform name
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   500
				$Plat{$BSF}{'ROOTPLATNAME'} = $CustomizedPlatName;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   501
			}			
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   502
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   503
		else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   504
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   505
			my $rootbsf = $Path.$root.".bsf";			
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   506
			if ( -e $rootbsf ) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   507
				# BSF file customizes another BSF file which has not been read yet.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   508
				# So defer current BSF file reading until the root BSF file is read.				
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   509
				delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   510
				push(@BSFs, $BSF);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   511
				next;		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   512
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   513
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   514
		# If the customizes platform is not a valid BSF platform or BPABI platorm or ARMV5 or ARMV5_ABIV1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   515
		# then throw warning.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   516
		unless ($rootPlatFound || $root =~ /^ARMV5(_ABIV1)?$/ || (grep /^$root$/i, @BPABIPlats)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   517
			warn "warning: \"$File\" Invalid BSF specification - customization restricted to ARMV5, ABIv2 and valid BSF platforms\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   518
			close FILE;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   519
			delete $Plat{$BSF};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   520
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   521
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   522
			
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   523
		my ( $key, $value);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   524
		while (($key, $value) = each %{$Plat{$platname}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   525
			$Plat{$BSF}{$key}=$value;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   526
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   527
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   528
		push @{$Plat{$CustomizedPlatName}{'CUSTOMIZATIONS'}}, $BSF;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   529
		$Plat{$BSF}{'CUSTOMIZES'} = $CustomizedPlatName;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   530
		while (<FILE>) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   531
			next if (/^$|^\#/);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   532
			if (/^\s*SMP\s*$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   533
				$Plat{$BSF}{'SMP'} = 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   534
				$Plat{$BSF}{'StatLink'} = lc $BSF;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   535
				next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   536
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   537
			$Plat{$BSF}{'CUSTOMIZATION_DATA'} .= $_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   538
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   539
		# BSF file statements will have newline character("\n") at the end, except for the last statement.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   540
		# So append "\n" for the last BSF file statement.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   541
		# "\n" will be used to split BSF statements to support hierarchy of customizations.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   542
		$Plat{$BSF}{'CUSTOMIZATION_DATA'} .= "\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   543
		close FILE;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   544
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   545
	1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   546
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   547
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   548
sub Plat_Init ($) { # takes path to ASSP modules
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   549
	my ($Path)=@_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   550
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   551
	my %PlatHashKeys=(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   552
		ABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   553
		ASSPABI=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   554
		SINGLE=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   555
		Compiler=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   556
		CPU=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   557
		MakeMod=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   558
		MakeCmd=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   559
		OS=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   560
		DefFile=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   561
		ASSP=>1,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   562
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   563
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   564
#	Include the list of BPABI platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   565
	&Set_Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   566
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   567
	Init_BSFs($Path);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   568
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   569
#	get a list of modules
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   570
	opendir DIR, $Path;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   571
	my @_ASSPs=grep s/^([^\.].*)\.ASSP$/$1/, map { uc $_ } readdir DIR;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   572
	closedir DIR;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   573
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   574
	my @ASSPs;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   575
	foreach (@_ASSPs) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   576
		if (!$ENV{USEARMCC} and /EDG$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   577
#			warn(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   578
#				"Note: ASSP \"$_\" disabled\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   579
#			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   580
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   581
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   582
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   583
		push @ASSPs, $_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   584
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   585
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   586
#	open each module in turn, and add it to the array
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   587
	my $ASSP;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   588
	foreach $ASSP (@ASSPs) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   589
		my $File=$Path.$ASSP.'.assp';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   590
#		check whether the assp is already defined
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   591
		if (defined %{$Plat{$ASSP}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   592
			warn(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   593
				"$File : warning: ASSP \"$ASSP\" already defined\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   594
				" ... skipping this module\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   595
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   596
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   597
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   598
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   599
#		open the module
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   600
		unless (open FILE, $File) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   601
			warn "warning: Can't open assp module \"$File\"\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   602
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   603
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   604
		my %Data=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   605
		my %SingleData=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   606
		my $MatchingSingle="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   607
		my @Errors=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   608
		while (<FILE>) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   609
#			strip comments
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   610
			s/^([^#]*)#.*$/$1/o;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   611
#			skip blank lines
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   612
			if (/^\s*$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   613
				next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   614
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   615
#			get the key-value pair
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   616
			unless (/^\s*(\w+)\s+(\w+)\s*$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   617
				push @Errors, "$File($.) : warning: syntax error - only key-value pairs allowed\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   618
				next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   619
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   620
			my ($Key, $Val)=($1, $2);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   621
			if ($PlatHashKeys{$Key}!=1) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   622
				push @Errors, "$File($.) : warning: unrecognized keyword - $Key\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   623
				next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   624
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   625
			if ($Key eq "SINGLE") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   626
				$SingleData{Single} = 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   627
				$SingleData{ASSP} = $ASSP;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   628
				$MatchingSingle = uc $2;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   629
			} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   630
				$Data{$Key}=$Val;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   631
				$SingleData{$Key}=$Val;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   632
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   633
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   634
		close FILE;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   635
		if (@Errors) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   636
			warn(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   637
				@Errors,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   638
				" ... skipping this module\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   639
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   640
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   641
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   642
# change -  Allow ASSPs to pick up all the options of the ABI they specify, 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   643
# in particular the compiler they need.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   644
			$Data{'ASSP'} = $ASSP unless $Data{'ASSP'};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   645
			if ($Plat{$Data{'ABI'}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   646
			foreach (keys %{$Plat{$Data{'ABI'}}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   647
			$Data{$_} = $Plat{$Data{'ABI'}}{$_} unless ($_ =~ /^GENERIC$/i) or $Data{$_};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   648
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   649
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   650
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   651
		%{$Plat{$ASSP}}=%Data;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   652
		if ($MatchingSingle ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   653
			foreach (keys %Data) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   654
			$SingleData{$_} = $Data{$_} unless ($_ =~ /^GENERIC$/i) or $SingleData{$_};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   655
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   656
			%{$Plat{$MatchingSingle}}=%SingleData;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   657
		}			
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   658
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   659
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   660
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   661
sub Plat_GetL ($$$$) { # takes Platform name, ref to plat hash, ref to bldmacrohash, bldmake plat command notifier
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   662
	my ($Candidate,$PlatHash_ref,$BldMacrosHash_ref,$platcommand)=@_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   663
	$Candidate=uc $Candidate;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   664
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   665
# is platform in our list?
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   666
	unless (defined $Plat{$Candidate}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   667
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   668
		# is platform BPABI compliant one?
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   669
		if (!$variantABIV2Keyword && $Candidate eq 'ARMV5') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   670
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   671
		elsif (not(grep /^$Candidate$/i, @BPABIPlats))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   672
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   673
			die "ERROR: Platform \"$Candidate\" not supported\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   674
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   675
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   676
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   677
	my $BPABIPlat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   678
	my %PlatHash=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   679
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   680
# check the data
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   681
# All BPABI platforms inherit ABIV2 properties 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   682
	if (grep /^$Candidate$/i, @BPABIPlats) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   683
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   684
		$BPABIPlat='ABIV2';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   685
		%PlatHash=%{$Plat{$BPABIPlat}};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   686
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   687
# In v1 mode, ARMV5 platform implies ARMV5_ABIV1 platform listed in the platlist
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   688
	elsif (!$variantABIV2Keyword && $Candidate eq 'ARMV5') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   689
		%PlatHash=%{$Plat{ARMV5_ABIV1}};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   690
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   691
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   692
		%PlatHash=%{$Plat{$Candidate}};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   693
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   694
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   695
# set the defaults
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   696
	$PlatHash{Name}=$Candidate;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   697
	$PlatHash{Real}=$PlatHash{Name} unless $PlatHash{Real};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   698
	$PlatHash{Ext}=".$PlatHash{Real}" unless $PlatHash{Ext};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   699
	$PlatHash{ASSP}=$PlatHash{Real} unless $PlatHash{ASSP};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   700
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   701
# Get the root platform name to support hierarchy of customizations
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   702
	my $CustomizedPlat=$PlatHash{'ROOTPLATNAME'};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   703
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   704
	if ((defined($Candidate)  && ($Candidate =~ /^ARMV5/i)) || (defined($CustomizedPlat) && ($CustomizedPlat =~ /^ARMV5/i))) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   705
# Compiler name should be set as ARMCC for all ARMV5 platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   706
		$PlatHash{Compiler}='ARMCC';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   707
		$PlatHash{Toolchain}='rvct22';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   708
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   709
	elsif ($BPABIPlat) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   710
# Compiler name should be set as that of platform name for all BPABI platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   711
		$PlatHash{Compiler}=$Candidate;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   712
		$PlatHash{Toolchain}=$Candidate;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   713
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   714
	elsif ($CustomizedPlat) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   715
# Compiler name should be set as that of the customized platform name incase of customization
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   716
		$PlatHash{Compiler}=$CustomizedPlat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   717
		$PlatHash{Toolchain}=$CustomizedPlat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   718
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   719
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   720
	$PlatHash{Compiler}='GCC32' unless $PlatHash{Compiler};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   721
	$PlatHash{OS}='EPOC32' unless $PlatHash{OS};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   722
	$PlatHash{MakeMod}='Cl_gcc' unless $PlatHash{MakeMod};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   723
	$PlatHash{MakeCmd}='make' unless $PlatHash{MakeCmd};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   724
	$PlatHash{CPU}='MARM' unless $PlatHash{CPU};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   725
	$PlatHash{Single}=0 unless $PlatHash{Single};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   726
	$PlatHash{UsrHdrsOnly}=0 unless $PlatHash{UsrHdrsOnly};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   727
	$PlatHash{Generic}=0 unless $PlatHash{Generic}; # generic means "for a target device but no particular ASSP"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   728
	$PlatHash{SupportsMultiplePlatforms}=0 unless $PlatHash{SupportsMultiplePlatforms};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   729
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   730
	$PlatHash{ABI}='ARMI' unless $PlatHash{ABI};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   731
	$PlatHash{ASSPABI}='ARM4' unless defined $PlatHash{ASSPABI};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   732
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   733
	unless (defined $PlatHash{DefFile}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   734
		if ($PlatHash{Compiler} eq 'VC32') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   735
			$PlatHash{DefFile}='WINS';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   736
		} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   737
			$PlatHash{DefFile}='MARM';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   738
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   739
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   740
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   741
# .MMP macros - keeping the order is useful
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   742
	@{$PlatHash{MmpMacros}}=$PlatHash{Compiler};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   743
	push @{$PlatHash{MmpMacros}}, $PlatHash{OS};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   744
	push @{$PlatHash{MmpMacros}}, $PlatHash{CPU} unless $PlatHash{CPU} eq $PlatHash{OS};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   745
	push @{$PlatHash{MmpMacros}}, $PlatHash{ASSP} unless $PlatHash{ASSP}=~/^($PlatHash{CPU}|$PlatHash{OS})$/;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   746
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   747
	if ($PlatHash{Single}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   748
		push @{$PlatHash{MmpMacros}}, 'SINGLE';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   749
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   750
	if ($PlatHash{SMP}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   751
		push @{$PlatHash{MmpMacros}}, 'SMP';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   752
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   753
	if ($PlatHash{EABI}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   754
		push @{$PlatHash{MmpMacros}}, 'EABI';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   755
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   756
	if ($PlatHash{Compiler} eq 'VC32') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   757
		my $MSVCVer = &Winutl_MSVCVer($platcommand);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   758
		my $MSVCSubVer = &Winutl_MSVCSubVer($platcommand);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   759
		push @{$PlatHash{MmpMacros}}, 'MSVC'.$MSVCVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   760
		push @{$PlatHash{MmpMacros}}, 'MSVC'.$MSVCVer.$MSVCSubVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   761
		if ($MSVCVer > 6) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   762
			push @{$PlatHash{MmpMacros}}, 'MSVCDOTNET';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   763
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   764
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   765
	if ($PlatHash{Compiler} eq 'ARMCC') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   766
		my ($MajVer, $MinVer) = RVCT_plat2set::get_version_list($Candidate);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   767
		push @{$PlatHash{MmpMacros}}, 'ARMCC_'.$MajVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   768
		push @{$PlatHash{MmpMacros}}, 'ARMCC_'.$MajVer.'_'.$MinVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   769
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   770
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   771
	if ($PlatHash{Compiler} eq 'X86GCC') {	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   772
			push @{$PlatHash{MmpMacros}}, 'GCC32';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   773
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   774
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   775
	## TOOLS2 Specific Macros ##
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   776
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   777
	if ($PlatHash{Compiler} eq 'GCC32') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   778
		push @{$PlatHash{MmpMacros}}, 'MINGW32';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   779
		push @{$PlatHash{MmpMacros}}, '_STLP_LITTLE_ENDIAN';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   780
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   781
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   782
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   783
    # add GCCXML to the mmp macro list, so we can filter out stuff in bld.inf files and mmps.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   784
    # note that this mean that __GCCXML__ is automacally routed to makefile, so we can take out explicit call. 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   785
    if( $PlatHash{Name} eq "GCCXML") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   786
        push @{$PlatHash{MmpMacros}}, 'GCCXML';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   787
    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   788
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   789
# add specific platform macros for platforms customising others.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   790
	if (Plat_Customizes($PlatHash{Name})) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   791
		push @{$PlatHash{MmpMacros}}, $PlatHash{Name} unless grep /$PlatHash{Name}/, @{$PlatHash{MmpMacros}};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   792
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   793
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   794
# compilation macros
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   795
	@{$PlatHash{Macros}}=@EpocMacros;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   796
	foreach (@{$PlatHash{MmpMacros}}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   797
		## If STLP_LTTLE_ENDIAN is used, then dont append __ to the macro name ##
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   798
		if ($_ =~ m/STLP_LITTLE_ENDIAN/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   799
			push @{$PlatHash{Macros}}, $_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   800
		} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   801
		push @{$PlatHash{Macros}}, '__'.$_.'__';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   802
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   803
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   804
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   805
#	extra special .MMP macros which aren't applied for compilation
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   806
	if ($PlatHash{Generic}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   807
		push @{$PlatHash{MmpMacros}}, "GENERIC_$PlatHash{CPU}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   808
		if ($PlatHash{CPU} eq 'MARM') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   809
#			we can't define this for ASSP platforms because we won't be sure what
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   810
#			the ABI is until we've processed the .MMP file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   811
			push @{$PlatHash{MmpMacros}}, "MARM_$PlatHash{ABI}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   812
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   813
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   814
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   815
# builds
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   816
	@{$PlatHash{Blds}}=@{$BldLists{$PlatHash{OS}}};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   817
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   818
# output some information
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   819
	if ($Mode{Verbose}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   820
		print
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   821
			"Platform         $PlatHash{Name}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   822
			"Real Name        $PlatHash{Real}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   823
			"Compiler         $PlatHash{Compiler}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   824
			"OS               $PlatHash{OS}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   825
			"CPU              $PlatHash{CPU}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   826
			"ASSP             $PlatHash{ASSP}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   827
			"ABI              $PlatHash{ABI}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   828
			"ASSPABI          $PlatHash{ASSPABI}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   829
			"Makefile Module  $PlatHash{MakeMod}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   830
			"Makefile Type    $PlatHash{MakeCmd}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   831
			"MMP Macros       @{$PlatHash{MmpMacros}}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   832
			"Macros           @{$PlatHash{Macros}}\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   833
			"Blds             @{$PlatHash{Blds}}\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   834
		;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   835
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   836
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   837
	%{$PlatHash_ref}=%PlatHash;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   838
	%{$BldMacrosHash_ref}=%BldMacros;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   839
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   840
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   841
sub Plat_List () {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   842
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   843
#	Include the list of BPABI platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   844
	&Set_Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   845
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   846
#	return list of supported platforms
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   847
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   848
	#sort keys %Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   849
	my @PlatList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   850
	my $Key;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   851
	foreach $Key (keys %Plat) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   852
		if (!$variantABIV2Keyword && $Key =~ /^armv5_abiv1$/i) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   853
			$Key = 'ARMV5';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   854
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   855
		unless (grep /^$Key$/i, @PlatList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   856
			push @PlatList, $Key;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   857
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   858
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   859
	return @PlatList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   860
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   861
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   862
sub Plat_AssocIDE ($$) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   863
#	return the IDE associated with a "Real" platform if there is one
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   864
	my ($Candidate, $AssocIDEs)=@_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   865
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   866
	unless (defined $Plat{$Candidate}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   867
		die "ERROR: Platform \"$Candidate\" not supported\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   868
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   869
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   870
	my $Key;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   871
	foreach $Key (keys %Plat) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   872
		if (${Plat{$Key}}{Real}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   873
			if (${Plat{$Key}}{Real} eq $Candidate) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   874
				push @$AssocIDEs, $Key;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   875
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   876
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   877
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   878
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   879
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   880
1;