sbsv1/abld/platform/cl_edg.pm
author Zheng Shen <zheng.shen@nokia.com>
Tue, 20 Jul 2010 15:02:28 +0800
changeset 617 3a747a240983
parent 599 fa7a3cc6effd
permissions -rw-r--r--
ROM Tools 12.2.0.4 Postlinker 2.2.5 Revert package_definition.xml to changeset 360bd6b35136
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2004-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
# Cl_edg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
# 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
package Cl_edg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
require Exporter;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
@ISA=qw(Exporter);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
@EXPORT=qw(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
	PMHelp_Mmp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
	PMStartBldList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
	PMBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
	PMStartSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
	PMStartSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
	PMSrcDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
	PMSrcBldDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
	PMEndSrcBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
	PMEndSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
	PMEndSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
use cl_generic;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
use Genutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
use File::Path;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
use Cwd;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
sub PMHelp_Mmp {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
	print "// No additional keywords for this platform\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
my $epocroot = $ENV{EPOCROOT};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
$epocroot=~ s-\\$--;            # chop trailing \\
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
my $Makecmd;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
sub PMStartBldList($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
	($Makecmd) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
	my @ChopRTWSysIncPaths=&main::Path_Chop(&main::Path_RltToWork(&main::SysIncPaths)); # old style
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
	my @ChopRTWUserIncPaths=&main::Path_Chop(&main::Path_RltToWork(&main::UserIncPaths)); # old style
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
	my $RelPath="$epocroot\\EPOC32\\RELEASE";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
	my $RPath = &main::Path_RltToWork($RelPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	my @MacroList=&main::MacroList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
	my $VariantFile=&main::VariantFile();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
	my $DPath = &main::Path_RltToWork($epocroot);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
	my $DefFile = &main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
	my $EABIDefFile = &main::EABIDef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
    my $EdgSysIncludeList = "Edg_sysinc_list.txt";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
    my $EdgUserIncludeList = "Edg_userinc_list.txt";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
    my $EdgUdebReportList = "Edg_udeb_rep_list.txt";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
    my $EdgUrelReportList = "Edg_urel_rep_list.txt";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
	&Generic_Header(0,$Makecmd);	# define standard things using relative paths
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
	# EDG report file generation
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
		"GXPTRGUDEB = $RPath\\EDG\\UDEB\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
		"GXPTRGUREL = $RPath\\EDG\\UREL\n\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
		"DEFFILE = $DefFile\n\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
        "EABIDEFFILE = $EABIDefFile\n\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
		"EDG_SYSINC_LIST=\${EPOCBLD}\\..\\..\\", $EdgSysIncludeList,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
		"EDG_USERINC_LIST=\${EPOCBLD}\\..\\..\\", $EdgUserIncludeList,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
		"EDG_UREL_REP_LIST=\${EPOCBLD}\\..\\..\\",$EdgUrelReportList,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
		"EDG_UDEB_REP_LIST=\${EPOCBLD}\\..\\..\\", $EdgUdebReportList,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
		"\n\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
		"INCDIR ="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    87
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    88
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    89
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
	foreach (@ChopRTWUserIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    92
			" --include_directory \"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    93
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    94
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    95
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    96
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    97
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    98
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    99
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   100
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   101
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   102
		"SYSINCDIR ="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   103
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   104
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   105
	foreach (@ChopRTWSysIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   106
	     &main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   107
			" --sys_include \"$_\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   108
	     );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   109
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   110
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   111
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   112
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   113
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   114
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   115
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   116
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   117
	my $preinclude =   "--preinclude \$(EPOCINC)\\edg\\edg3_7_rvct2_2.h";#this is the variant line you must change to "simulate" another compiler.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   118
	&main::Output( 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   119
		"GCCFLAGS = --wchar_t_keyword --no_code_gen --exceptions --no_warnings",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   120
		" ${preinclude}",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   121
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   122
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   123
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   124
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   125
		"GCCDEFS = -D __MARM_THUMB__ -D __MARM_INTERWORK__ -D __ARMCC__ -D __EPOC32__ -D __MARM__ -D __EABI__ -D __ARMCC_2__ -D __ARMCC_2_2__ -D __SUPPORT_CPP_EXCEPTIONS__  -D IMPORT_C= -D EXPORT_C= -D __softfp="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   126
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   127
	foreach(@MacroList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   128
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   129
			" -D $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   130
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   131
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   132
	if($VariantFile){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   133
	    &main::Output(" -D __PRODUCT_INCLUDE__=\\\"${VariantFile}\\\"");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   134
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   135
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   136
		" \$(USERDEFS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   137
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   138
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   139
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   140
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   141
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   142
			"GCC$_ = cpfe"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   143
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   144
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   145
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   146
			' $(GCCFLAGS)'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   147
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   148
		foreach (&main::MacroList($_)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   149
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   150
				" -D $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   151
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   152
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   153
                
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   154
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   155
			" \$(GCCDEFS)\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   156
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   157
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   158
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   159
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   160
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   161
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   162
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   163
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   164
			"LIBRARY:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   165
			"\t\@echo Nothing to do\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   166
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   167
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   168
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   169
		"RESOURCEUREL:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   170
		"\t\@echo Nothing to do\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   171
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   172
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   173
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   174
		"RESOURCEUDEB:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   175
		"\t\@echo Nothing to do\n\n\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   176
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   177
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   178
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   179
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   180
			"$_ :"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   181
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   182
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   183
		if ($BasicTrgType !~ /IMPLIB/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   184
			my $TrgBase = &main::Path_Split('base',$Trg);           
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   185
			&main::Output (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   186
			" \\\n\t",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   187
			&Generic_Quote("\$(GXPTRG$_)\\$TrgBase.gxp")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   188
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   189
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   190
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   191
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   192
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   193
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   194
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   195
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   196
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   197
sub PMBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   198
	my @ASSPLibList=&main::ASSPLibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   199
	my @SrcList=&main::SrcList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   200
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   201
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   202
	my $ChopBldPath=&main::Path_Chop(&main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   203
	my $EPOCIncPath=&main::EPOCIncPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   204
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   205
	my $ChopRelPath=&main::Path_Chop(&main::RelPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   206
	my $RelPath=&main::RelPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   207
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   208
	my $TrgType=&main::TrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   209
	my @UidList=&main::UidList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   210
	# DefFile
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   211
	my $DefFile = &main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   212
	# EABIDefFile
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   213
	my $EABIDefFile = &main::EABIDef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   214
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   215
	# REAL TARGETS
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   216
	#-------------
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   217
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   218
		"# REAL TARGET - BUILD VARIANT $Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   219
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   220
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   221
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   222
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   223
		"WHAT$Bld : WHATGENERIC\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   224
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   225
		"CLEAN$Bld : CLEANBUILD$Bld CLEANRELEASE$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   226
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   227
		"CLEANBUILD$Bld : \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   228
		"\t\@perl -S ermdir.pl \"\$(EPOCBLD$Bld)\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   229
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   230
		"CLEANRELEASE$Bld : CLEANGENERIC CLEANEDGTEMPFILES$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   231
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   232
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   233
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   234
	&main::Output("CLEANEDGTEMPFILES$Bld :\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   235
			"\t\-\$(ERASE) \$(EDG_SYSINC_LIST) ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   236
			"\$(EDG_USERINC_LIST) ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   237
			"\$(EDG_${Bld}_REP_LIST) "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   238
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   239
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   240
	my @releaseables;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   241
	&Generic_WhatCleanTargets($Bld, "WHAT$Bld", "CLEANRELEASE$Bld", @releaseables);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   242
	&Generic_MakeWorkDir("MAKEWORK$Bld",$ChopBldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   243
	&Generic_MakeWorkDir("MAKEWORK$Bld",$ChopRelPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   244
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   245
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   246
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   247
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   248
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   249
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   250
	# XML Stuff
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   251
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   252
				&Generic_Quote("\$(GXPTRG$Bld)\\$BaseTrg.gxp"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   253
				&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.gxp"),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   254
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   255
	my @ChopRTWSysIncPaths=&main::Path_Chop(&main::Path_RltToWork(&main::SysIncPaths)); # old style
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   256
	foreach my $incPath (@ChopRTWSysIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   257
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   258
		"\n\t\@echo $incPath >> \$(EDG_SYSINC_LIST)",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   259
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   260
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   261
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   262
	my @ChopRTWUserIncPaths=&main::Path_Chop(&main::Path_RltToWork(&main::UserIncPaths)); # old style
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   263
	foreach my $incPath (@ChopRTWUserIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   264
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   265
		"\n\t\@echo $incPath >> \$(EDG_USERINC_LIST)",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   266
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   267
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   268
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   269
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   270
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   271
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   272
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   273
        
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   274
	# TARGET *.GXP
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   275
	#------------
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   276
	if (scalar @SrcList >150) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   277
		# deal with very long lists by splitting them into 150 file pieces, which allows
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   278
		# about 200 bytes per filename if the underlying max size is 32K
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   279
		#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   280
        
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   281
		my $counter1=150;	# i.e. trigger new variable immediately
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   282
		my $counter2=0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   283
		my @objvarlist=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   284
		foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   285
			if ($counter1==150) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   286
				$counter1=0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   287
				$counter2++;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   288
				my $objvar = "OBJECTS$Bld$counter2";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   289
				push @objvarlist, " \$($objvar)";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   290
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   291
					"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   292
					"$objvar="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   293
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   294
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   295
			my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   296
			my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   297
                        next if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   298
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   299
				" \\\n\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc$Ext.aut")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   300
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   301
			$counter1++;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   302
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   303
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   304
        &main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   305
			"\n\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   306
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   307
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   308
		# shorter lists remain unchanged
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   309
		#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   310
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   311
			"OBJECTS$Bld="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   312
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   313
                foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   314
			my $BaseSource = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   315
			my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   316
                        next if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   317
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   318
			" \\\n\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSource$Ext.aut")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   319
			);  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   320
		}       
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   321
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   322
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   323
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   324
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   325
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   326
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   327
		&main::Output("RESOURCEINFO$Bld=");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   328
		&main::Output("\n\n");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   329
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   330
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   331
            
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   332
			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg.gxp"), " : \$(OBJECTS$Bld) \$(EABIDEFFILE) \$(RESOURCEINFO$Bld)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   333
			"\n\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   334
		);
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
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   338
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   339
sub PMStartSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   340
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   341
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   342
		"# SOURCES\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   343
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   344
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   345
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   346
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   347
sub PMStartSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   348
	my $Src=&main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   349
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   350
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   351
		"# Source $Src\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   352
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   353
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   354
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   355
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   356
sub PMSrcDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   357
	my @BldList=&main::BldList;	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   358
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   359
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   360
	my $ExtSrc=&main::ExtSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   361
	my $cia = (lc($ExtSrc) eq '.cia') ? "_" : "";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   362
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   363
	return if (@DepList == 0);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   364
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   365
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   366
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   367
			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc$cia.lis"), " ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   368
			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc$cia.aut"), " \\\n",
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   372
		":"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   373
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   374
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   375
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   376
		" \\\n\t", &Generic_Quote($_)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   377
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   378
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   379
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   380
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   381
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   382
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   383
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   384
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   385
sub PMSrcBldDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   386
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   387
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   388
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   389
	my $ExtSrc=&main::ExtSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   390
    my $cia = (lc($ExtSrc) eq '.cia') ? "" : "";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   391
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   392
	return if (@DepList == 0);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   393
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   394
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   395
		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc$cia.lis"), " ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   396
		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc$cia.aut"), " :",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   397
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   398
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   399
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   400
			" \\\n\t", &Generic_Quote($_)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   401
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   402
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   403
	&main::Output( 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   404
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   405
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   406
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   407
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   408
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   409
my %sources;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   410
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   411
sub PMEndSrcBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   412
	my $ABI=&main::ABI;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   413
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   414
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   415
	my $Src=ucfirst lc &main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   416
	my $SrcPath=&main::SrcPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   417
	my $Ext = &main::Path_Split('Ext', $Src);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   418
	my $Cia = (lc($Ext) eq '.cia') ? 1 : 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   419
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   420
	my $RTWSrcPath=&main::Path_Chop(&main::Path_RltToWork($SrcPath));
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   421
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   422
	# add source path, source file and build type to hashmap. 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   423
    $sources{$SrcPath}{$Src}{$Bld}=1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   424
   
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   425
	# Use GCC trick to get assembler source files preprocessed with CPP
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   426
	$Src =~ s/\.s$/.S/i;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   427
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   428
	@browser = ();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   429
	my $EdgReportFile = "\$(EDG_UREL_REP_LIST)";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   430
	if($Bld =~ /udeb/i){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   431
		$EdgReportFile = "\$(EDG_UDEB_REP_LIST)";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   432
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   433
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   434
	if ($Cia) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   435
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   436
			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.aut"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   437
			&Generic_Quote("$SrcPath$Src"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   438
			"\t\$(GCC$Bld) -D __CIA__ --include_directory \"$RTWSrcPath\" \$(INCDIR) --xref \"\$\@\" \"$RTWSrcPath\\$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   439
		"\t\@echo \"\$\<\" >> $EdgReportFile\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   440
		"\n");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   441
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   442
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   443
                my $BldPath=&main::BldPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   444
                my $EdgReportFilePath=UpDir(UpDir(UpDir($BldPath)));
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   445
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   446
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   447
			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc$Ext.aut"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   448
			&Generic_Quote("$SrcPath$Src"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   449
			"\t\$(GCC$Bld) --include_directory \"$RTWSrcPath\" \$(INCDIR) \$(SYSINCDIR) --xref \"\$\@\" \"$RTWSrcPath\\$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   450
			"\t\@echo \$(EPOCBLD$Bld)\\$BaseSrc$Ext.aut >> $EdgReportFile\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   451
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   452
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   453
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   454
		foreach $browser (@browser)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   455
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   456
		 print "$browser\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   457
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   458
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   459
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   460
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   461
sub PMEndSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   462
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   463
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   464
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   465
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   466
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   467
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   468
sub PMEndSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   469
		&Generic_End;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   470
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   471
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   472
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   473
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   474
sub UpDir($)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   475
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   476
	my ($aPath) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   477
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   478
	my $lastChar = substr($aPath,-1);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   479
	my $end = length($aPath)-1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   480
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   481
	if ( ($lastChar eq '\\') || ($lastChar eq '/') )
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   482
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   483
		$end -= 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   484
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   485
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   486
	my $last = rindex($aPath,'\\',$end);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   487
	if ( (rindex($aPath,'/',$end)>$last) | ($last == -1) )
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   488
		{ $last = rindex($aPath,'/',$end); }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   489
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   490
	if ($last == -1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   491
		{ return ""; }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   492
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   493
		{ return substr($aPath,0,$last).'/'; }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   494
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   495
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   496
1;