sbsv1/abld/platform/cl_vscw.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) 2001-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
#
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
package Cl_vscw;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
# declare variables global for module
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
my @Win32LibList=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
my $Win32StdHeaders;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
my $BaseAddressFlag;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
my $Win32Resrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
my $MWCC;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
my $MWLD;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
my $MWIncludePath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
my $MWIncludeVar;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
# declare variables global for VS6
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
my %IdeBlds=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
my %PrjHdrs=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
my $DspText='';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
my $VcprojText='';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
my $PlatName=&main::PlatName;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
my $guid='';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
require Exporter;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
@ISA=qw(Exporter);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
@EXPORT=qw(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
	PMHelp_Mmp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
	PMCheckPlatformL
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
	PMPlatProcessMmp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
	PMStartBldList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
		PMBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
	PMStartSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
		PMBitMapBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
		PMResrcBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
		PMAifBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
		PMDoc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
		PMStartSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
		PMSrcDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
			PMSrcBldDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
			PMEndSrcBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
		PMEndSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
	PMEndSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
use Winutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
use cl_generic;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
use E32Variant;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
use lockit_info;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
sub RoundUp1k($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
	# Accept C hexadecimal number (0xNNN).  Convert argument to Kb
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
	# rounded up to the next 1kb boundary.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
	use integer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
	return (hex($_[0]) + 1023) / 1024;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
sub PMHelp_Mmp {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
	&Winutl_Help_Mmp;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
sub SysTrg () {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
	return 1 if &main::SystemTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
	return 1 if ($ExportLibrary =~ /EKERN/i);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
	return 1 if ($Trg =~ /KSRT/i);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
	return 0;
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
sub PMCheckPlatformL {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91
	# check version of CodeWarrior for Symbian OS
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    92
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    93
	if (defined($ENV{MWCSym2Includes})) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    94
		$MWCC = "mwccsym2.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    95
		$MWLD = "mwldsym2.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    96
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    97
	if (!defined($MWCC) && defined($ENV{MWSym2Libraries})) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    98
		$MWCC = "mwccsym2.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    99
		$MWLD = "mwldsym2.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   100
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   101
	if (!defined($MWCC) && defined($ENV{CWFolder})) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   102
		$MWCC = "mwcc.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   103
		$MWLD = "mwld.exe";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   104
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   105
	if (!defined($MWCC)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   106
		die "ERROR: Unable to identify a valid CodeWarrior for Symbian OS installation\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   107
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   108
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   109
	# determine default include path
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   110
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   111
	$MWIncludeVar = 'MWCIncludes';	# default, even if it doesn't exist
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   112
	$MWIncludePath = '';			# default is empty
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   113
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   114
	foreach my $var ('MWCSym2Includes','MWCWinx86Includes','MWCIncludes') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   115
		if (defined($ENV{$var})) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   116
			$MWIncludePath = $ENV{$var};
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   117
			$MWIncludeVar = $var;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   118
			last;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   119
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   120
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   121
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   122
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   123
sub PMPlatProcessMmp (@) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   124
	&Winutl_DoMmp(\@_, $MWIncludePath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   125
	$BaseAddressFlag=&Winutl_BaseAddress;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   126
	if ($BaseAddressFlag ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   127
		$BaseAddressFlag=" -imagebase \"$BaseAddressFlag\"";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   128
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   129
	@Win32LibList=&Winutl_Win32LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   130
	$Win32Resrc=&Winutl_Win32Resrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   131
	$Win32StdHeaders=&Winutl_Win32StdHeaders;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   132
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   133
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   134
sub PMStartBldList($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   135
	my ($makecmd) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   136
	my $AifStructRef=&main::AifStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   137
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   138
	my $BitMapStructRef=&main::BitMapStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   139
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   140
	my @ChopSysIncPaths=&main::Path_Chop(&main::SysIncPaths);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   141
	my @ChopUserIncPaths=&main::Path_Chop(&main::UserIncPaths);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   142
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   143
	my $NoExportLibrary=&main::NoExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   144
	my $DefFile=&main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   145
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   146
	my $LibPath=&main::LibPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   147
	my @MacroList=&main::MacroList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   148
	push @MacroList, "__SUPPORT_CPP_EXCEPTIONS__";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   149
	my $VariantFile=&main::VariantFile();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   150
	my $ResourceStructRef=&main::ResourceStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   151
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   152
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   153
	my $TrgType=&main::TrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   154
	my $WarningLevel=&main::CompilerOption("CW");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   155
	my $LinkAs=&main::LinkAs;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   156
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   157
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   158
			"PATH=$ENV{EPOCROOT}epoc32\\tools\\;$ENV{PATH}",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   159
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   160
			"Path=\$(PATH)",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   161
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   162
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   163
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   164
# Get the drive letter to call the Lada compiler to call it with absolute path
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   165
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   166
			"COMPILER_PATH=\"$ENV{EPOCROOT}epoc32\\tools\\nokia_compiler\\Symbian_Tools\\Command_Line_Tools\\\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   167
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   168
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   169
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   170
	Generic_Header(0,$makecmd);	# define standard things using absolute paths
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   171
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   172
	my $TrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   173
	my $AifTrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   174
	if (&Generic_Definition("TRGDIR") ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   175
		$TrgDir="\$(TRGDIR)\\";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   176
		$AifTrgDir=$TrgDir;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   177
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   178
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   179
# Handle migration of binaries to secure location
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   180
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   181
	&Winutl_AdjustTargetPath(\$TrgDir);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   182
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   183
# Change - mwwinrc.exe uses MWWinx86Includes or MWCIncludes, but some installations
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   184
# fail to install either. Set MWCIncludes from the chosen variable as part
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   185
# of the Makefile.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   186
	if (!defined($ENV{MWCIncludes}) && $MWIncludeVar ne 'MWCIncludes') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   187
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   188
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   189
			"MWCIncludes:=\$($MWIncludeVar)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   190
			"export MWCIncludes\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   191
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   192
		);
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
	my $CompilerLibPath="$ENV{EPOCROOT}epoc32\\tools\\nokia_compiler\\Symbian_Support\\Runtime\\Runtime_x86\\Runtime_Win32\\Libs;$ENV{EPOCROOT}epoc32\\tools\\nokia_compiler\\Symbian_Support\\Win32-x86 Support\\Libraries\\Win32 SDK";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   196
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   197
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   198
		"MWLibraries:=\+$CompilerLibPath\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   199
		"export MWLibraries\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   200
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   201
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   202
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   203
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   204
		"MWLibraryFiles:=gdi32.lib;user32.lib;kernel32.lib;\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   205
		"export MWLibraryFiles\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   206
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   207
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   208
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   209
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   210
		"# EPOC DEFINITIONS\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   211
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   212
		"INCDIR  = -cwd source -i-"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   213
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   214
	foreach (@ChopUserIncPaths,@ChopSysIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   215
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   216
			" \\\n -i \"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   217
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   218
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   219
	use Pathutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   220
	if($VariantFile){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   221
	    my $variantFilePath = Path_Split('Path',$VariantFile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   222
	    $VariantFile  = Path_Split('FILE',$VariantFile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   223
	    # workaround for codewarrior defect:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   224
	    # codewarrior at the moment doesn't accept an absolute path with the
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   225
	    # the -include option unless it contains a drive letter, this is solved
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   226
	    # by including the directory and the file separately
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   227
	    &main::Output("\\\n -i \"$variantFilePath \" -include \"$VariantFile\"");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   228
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   229
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   230
		"\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(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   235
		"CWFLAGS =",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   236
		" -wchar_t off",	# do not treat wchar_t as a predefined type
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   237
		" -align 4",		# long alignment
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   238
		" -warnings on",	# selection of warnings
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   239
		" -w nohidevirtual",	# turn off "hides inherited virtual function" warning
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   240
		   ",nounusedexpr",	# turn off "expression has no side effect" warning
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   241
		" -enum int",		# use int for enumeration types
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   242
		" -str pool",		# pool strings into a single data object
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   243
		" -exc ms",			# SEH C++ exception implementation
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   244
		" $WarningLevel"		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   245
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   246
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   247
	if ($Win32StdHeaders or &main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   248
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   249
			" -stdinc"		# insist because mwccsym2 has -nostdinc as the default(?)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   250
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   251
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   252
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   253
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   254
			" -nostdinc"	# insist because mwcc has -stdinc as the default.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   255
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   256
	}
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",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   259
		"\n"
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   263
		"CWDEFS  = "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   264
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   265
	foreach(@MacroList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   266
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   267
			" -d \"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   268
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   269
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   270
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   271
		" \$(USERDEFS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   272
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   273
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   274
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   275
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   276
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   277
			"CW$_ = perl -S err_formatter.pl \$(COMPILER_PATH)$MWCC -msgstyle parseable "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   278
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   279
		if (/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   280
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   281
			if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   282
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   283
					' -sym codeview'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   284
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   285
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   286
			else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   287
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   288
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   289
					' -sym codeview_new'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   290
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   291
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   292
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   293
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   294
#			euser change to apply inlining on the _NAKED functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   295
			if ($BaseTrg!~/^EUSER$/oi) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   296
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   297
					' -inline off'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   298
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   299
			}	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   300
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   301
		elsif (/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   302
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   303
				' -O4,s'	# highest level of optimisation, optimise for space
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   304
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   305
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   306
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   307
			' $(CWFLAGS)'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   308
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   309
		foreach (&main::MacroList($_)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   310
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   311
				" -d $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   312
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   313
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   314
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   315
			" \$(CWDEFS) \$(INCDIR)\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   316
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   317
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   318
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   319
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   320
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   321
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   322
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   323
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   324
		&main::Output(
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
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   328
		if ($BasicTrgType !~ /IMPLIB/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   329
			&main::Output (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   330
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   331
				"\t", &Generic_Quote("\$(EPOCTRG$_)\\$TrgDir$Trg")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   332
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   333
			if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   334
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   335
					" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   336
					"\t", &Generic_Quote("\$(EPOCTRG$_)\\$Trg")
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
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   340
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   341
#		lib has to come after the main target so that a .DEF file will be generated if the project is not frozen
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   342
		if ($DefFile and not &main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   343
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   344
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   345
				"\tLIBRARY\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   346
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   347
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   348
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   349
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   350
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   351
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   352
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   353
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   354
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   355
		my $makework="MAKEWORK$_";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   356
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   357
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   358
			"RESOURCE$_ : $makework"
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
		my $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   362
		foreach $BitMapRef (@$BitMapStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   363
			my $file="\$(EPOCTRG$_)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   364
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   365
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   366
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   367
				"\t", &Generic_Quote($file)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   368
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   369
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   370
		undef $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   371
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   372
		my $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   373
		foreach $ResourceRef (@$ResourceStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   374
			my $file="\$(EPOCTRG$_)\\$$ResourceRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   375
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   376
			&main::Output(	# must come before main target because source for target will depend on the
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   377
			" \\\n",		# *.rsg file in $EPOCIncPath
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   378
			"\t", &Generic_Quote("$file")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   379
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   380
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   381
		undef $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   382
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   383
		my $AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   384
		foreach $AifRef (@$AifStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   385
			my $file="\$(EPOCTRG$_)\\$AifTrgDir$$AifRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   386
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   387
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   388
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   389
				"\t", &Generic_Quote($file)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   390
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   391
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   392
		undef $AifRef;
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
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   396
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   397
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   398
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   399
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   400
		"\n",
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
		"# REAL TARGET - LIBRARY\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   406
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   407
		"LIBRARY : MAKEWORKLIBRARY"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   408
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   409
	if ($BasicTrgType=~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   410
#		code to ensure that the static libraries for all builds are built at the library stage
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   411
		foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   412
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   413
				" $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   414
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   415
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   416
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   417
	elsif ($DefFile and !$NoExportLibrary) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   418
		unless (&main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   419
			if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   420
				my $LibLinkAs = ($BasicTrgType=~/^IMPLIB$/io) ? $LinkAs : $Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   421
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   422
					" ", &Generic_Quote("\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   423
					"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   424
					&Generic_Quote("\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   425
					&Generic_Quote($DefFile), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   426
					"\tperl -S prepdef.pl ",&Generic_Quote($DefFile)," \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   427
					"\t\$(COMPILER_PATH)$MWLD -msgstyle gcc \"\$(EPOCBLD)\\$ExportLibrary.prep.def\" -importlib -o \$\@",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   428
					" -addcommand \"out:$LibLinkAs\" -warnings off",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   429
					"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   430
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   431
			} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   432
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   433
					"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   434
					"\t\@echo WARNING: Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\".\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   435
					"\t\@echo When exports are frozen in \"$DefFile\", regenerate Makefile.\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   436
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   437
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   438
		} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   439
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   440
				"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   441
				"\t\@echo Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   442
				"\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   443
			);
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   447
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   448
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   449
		"FREEZE :\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   450
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   451
	if ($DefFile and $BasicTrgType!~/^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   452
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   453
#			call perl on the script here so nmake will die if there are errors - this doesn't happen if calling perl in a batch file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   454
			"\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   455
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   456
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   457
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   458
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   459
		"CLEANLIBRARY :\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   460
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   461
	if ($DefFile and !$NoExportLibrary) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   462
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   463
			"\t-\$(ERASE) \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   464
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   465
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   466
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   467
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   468
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   469
	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}UDEB");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   470
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   471
	&Generic_Releaseables;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   472
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   473
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   474
		VS6StartBldList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   475
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   476
	elsif($PlatName eq "VS2003") 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   477
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   478
		VS2003StartBldList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   479
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   480
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   481
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   482
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   483
sub VS6StartBldList(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   484
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   485
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   486
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   487
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   488
	# set up global IDE builds variable
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   489
	%IdeBlds= (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   490
		UREL=> "$BaseTrg - Win32 Release",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   491
		UDEB=> "$BaseTrg - Win32 Debug",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   492
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   493
	if (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   494
		%IdeBlds= (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   495
			REL=> "$BaseTrg - Win32 Release",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   496
			DEB=> "$BaseTrg - Win32 Debug",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   497
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   498
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   499
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   500
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   501
	$DspText=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   502
		"# Microsoft Developer Studio Project File - Name=\"$BaseTrg\" - Package Owner=<4>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   503
		"# Microsoft Developer Studio Generated Build File, Format Version 6.00\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   504
		"# ** DO NOT EDIT **\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   505
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   506
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   507
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   508
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   509
		"# TARGTYPE \"Win32 (x86) External Target\" 0x0106\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   510
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   511
		"CFG=",$IdeBlds{$BldList[0]},"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   512
		"!MESSAGE This is not a valid makefile. To build this project using NMAKE,\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   513
		"!MESSAGE use the Export Makefile command and run\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   514
		"!MESSAGE \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   515
		"!MESSAGE NMAKE /f \"",$BaseTrg,".mak\".\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   516
		"!MESSAGE \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   517
		"!MESSAGE You can specify a configuration when running NMAKE\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   518
		"!MESSAGE by defining the macro CFG on the command line. For example:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   519
		"!MESSAGE \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   520
		"!MESSAGE NMAKE /f \"",$BaseTrg,".mak\" CFG=\"".$IdeBlds{$BldList[0]}."\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   521
		"!MESSAGE \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   522
		"!MESSAGE Possible choices for configuration are:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   523
		"!MESSAGE \n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   524
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   525
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   526
	foreach (reverse @BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   527
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   528
			"!MESSAGE \"",$IdeBlds{$_},"\" (based on \"Win32 (x86) External Target\")"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   529
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   530
		$DspText.="\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   531
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   532
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   533
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   534
		"!MESSAGE \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   535
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   536
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   537
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   538
	# BEGIN THE PROJECT
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   539
	#------------------
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   540
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   541
		"# Begin Project\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   542
		"# PROP AllowPerConfigDependencies 0\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   543
		"# PROP Scc_ProjName \"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   544
		"# PROP Scc_LocalPath \"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   545
		"\n"
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
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   549
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   550
sub VS2003StartBldList(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   551
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   552
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   553
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   554
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   555
	$guid = `uuidgen.exe`;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   556
	$guid =~ s/\n//g;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   557
	$guid = uc $guid;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   558
# set up global IDE builds variable
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   559
	%IdeBlds= (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   560
		UREL=> "Release|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   561
		UDEB=> "Debug|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   562
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   563
	if ($Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   564
		%IdeBlds= (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   565
			REL=> "Release|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   566
			DEB=> "Debug|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   567
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   568
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   569
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   570
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   571
	$VcprojText=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   572
		"<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   573
		"<VisualStudioProject\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   574
		"\tProjectType=\"Visual C++\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   575
		"\tVersion=\"7.10\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   576
		"\tName=\"$BaseTrg\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   577
		"\tProjectGUID=\"{$guid}\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   578
		"\tSccProjectName=\"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   579
		"\tSccLocalPath=\"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   580
		"\tKeyword=\"MakeFileProj\">\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   581
		"\t<Platforms>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   582
		"\t\t<Platform\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   583
		"\t\t\tName=\"Win32\"/>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   584
		"\t</Platforms>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   585
		"\t<Configurations>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   586
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   587
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   588
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   589
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   590
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   591
my $uidfile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   592
sub PMBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   593
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   594
	my $AifStructRef=&main::AifStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   595
	my @SrcList=&main::SrcList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   596
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   597
	my $BitMapStructRef=&main::BitMapStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   598
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   599
	my $ChopBldPath=&main::Path_Chop(&main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   600
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   601
	my $NoExportLibrary=&main::NoExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   602
	my $DefFile=&main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   603
	my $EPOCIncPath=&main::EPOCIncPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   604
	my $FirstLib=&main::FirstLib;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   605
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   606
	my @LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   607
	my $RelPath=&main::RelPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   608
	my $ResourceStructRef=&main::ResourceStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   609
	my @StatLibList=&main::StatLibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   610
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   611
	my $TrgPath=&main::TrgPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   612
	my $TrgType=&main::TrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   613
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   614
	$uidfile = "$BaseTrg.UID";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   615
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   616
	if ($Bld =~ /DEB/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   617
		@LibList=&main::DebugLibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   618
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   619
		@LibList=&main::LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   620
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   621
 	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   622
# Handle migration of binaries to secure location
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   623
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   624
	my $BLDTRGPATH = "";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   625
	my $AIFBLDTRGPATH = "";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   626
	if ($TrgPath) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   627
		$BLDTRGPATH = "\$(TRGDIR)\\";	    # handles TARGETPATH
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   628
		$AIFBLDTRGPATH = $BLDTRGPATH;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   629
		&Winutl_AdjustTargetPath(\$BLDTRGPATH);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   630
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   631
	$BLDTRGPATH = "\$(EPOCTRG$Bld)\\".$BLDTRGPATH;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   632
	$AIFBLDTRGPATH = "\$(EPOCTRG$Bld)\\".$AIFBLDTRGPATH;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   633
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   634
	# REAL TARGETS
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   635
	#-------------
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   636
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   637
		"# REAL TARGET - BUILD VARIANT $Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   638
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   639
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   640
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   641
#	releasables
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   642
	my @releaseables;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   643
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   644
	unless (&main::Plat() eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   645
		if ($BasicTrgType !~ /^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   646
			push @releaseables, "$BLDTRGPATH$Trg";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   647
			if ($Bld=~/REL$/o && $BasicTrgType!~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   648
				push @releaseables,"$BLDTRGPATH$Trg.map";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   649
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   650
			if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   651
				push @releaseables, "\$(EPOCTRG$Bld)\\$Trg";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   652
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   653
			my $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   654
			foreach $BitMapRef (@$BitMapStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   655
				push @releaseables, "\$(EPOCTRG$Bld)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   656
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   657
			my $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   658
			foreach $ResourceRef (@$ResourceStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   659
				push @releaseables,"\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   660
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   661
			my $AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   662
			foreach $AifRef (@$AifStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   663
				push @releaseables, "$AIFBLDTRGPATH$$AifRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   664
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   665
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   666
		if (-e $DefFile and !$NoExportLibrary) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   667
			push @releaseables, "\$(EPOCLIB$Bld)\\$ExportLibrary.lib";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   668
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   669
		if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   670
			# debugging support files?
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   671
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   672
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   673
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   674
		if ($BasicTrgType !~ /^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   675
			my $toolspath=&main::EPOCToolsPath();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   676
			push @releaseables, "$toolspath$Trg";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   677
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   678
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   679
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   680
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   681
		"WHAT$Bld : WHATGENERIC\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   682
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   683
		"CLEAN$Bld : CLEANBUILD$Bld CLEANRELEASE$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   684
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   685
		"CLEANBUILD$Bld : \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   686
		"\t\@perl -S ermdir.pl \"\$(EPOCBLD$Bld)\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   687
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   688
		"CLEANRELEASE$Bld : CLEANGENERIC\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   689
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   690
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   691
	&Generic_WhatCleanTargets($Bld, "WHAT$Bld", "CLEANRELEASE$Bld", @releaseables);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   692
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   693
  my $adjustedTargetPath=$TrgPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   694
  &Winutl_AdjustTargetPath(\$adjustedTargetPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   695
  &Generic_MakeWorkDir("MAKEWORK$Bld", &main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   696
  &Generic_MakeWorkDir("MAKEWORK$Bld", "$RelPath$adjustedTargetPath");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   697
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   698
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   699
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   700
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   701
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   702
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   703
	return if ($BasicTrgType=~/^IMPLIB$/io);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   704
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   705
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   706
		"LISTING$Bld : MAKEWORK$Bld"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   707
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   708
	foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   709
		my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   710
		my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   711
		$BaseSrc.='_' if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   712
		$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   713
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   714
   		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   715
			" \\\n\tLISTING$Bld$BaseSrc"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   716
   		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   717
   	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   718
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   719
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   720
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   721
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   722
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   723
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   724
		"LIBS$Bld="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   725
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   726
	foreach (@StatLibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   727
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   728
			" \\\n\t", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$_")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   729
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   730
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   731
	foreach (@LibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   732
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   733
			" \\\n\t", &Generic_Quote("\$(EPOCLINK$Bld)\\$_")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   734
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   735
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   736
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   737
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   738
		"\n"
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   742
		"LINK_OBJS$Bld="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   743
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   744
	my $have_uidfile = 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   745
	foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   746
		my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   747
		my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   748
		if ($BaseSrc eq $uidfile) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   749
			$have_uidfile = 1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   750
			next;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   751
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   752
		$BaseSrc.='_' if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   753
   		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   754
			" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   755
			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   756
   		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   757
   	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   758
	if ($Win32Resrc) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   759
		my $resbase=&main::Path_Split('Base',$Win32Resrc);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   760
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   761
			" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   762
			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$resbase.res")
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 ($have_uidfile) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   766
		# ensure that the uid file is at the end of the list, as it's implicit in
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   767
		# CodeWarrior IDE projects.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   768
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   769
			" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   770
			"\t", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseTrg"."_UID_.o")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   771
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   772
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   773
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   774
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   775
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   776
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   777
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   778
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   779
		"COMMON_LINK_FLAGS$Bld=",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   780
		' -stdlib'		# use default runtime library for compiler help functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   781
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   782
	if ($MWLD eq "mwcc.exe") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   783
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   784
			' -warnings on'	# on by default in mwccsym2.exe
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   785
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   786
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   787
	if ($BasicTrgType=~/^(EXE|DLL)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   788
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   789
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   790
				" \"\$(EPOCSTATLINK$Bld)\\$FirstLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   791
			);
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
	foreach my $lib (@Win32LibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   795
		 my $win32lib = $lib;    # take a copy, to avoid updating contents of Win32LibList!
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   796
		$win32lib = "-l$win32lib" unless ($win32lib =~ /\\/);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   797
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   798
			" ",lc $win32lib
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   799
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   800
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   801
	if ($BasicTrgType=~/^DLL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   802
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   803
			"$BaseAddressFlag",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   804
			' -noentry',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   805
			' -shared'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   806
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   807
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   808
	elsif ($TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   809
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   810
			"$BaseAddressFlag",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   811
			' -noentry',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   812
			' -shared'
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
	elsif ($BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   816
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   817
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   818
				' -m "?_E32Bootstrap@@YGXXZ"'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   819
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   820
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   821
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   822
	if (&main::Plat=~/^(WINC|TOOLS)$/o && $BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   823
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   824
			' -subsystem console'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   825
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   826
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   827
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   828
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   829
			' -subsystem windows'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   830
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   831
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   832
	if (&main::HeapSize) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   833
		my %HeapSize=&main::HeapSize;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   834
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   835
			' -heapreserve=',RoundUp1k($HeapSize{Max}),' -heapcommit=',RoundUp1k($HeapSize{Min})
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   836
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   837
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   838
	if ($BasicTrgType=~/^(DLL|EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   839
		if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   840
			if($PlatName eq "VS6")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   841
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   842
				&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   843
					' -sym codeview'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   844
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   845
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   846
			else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   847
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   848
				&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   849
					' -sym codeview_new'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   850
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   851
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   852
			#mention the debug version of the runtime library
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   853
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   854
				' -lMSL_All_MSE_Symbian_D.lib'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   855
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   856
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   857
		else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   858
		{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   859
			#mention the release version of the runtime library
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   860
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   861
				' -lMSL_All_MSE_Symbian.lib'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   862
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   863
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   864
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   865
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   866
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   867
		"\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 $EntrySymbol='';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   871
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   872
		my $Include="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   873
		if ($BasicTrgType=~/^DLL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   874
			$Include="-m __E32Dll";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   875
			$EntrySymbol='__E32Dll';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   876
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   877
		else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   878
			$Include="-m __E32Startup";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   879
			$EntrySymbol='__E32Startup';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   880
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   881
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   882
			"STAGE1_LINK_FLAGS$Bld= \$(COMMON_LINK_FLAGS$Bld) \$(LIBS$Bld) \\\n\t",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   883
			" -o \"\$(EPOCBLD$Bld)\\$Trg\"", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   884
			' -export dllexport',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   885
			" $Include",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   886
			' -nocompactimportlib', 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   887
			" -implib \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   888
			" -addcommand \"out:$Trg\" -warnings off",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   889
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   890
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   891
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   892
	my $AbsentSubst = '';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   893
	if ($EntrySymbol) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   894
		$AbsentSubst = " -absent $EntrySymbol";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   895
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   896
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   897
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   898
		"LINK_FLAGS$Bld= \$(COMMON_LINK_FLAGS$Bld) \$(LIBS$Bld) \\\n\t",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   899
		" -o \"$BLDTRGPATH$Trg\"" 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   900
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   901
	if ($Bld=~/REL$/o && $BasicTrgType!~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   902
		# Generate map file for release build executables
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   903
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   904
			" -map \"$BLDTRGPATH$Trg.map\"", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   905
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   906
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   907
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   908
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   909
			" -f \"\$(EPOCBLD)\\$ExportLibrary.def\"",	# use generated .DEF file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   910
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   911
		if (&main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   912
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   913
				" -implib \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   914
				" -addcommand \"out:$Trg\" -warnings off"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   915
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   916
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   917
		else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   918
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   919
				' -noimplib'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   920
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   921
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   922
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   923
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   924
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   925
			' -noimplib'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   926
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   927
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   928
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   929
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   930
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   931
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   932
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   933
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   934
		&Generic_Quote("$BLDTRGPATH$Trg"), " : \$(LINK_OBJS$Bld) "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   935
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   936
	if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   937
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   938
			&Generic_Quote($DefFile)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   939
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   940
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   941
	if ($BasicTrgType=~/^(DLL|EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   942
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   943
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   944
				" ", &Generic_Quote("\$(EPOCSTATLINK$Bld)\\$FirstLib")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   945
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   946
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   947
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   948
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   949
		" \$(LIBS$Bld)\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   950
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   951
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   952
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   953
#	Link by name first time round for dlls
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   954
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   955
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   956
			"\t\$(COMPILER_PATH)$MWLD -msgstyle gcc \$(STAGE1_LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   957
			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$Trg\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   958
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   959
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   960
#		Generate an export info file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   961
		my $show_options = "names,verbose";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   962
		$show_options = "names,unmangled,verbose" if ($MWLD eq "mwldsym2.exe");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   963
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   964
			"\t\$(COMPILER_PATH)$MWLD -msgstyle gcc -S -show only,$show_options -o \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\" \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   965
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   966
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   967
#		call makedef to reorder the export information
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   968
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   969
#			call perl on the script here so nmake will die if there are errors - this doesn't happen if calling perl in a batch file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   970
			"\tperl -S makedef.pl $AbsentSubst -Inffile \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   971
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   972
		if (SysTrg()) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   973
    			&main::Output( "\t\t-SystemTargetType \\\n" );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   974
	    	}		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   975
		if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   976
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   977
				" -Frzfile \"$DefFile\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   978
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   979
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   980
		my $Export;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   981
		my $Ordinal=1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   982
		foreach $Export (&main::Exports) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   983
#				replace "$" with "$$" so that NMAKE doesn't think there's a macro in the function name
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   984
			$Export=~s-\$-\$\$-go;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   985
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   986
				" -$Ordinal $Export"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   987
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   988
			$Ordinal++;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   989
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   990
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   991
			" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   992
			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   993
			"\t\$(ERASE) \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   994
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   995
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   996
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   997
#	Perform the final link step
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   998
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   999
		"\t\$(COMPILER_PATH)$MWLD -msgstyle gcc "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1000
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1001
	if ($BasicTrgType=~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1002
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1003
			"-library "
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1004
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1005
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1006
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1007
		"\$(LINK_FLAGS$Bld) -l \$(EPOCBLD$Bld) -search \$(notdir \$(LINK_OBJS$Bld))\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1008
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1009
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1010
	if (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1011
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1012
			"\tcopy \"BLDTRGPATH$Trg\" \"",&main::EPOCToolsPath,"$Trg\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1013
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1014
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1015
	if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1016
		&Generic_MakeWorkDir("MAKEWORK$Bld", "\$(EPOCTRG$Bld)");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1017
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1018
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1019
			&Generic_Quote("\$(EPOCTRG$Bld)\\$Trg"), " : ", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1020
			&Generic_Quote("$BLDTRGPATH$Trg"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1021
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1022
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1023
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1024
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1025
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1026
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1027
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1028
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1029
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1030
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1031
		VS6Bld();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1032
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1033
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1034
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1035
		VS2003Bld();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1036
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1037
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1038
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1039
sub VS6Bld(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1040
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1041
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1042
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1043
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1044
	my $ChopBldPath=&main::Path_Chop(&main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1045
	my $ChopRelPath=&main::Path_Chop(&main::RelPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1046
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1047
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1048
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1049
	if ($Bld eq $BldList[0]) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1050
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1051
			"!IF  \"\$(CFG)\" == \"$IdeBlds{$Bld}\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1052
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1053
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1054
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1055
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1056
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1057
			"!ELSEIF  \"\$(CFG)\" == \"$IdeBlds{$Bld}\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1058
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1059
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1060
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1061
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1062
		"# PROP BASE Use_MFC 0\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1063
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1064
	if ($Bld=~/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1065
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1066
			"# PROP BASE Use_Debug_Libraries 0\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1067
			"# PROP BASE Output_Dir \".\\Release\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1068
			"# PROP BASE Intermediate_Dir \".\\Release\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1069
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1070
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1071
	elsif ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1072
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1073
			"# PROP BASE Use_Debug_Libraries 1\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1074
			"# PROP BASE Output_Dir \".\\Debug\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1075
			"# PROP BASE Intermediate_Dir \".\\Debug\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1076
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1077
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1078
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1079
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1080
		"# PROP BASE Cmd_Line \"NMAKE /f ",$BaseTrg,".mak \"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1081
		"# PROP BASE Rebuild_Opt \"/a\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1082
		"# PROP BASE Target_File \"",$Trg,"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1083
		"# PROP BASE Bsc_Name \"",$BaseTrg,".bsc\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1084
		"# PROP BASE Target_Dir \"\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1085
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1086
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1087
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1088
			"# PROP Use_MFC\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1089
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1090
	if ($Bld=~/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1091
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1092
			"# PROP Use_Debug_Libraries 0\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1093
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1094
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1095
	elsif ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1096
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1097
			"# PROP Use_Debug_Libraries 1\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1098
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1099
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1100
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1101
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1102
		"# PROP Output_Dir \"$ChopRelPath\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1103
		"# PROP Intermediate_Dir \"$ChopBldPath\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1104
		"# PROP Cmd_Line \"\"$ENV{EPOCROOT}epoc32\\tools\\MAKE.exe\" -r -f ",&main::BaseMak,"_$Bld.mak \"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1105
		"# PROP Rebuild_Opt \"REBUILD\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1106
		"# PROP Target_File \"",$Trg,"\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1107
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1108
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1109
	if ($Bld=~/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1110
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1111
			"# PROP Bsc_Name \"",$BaseTrg,".bsc\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1112
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1113
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1114
	elsif ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1115
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1116
			"# PROP Bsc_Name \"\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1117
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1118
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1119
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1120
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1121
		"# PROP Target_Dir \"\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1122
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1123
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1124
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1125
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1126
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1127
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1128
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1129
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1130
sub VS2003Bld(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1131
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1132
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1133
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1134
	my $ChopBldPath=&main::Path_Chop(&main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1135
	my $ChopRelPath=&main::Path_Chop(&main::Path_MakeRltToBase(&main::MakeFilePath, &main::RelPath));
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1136
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1137
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1138
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1139
		"\t\t<Configuration\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1140
		"\t\t\tName=\"",$IdeBlds{$Bld},"\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1141
		"\t\t\tOutputDirectory=\"$ChopRelPath\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1142
		"\t\t\tIntermediateDirectory=\"$ChopBldPath\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1143
		"\t\t\tConfigurationType=\"0\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1144
		"\t\t\tUseOfMFC=\"0\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1145
		"\t\t\tATLMinimizesCRunTimeLibraryUsage=\"FALSE\">\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1146
		"\t\t\t<Tool\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1147
		"\t\t\t\tName=\"VCNMakeTool\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1148
		"\t\t\t\tBuildCommandLine=\"\&quot;$ENV{EPOCROOT}epoc32\\tools\\make.exe\&quot; -r -f ",&main::BaseMak,".mak $Bld\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1149
		"\t\t\t\tReBuildCommandLine=\"\&quot;$ENV{EPOCROOT}epoc32\\tools\\make.exe\&quot; -r -f ",&main::BaseMak,".mak CLEAN $Bld \"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1150
		"\t\t\t\tCleanCommandLine=\"\&quot;$ENV{EPOCROOT}epoc32\\tools\\make.exe\&quot; -r -f ",&main::BaseMak,".mak CLEAN$Bld\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1151
		"\t\t\t\tOutput=\"$ChopRelPath\\$Trg\"/>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1152
		"\t\t</Configuration>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1153
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1154
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1155
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1156
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1157
sub PMStartSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1158
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1159
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1160
		"# SOURCES\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1161
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1162
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1163
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1164
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1165
		VS6StartSrcList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1166
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1167
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1168
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1169
		VS2003StartSrcList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1170
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1171
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1172
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1173
sub VS6StartSrcList(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1174
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1175
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1176
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1177
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1178
		"\n!ENDIF\n\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1179
		"# Begin Target\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1180
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1181
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1182
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1183
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1184
			"# Name \"".$IdeBlds{$_}."\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1185
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1186
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1187
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1188
		"# Begin Group \"Source Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1189
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1190
		"# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1191
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1192
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1193
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1194
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1195
sub VS2003StartSrcList(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1196
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1197
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1198
		"\t</Configurations>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1199
		"\t<References>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1200
		"\t</References>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1201
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1202
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1203
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1204
		"\t<Files>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1205
		"\t\t<Filter\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1206
		"\t\t\tName=\"Source Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1207
		"\t\t\tFilter=\"cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1208
		"\t\t\tUniqueIdentifier=\"{4FC737F1-C7A5-4376-A066-2A32D752A2FF}\">\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1209
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1210
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1211
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1212
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1213
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1214
sub PMBitMapBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1215
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1216
	&Generic_BitMapBld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1217
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1218
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1219
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1220
	my $BitMapRef=&main::BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1221
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1222
	my $ChopTrgPath="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1223
	if ($$BitMapRef{TrgPath}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1224
		$ChopTrgPath.="\\$$BitMapRef{TrgPath}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1225
		chop $ChopTrgPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1226
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1227
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1228
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1229
	my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1230
	foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1231
		my $path="\$(EPOCTRG$Bld)$ChopTrgPath";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1232
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1233
			&Generic_Quote("$path\\$$BitMapRef{Trg}"), " : ", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1234
			&Generic_Quote("$$BitMapRef{GenericTrg}"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1235
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1236
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1237
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1238
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1239
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1240
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1241
sub PMResrcBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1242
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1243
	&Generic_ResrcBld; 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1244
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1245
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1246
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1247
	my $ResourceRef=&main::ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1248
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1249
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1250
	foreach my $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1251
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1252
			&Generic_Quote("\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}"), " : ", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1253
			&Generic_Quote("$$ResourceRef{GenericTrg}"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1254
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1255
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1256
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1257
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1258
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1259
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1260
		VS6ResrcBld();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1261
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1262
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1263
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1264
		VS2003ResrcBld();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1265
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1266
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1267
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1268
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1269
sub VS6ResrcBld() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1270
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1271
	my $ResourceRef=&main::ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1272
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1273
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1274
	my $Resrc=ucfirst lc &main::Path_Split('File', $$ResourceRef{Source});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1275
	my $BaseResrc=&main::Path_Split('Base', $$ResourceRef{Source});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1276
	my $SrcPath=&main::Path_Split('Path', $$ResourceRef{Source});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1277
	my $TrgPath=&main::Path_Split('Path', $$ResourceRef{Trg});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1278
	my @LangList=($$ResourceRef{Lang});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1279
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1280
	my $inputpath="$SrcPath$Resrc";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1281
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1282
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1283
		"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1284
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1285
		"SOURCE=$inputpath\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1286
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1287
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1288
	my $ChopBldPath=&main::Path_Chop(&main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1289
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1290
	my $PathBaseDsp=&main::MakeFilePath.&main::BaseMak;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1291
	my $RelPath=&main::RelPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1292
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1293
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1294
		"USERDEP__$BaseResrc="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1295
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1296
	my $Dep;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1297
	foreach $Dep (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1298
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1299
			"\"$Dep\"\t"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1300
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1301
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1302
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1303
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1304
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1305
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1306
	my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1307
	foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1308
		my $ResrcTrgFullName="$RelPath$Bld\\$TrgPath$BaseResrc.r";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1309
		if ($Bld eq $BldList[0]) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1310
			$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1311
				'!IF'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1312
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1313
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1314
		else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1315
			$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1316
				'!ELSEIF'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1317
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1318
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1319
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1320
			"  \"\$(CFG)\" == \"$IdeBlds{$Bld}\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1321
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1322
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1323
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1324
			"# PROP Intermediate_Dir \"$ChopBldPath\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1325
			"# Begin Custom Build - Building resources from $Resrc\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1326
			"InputPath=$inputpath\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1327
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1328
			"BuildCmds= \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1329
			"\tnmake -nologo -f \"${PathBaseDsp}.SUP.MAKE\"\\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1330
			"  \"$ResrcTrgFullName\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1331
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1332
		my $Lang;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1333
		foreach $Lang (@LangList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1334
#			change again to avoid VC5 linking the resource
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1335
			my $TmpLang=$Lang;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1336
			if ($TmpLang eq 'SC') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1337
				$TmpLang.='.dummy';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1338
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1339
			$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1340
				"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1341
				"\"$ResrcTrgFullName$TmpLang\" : \$(SOURCE) \"\$(INTDIR)\"\\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1342
				" \"\$(OUTDIR)\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1343
				"   \$(BuildCmds)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1344
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1345
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1346
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1347
			"# End Custom Build\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1348
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1349
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1350
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1351
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1352
		"!ENDIF \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1353
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1354
		"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1355
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1356
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1357
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1358
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1359
sub VS2003ResrcBld() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1360
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1361
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1362
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1363
sub PMDoc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1364
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1365
###### from PMDoc of VC6 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1366
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1367
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1368
		VS6Doc();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1369
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1370
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1371
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1372
		VS2003Doc();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1373
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1374
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1375
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1376
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1377
sub VS6Doc() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1378
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1379
	my $SrcPath=&main::SrcPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1380
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1381
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1382
		"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1383
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1384
		"SOURCE=",$SrcPath,ucfirst lc &main::Doc,"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1385
		"# PROP Exclude_From_Build 1\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1386
		"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1387
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1388
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1389
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1390
sub VS2003Doc() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1391
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1392
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1393
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1394
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1395
sub PMAifBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1396
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1397
	&Generic_AifBld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1398
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1399
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1400
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1401
	my $AifRef=&main::AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1402
	my $TrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1403
	if (&Generic_Definition("TRGDIR") ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1404
		$TrgDir="\\\$(TRGDIR)";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1405
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1406
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1407
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1408
	my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1409
	foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1410
		my $path="\$(EPOCTRG$Bld)$TrgDir";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1411
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1412
			&Generic_Quote("$path\\$$AifRef{Trg}"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1413
			&Generic_Quote("$$AifRef{GenericTrg}"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1414
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1415
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1416
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1417
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1418
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1419
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1420
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1421
sub PMStartSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1422
	my $Src=&main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1423
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1424
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1425
		"# Source $Src\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1426
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1427
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1428
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1429
	if($PlatName eq "VS6") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1430
		VS6StartSrc();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1431
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1432
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1433
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1434
		VS2003StartSrc();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1435
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1436
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1437
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1438
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1439
sub VS6StartSrc() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1440
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1441
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1442
		"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1443
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1444
		"SOURCE=",&main::SrcPath,ucfirst lc &main::Src,"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1445
		"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1446
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1447
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1448
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1449
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1450
sub VS2003StartSrc(){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1451
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1452
		"\t\t\t<File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1453
		"\t\t\t\tRelativePath=\"",&main::Path_MakeRltToBase(&main::MakeFilePath, &main::SrcPath),ucfirst lc &main::Src,"\">\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1454
		"\t\t\t</File>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1455
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1456
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1457
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1458
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1459
sub PMSrcDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1460
	my @BldList=&main::BldList;	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1461
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1462
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1463
	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1464
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1465
	return if (@DepList == 0);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1466
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1467
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1468
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1469
			&Generic_Quote("\$(EPOCBLD$_)\\$BaseSrc.o"), " \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1470
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1471
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1472
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1473
		":"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1474
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1475
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1476
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1477
		" \\\n\t", &Generic_Quote($_)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1478
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1479
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1480
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1481
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1482
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1483
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1484
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1485
	# Generate user header list for this src, merge with list for all sources
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1486
	foreach (&main::DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1487
		$PrjHdrs{$_}='unusedval';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1488
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1489
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1490
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1491
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1492
sub PMSrcBldDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1493
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1494
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1495
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1496
	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1497
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1498
	return if (@DepList == 0);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1499
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1500
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1501
		&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " :",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1502
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1503
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1504
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1505
			" \\\n\t", &Generic_Quote($_)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1506
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1507
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1508
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1509
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1510
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1511
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1512
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1513
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1514
sub PMEndSrcBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1515
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1516
	$BaseSrc =~ s/\.UID/_UID_/i if ($BaseSrc eq $uidfile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1517
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1518
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1519
	my $Src=&main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1520
	my $SrcPath=&main::SrcPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1521
	my $Ext=&main::ExtSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1522
	my $Cia = (lc($Ext) eq '.cia') ? 1 : 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1523
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1524
	if ($Cia) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1525
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1526
			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.o"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1527
			&Generic_Quote("$SrcPath$Src"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1528
			"\techo $Src\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1529
			"\t\$(CW$Bld) -lang c++ -o \"\$\@\" -c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1530
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1531
#			assembler listing target - uses implicit rule to do disassembly
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1532
			"LISTING$Bld$BaseSrc\_ : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc\_.lis"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1533
			"\t", &Generic_CopyAction("$SrcPath$BaseSrc\_.$Plat.lst"),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1534
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1535
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1536
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1537
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1538
			&Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.o"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1539
			&Generic_Quote("$SrcPath$Src"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1540
			"\techo $Src\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1541
			"\t\$(CW$Bld) -o \"\$\@\" -c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1542
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1543
#			assembler listing target - uses implicit rule to do disassembly
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1544
			"LISTING$Bld$BaseSrc : ", &Generic_Quote("\$(EPOCBLD$Bld)\\$BaseSrc.lis"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1545
			"\t", &Generic_CopyAction("$SrcPath$BaseSrc.$Plat.lst"),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1546
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1547
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1548
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1549
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1550
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1551
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1552
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1553
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1554
sub PMEndSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1555
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1556
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1557
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1558
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1559
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1560
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1561
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1562
sub PMEndSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1563
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1564
	my $show_options = "source";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1565
	$show_options = "source,unmangled,comments" if ($MWLD eq "mwldsym2.exe");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1566
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1567
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1568
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1569
		"# Implicit rule for generating .lis files\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1570
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1571
		".SUFFIXES : .lis .o\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1572
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1573
		".o.lis:\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1574
		"\t\$(COMPILER_PATH)$MWLD -msgstyle gcc -S -show $show_options \$< -o \$\@\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1575
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1576
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1577
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1578
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1579
	if ($Win32Resrc) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1580
		my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1581
		my @DepList=&main::Deps_GenDependsL($Win32Resrc);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1582
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1583
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1584
			"# Win32 Resource $Win32Resrc\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1585
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1586
			"DEPEND="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1587
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1588
		foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1589
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1590
				" \\\n\t", &Generic_Quote($_)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1591
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1592
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1593
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1594
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1595
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1596
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1597
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1598
		my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1599
		my $resbase=&main::Path_Split('Base',$Win32Resrc);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1600
		my $respath=&main::Path_Chop(&main::Path_Split('Path',$Win32Resrc));
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1601
		foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1602
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1603
				&Generic_Quote("\$(EPOCBLD$Bld)\\$resbase.res"), " : ",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1604
				&Generic_Quote($Win32Resrc), " \$(DEPEND)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1605
				"\tmwwinrc -o \$\@ \"$Win32Resrc\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1606
				"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1607
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1608
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1609
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1610
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1611
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1612
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1613
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1614
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1615
	# Deal with accumulated MAKEDIRS etc.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1616
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1617
	&Generic_End;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1618
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1619
	my $BaseDsp=&main::BaseMak;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1620
	my $PathBaseDsp=&main::MakeFilePath.$BaseDsp;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1621
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1622
	&main::Path_DelFiles("$PathBaseDsp.MAK","$PathBaseDsp.MDP","$PathBaseDsp.NCB","$PathBaseDsp.OPT","$PathBaseDsp.PLG","$PathBaseDsp.SLN","$PathBaseDsp.VCPROJ","$PathBaseDsp.DSW","$PathBaseDsp.DSP","${PathBaseDsp}_UREL.MAK","${PathBaseDsp}_UDEB.MAK");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1623
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1624
	if($PlatName eq "VS6")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1625
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1626
		VS6EndSrcList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1627
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1628
	elsif($PlatName eq "VS2003")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1629
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1630
		VS2003EndSrcList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1631
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1632
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1633
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1634
sub VS6EndSrcList() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1635
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1636
	my $BaseDsp=&main::BaseMak;    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1637
	my $PathBaseDsp=&main::MakeFilePath.$BaseDsp;  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1638
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1639
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1640
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1641
		"# End Group\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1642
		"# Begin Group \"Resource Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1643
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1644
		"# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1645
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1646
	if ($Win32Resrc) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1647
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1648
			"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1649
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1650
			"SOURCE=",ucfirst lc $Win32Resrc,"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1651
			"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1652
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1653
		# Generate user header list for this src, merge with list for all sources
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1654
		foreach (&main::Deps_GenDependsL($Win32Resrc)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1655
			$PrjHdrs{$_}='unusedval';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1656
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1657
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1658
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1659
		"# End Group\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1660
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1661
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1662
	# Use the global %PrjHdrs Hash to produce user header listing
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1663
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1664
		"# Begin Group \"Header Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1665
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1666
		"# PROP Default_Filter \"h;hpp;hxx;hm;inl;fi;fd\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1667
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1668
	foreach (keys %PrjHdrs) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1669
		$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1670
			"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1671
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1672
			"SOURCE=",&main::Path_Split('Path',$_),ucfirst lc &main::Path_Split('File',$_),"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1673
			"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1674
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1675
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1676
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1677
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1678
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1679
		"# End Group\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1680
		"# Begin Group \"Make Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1681
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1682
		"# PROP Default_Filter \"mak;mk\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1683
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1684
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1685
		"# Begin Source File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1686
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1687
		"SOURCE=",ucfirst lc $PathBaseDsp,".mak\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1688
		"# End Source File\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1689
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1690
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1691
	$DspText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1692
		"# End Group\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1693
		"# End Target\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1694
		"# End Project\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1695
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1696
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1697
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1698
	&main::CreateExtraFile("$PathBaseDsp.dsp",$DspText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1699
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1700
	my $RelMakText=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1701
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1702
		"BLD: UREL\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1703
		"REBUILD : CLEANUREL UREL\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1704
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1705
		"include ",&main::BaseMak,".mak\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1706
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1707
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1708
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1709
	&main::CreateExtraFile("${PathBaseDsp}_UREL.mak",$RelMakText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1710
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1711
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1712
	my $DebMakText=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1713
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1714
		"BLD: UDEB\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1715
		"REBUILD : CLEANUDEB UDEB\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1716
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1717
		"include ",&main::BaseMak,".mak\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1718
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1719
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1720
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1721
	&main::CreateExtraFile("${PathBaseDsp}_UDEB.mak",$DebMakText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1722
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1723
	my $DswText=join(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1724
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1725
		"Microsoft Developer Studio Workspace File, Format Version 6.00",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1726
		'# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1727
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1728
		'#'x79,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1729
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1730
		"Project: \"$BaseDsp\"=.\\$BaseDsp.dsp - Package Owner=<4>",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1731
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1732
		'Package=<5>',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1733
		'{{{',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1734
		'}}}',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1735
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1736
		'Package=<4>',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1737
		'{{{',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1738
		'}}}',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1739
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1740
		'#'x79,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1741
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1742
		'Global:',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1743
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1744
		'Package=<5>',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1745
		'{{{',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1746
		'}}}',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1747
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1748
		'Package=<3>',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1749
		'{{{',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1750
		'}}}',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1751
		'',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1752
		'#'x79,
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1753
		''
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1754
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1755
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1756
	&main::CreateExtraFile("$PathBaseDsp.DSW",$DswText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1757
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1758
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1759
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1760
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1761
sub VS2003EndSrcList() {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1762
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1763
	my $BaseDsp=&main::BaseMak;    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1764
	my $PathBaseDsp=&main::MakeFilePath.$BaseDsp;  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1765
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1766
# Use the global %PrjHdrs Hash to produce user header listing
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1767
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1768
		"\t\t</Filter>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1769
		"\t\t<Filter\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1770
		"\t\t\tName=\"Header Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1771
		"\t\t\tFilter=\"h;hpp;hxx;hm;inl;fi;fd\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1772
		"\t\t\tUniqueIdentifier=\"{93995380-89BD-4b04-88EB-625FBE52EBFB}\">\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1773
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1774
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1775
	foreach (keys %PrjHdrs) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1776
		$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1777
			"\t\t\t<File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1778
			"\t\t\t\tRelativePath=\"",&main::Path_MakeRltToBase(&main::MakeFilePath, &main::Path_Split('Path',$_)) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1779
							, &main::Path_Split('File',$_),"\">","\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1780
			"\t\t\t</File>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1781
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1782
	}	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1783
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1784
		"\t\t</Filter>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1785
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1786
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1787
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1788
		"\t\t<Filter\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1789
		"\t\t\tName=\"Resource Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1790
		"\t\t\tFilter=\"ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1791
		"\t\t\tUniqueIdentifier=\"{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}\">\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1792
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1793
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1794
	if ($Win32Resrc) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1795
		$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1796
			"\t\t\t<File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1797
			"\t\t\t\tRelativePath=\"", &main::Path_MakeRltToBase(&main::MakeFilePath, $Win32Resrc),"\">\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1798
			"\t\t\t</File>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1799
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1800
		# Generate user header list for this src, merge with list for all sources
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1801
		foreach (&main::Deps_GenDependsL($Win32Resrc)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1802
			$PrjHdrs{$_}='unusedval';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1803
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1804
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1805
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1806
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1807
		"\t\t</Filter>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1808
		"\t\t<Filter\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1809
		"\t\t\tName=\"Make Files\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1810
		"\t\t\tFilter=\"Mak;mk\">\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1811
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1812
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1813
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1814
		"\t\t\t<File\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1815
		"\t\t\t\tRelativePath=\"",&main::Path_MakeRltToBase(&main::MakeFilePath, $PathBaseDsp),".mak\">\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1816
		"\t\t\t</File>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1817
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1818
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1819
	$VcprojText.=join('',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1820
		"\t\t</Filter>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1821
		"\t</Files>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1822
		"\t<Globals>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1823
		"\t</Globals>\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1824
		"</VisualStudioProject>\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1825
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1826
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1827
	&main::CreateExtraFile("$PathBaseDsp.vcproj",$VcprojText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1828
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1829
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1830
	my $SlnText=join(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1831
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1832
		"Microsoft Visual Studio Solution File, Format Version 8.00",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1833
		"Project\(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\"\) = \"$BaseDsp\", \"$BaseDsp.vcproj\", \"{$guid}\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1834
		"\tProjectSection(ProjectDependencies) = postProject",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1835
		"\tEndProjectSection",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1836
		'EndProject',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1837
		'Global',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1838
		"\tGlobalSection(SolutionConfiguration) = preSolution",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1839
		"\t\tDebug = Debug",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1840
		"\t\tRelease = Release",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1841
		"\tEndGlobalSection",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1842
		"\tGlobalSection(ProjectConfiguration) = postSolution",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1843
		"\t\t{$guid}.Debug.ActiveCfg = Debug|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1844
		"\t\t{$guid}.Debug.Build.0 = Debug|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1845
		"\t\t{$guid}.Release.ActiveCfg = Release|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1846
		"\t\t{$guid}.Release.Build.0 = Release|Win32",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1847
		"\tEndGlobalSection",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1848
		"\tGlobalSection(ExtensibilityGlobals) = postSolution",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1849
		"\tEndGlobalSection",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1850
		"\tGlobalSection(ExtensibilityAddIns) = postSolution",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1851
		"\tEndGlobalSection",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1852
		'EndGlobal',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1853
		''
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1854
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1855
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1856
	&main::CreateExtraFile("$PathBaseDsp.Sln",$SlnText);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1857
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1858
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1859
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1860
1;