sbsv1/abld/platform/cl_win.pm
author jjkang
Wed, 30 Jun 2010 11:35:58 +0800
changeset 607 378360dbbdba
parent 599 fa7a3cc6effd
permissions -rw-r--r--
Merge missed changeset 11 (raptor v2.14 and helium 10.0)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
# Description:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
#
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_win;
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
my @Win32LibList=();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
my $Win32StdHeaders;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
my $BaseAddressFlag;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
my $Win32Resrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
require Exporter;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
@ISA=qw(Exporter);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
@EXPORT=qw(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
	PMHelp_Mmp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
	PMCheckPlatformL
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
	PMPlatProcessMmp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
	PMStartBldList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
		PMBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
	PMStartSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
		PMBitMapBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
		PMResrcBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
		PMAifBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
		PMStartSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
		PMSrcDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
			PMSrcBldDepend
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
			PMEndSrcBld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
		PMEndSrc
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
	PMEndSrcList
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
use Winutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
use cl_generic;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
use Pathutl;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
sub PMHelp_Mmp {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	&Winutl_Help_Mmp;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
sub SysTrg () {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
	return 1 if &main::SystemTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
	return 1 if ($ExportLibrary =~ /EKERN/i);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
	return 1 if ($Trg =~ /KSRT/i);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
	return 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
sub PMCheckPlatformL {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
	if ((&main::Plat eq 'TOOLS') and (&main::BasicTrgType ne 'EXE') and (&main::BasicTrgType ne 'LIB')) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
		die "Can't specify anything but EXE or LIB targettypes for this platform\n";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
sub PMPlatProcessMmp (@) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
	&Winutl_DoMmp(\@_, $ENV{INCLUDE});
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
	$BaseAddressFlag=&Winutl_BaseAddress;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
	$BaseAddressFlag=~s/^(.+$)$/ \/base:\"$1\"/o;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
	@Win32LibList=&Winutl_Win32LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
	my $MSVCVer = &Winutl_MSVCVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
	push @Win32LibList, "kernel32.lib";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
	$Win32Resrc=&Winutl_Win32Resrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
	$Win32StdHeaders=&Winutl_Win32StdHeaders;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
sub PMStartBldList($) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
	my ($makecmd) = @_;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
	die "Cannot generate $makecmd makefiles\n" if ($makecmd ne "nmake");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
	my $AifStructRef=&main::AifStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    87
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    88
	my $BitMapStructRef=&main::BitMapStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    89
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
	my @ChopSysIncPaths=&main::Path_Chop(&main::SysIncPaths);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91
	my @ChopUserIncPaths=&main::Path_Chop(&main::UserIncPaths);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    92
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    93
	my $NoExportLibrary=&main::NoExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    94
	my $DefFile=&main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    95
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    96
	my $LibPath=&main::LibPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    97
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    98
	my $MSVCVer = &Winutl_MSVCVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    99
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   100
	my @MacroList=&main::MacroList();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   101
	push @MacroList, "__SUPPORT_CPP_EXCEPTIONS__";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   102
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   103
	my $VariantFile=&main::VariantFile();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   104
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   105
	my $ResourceStructRef=&main::ResourceStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   106
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   107
	my $TrgType=&main::TrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   108
	my $defaultWarningLevel="/W4";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   109
	my $CompilerOption=&main::CompilerOption("MSVC");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   110
	my $LinkAs=&main::LinkAs;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   111
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   112
	&Generic_Header(0,$makecmd);	# define standard things using absolute paths
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   113
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   114
	my $TrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   115
	if (&Generic_Definition("TRGDIR") ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   116
		$TrgDir="\$(TRGDIR)\\";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   117
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   118
	if (&main::Plat eq "WINC") {	# target path ignored under WINC
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   119
		$TrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   120
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   121
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   122
		"INCDIR  ="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   123
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   124
	if($VariantFile){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   125
        my $VariantFileFileName  = Path_Split('FILE',$VariantFile);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   126
        &main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   127
              " /FI \"$VariantFileFileName\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   128
              );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   129
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   130
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   131
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   132
	foreach (@ChopUserIncPaths,@ChopSysIncPaths) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   133
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   134
			" /I \"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   135
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   136
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   137
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   138
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   139
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   140
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   141
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   142
	my $MSVCVer = &Winutl_MSVCVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   143
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   144
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   145
		"CLFLAGS =",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   146
			" /nologo",			# suppress "sign-on" banner message
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   147
			" /Zp4",			# packs structures on 4 byte boundaries
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   148
			" /GF"				# Pools strings and places them in read-only memory 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   149
		);	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   150
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   151
	if ($MSVCVer >= 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   152
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   153
			" /wd4996",			# C4996: 'xxxx' was declared deprecated
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   154
			" /wd4571"			# C4571: catch(...) blocks compiled with /EHs do not catch or re-throw Structured Exceptions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   155
		);	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   156
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   157
		if (&main::Plat ne 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   158
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   159
				" /EHsc",			# Exceptions on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   160
				" /GR"				# RTTI on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   161
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   162
			if ($MSVCVer >= 8) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   163
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   164
					" /GS-"			# Buffer checking off
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   165
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   166
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   167
		} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   168
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   169
				" /EHsc",			# Exceptions on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   170
				" /GR",				# RTTI on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   171
				" /GS"				# Buffer checking on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   172
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   173
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   174
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   175
		if (&main::Plat ne 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   176
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   177
				" /GX",				# Exceptions on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   178
				" /GR"				# RTTI on
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   179
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   180
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   181
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   182
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   183
	if ($MSVCVer >= 8) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   184
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   185
			" /Zc:wchar_t-"				# Don't make wchar_t a built-in; breaks mangled names
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   186
		);		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   187
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   188
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   189
	if (&main::Plat ne 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   190
		unless ($Win32StdHeaders) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   191
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   192
				" /X"			# ignore standard include directories
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   193
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   194
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   195
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   196
	if ($CompilerOption !~ /\/W\d/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   197
		# Supply default warning level unless /Wn already specified via OPTION MSVC
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   198
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   199
			" $defaultWarningLevel"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   200
		);
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
		" $CompilerOption",		# user-supplied compiler options
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   204
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   205
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   206
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   207
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   208
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   209
		"CLDEFS  ="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   210
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   211
	foreach(@MacroList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   212
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   213
			" /D \"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   214
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   215
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   216
	if (($BasicTrgType=~/^LIB$/o) and (&main::Plat eq 'TOOLS')) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   217
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   218
			" /D _MT"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   219
		); 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   220
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   221
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   222
		" \$(USERDEFS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   223
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   224
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   225
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   226
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   227
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   228
			"CL$_ = cl.exe"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   229
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   230
		if ($BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   231
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   232
				' /MT'			# Creates a multi-threaded executable file, using libcmt.lib
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   233
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   234
			if (/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   235
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   236
					'd'				# i.e. /MTd or /MLd, debug executable using debug version of LIB
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   237
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   238
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   239
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   240
		elsif (($BasicTrgType=~/^(DLL|LIB)$/o) and (&main::Plat ne 'TOOLS')){
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   241
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   242
				' /MD'			# Creates a multithreaded DLL, using MSVCRT.LIB
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   243
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   244
			if (/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   245
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   246
					'd'				# i.e. /MDd, debug executable using debug version of LIB
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   247
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   248
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   249
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   250
		if (/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   251
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   252
				' /Zi',			# Generates complete debugging information
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   253
				' /Od'			# Disables optimization
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   254
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   255
#			euser change to apply inlining on the _NAKED functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   256
			if ($BaseTrg=~/^EUSER$/oi) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   257
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   258
					' /Ob1'		# Specific control of expension of inline functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   259
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   260
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   261
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   262
		elsif (/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   263
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   264
				' /O1'				# Creates small code
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   265
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   266
			if ($MSVCVer >= 8) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   267
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   268
					' /fp:strict'		# Improves floating-point consistency
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   269
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   270
			} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   271
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   272
					' /Op'				# Improves floating-point consistency
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
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   276
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   277
			' $(CLFLAGS)'
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
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   281
				" /Fd\"\$(EPOCTRG$_)\\$TrgDir$BaseTrg.pdb\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   282
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   283
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   284
		foreach (&main::MacroList($_)) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   285
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   286
				" /D $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   287
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   288
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   289
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   290
			" \$(CLDEFS) \$(INCDIR)\n"
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   294
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   295
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   296
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   297
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   298
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   299
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   300
			"$_ :"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   301
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   302
		if ($BasicTrgType !~ /^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   303
			&main::Output (
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   304
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   305
				"\t\"\$(EPOCTRG$_)\\$TrgDir$Trg\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   306
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   307
			unless (/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   308
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   309
					" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   310
					"\t\"\$(EPOCTRG$_)\\$BaseTrg.bsc\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   311
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   312
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   313
			if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   314
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   315
					" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   316
					"\t\"\$(EPOCTRG$_)\\$Trg\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   317
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   318
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   319
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   320
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   321
#		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
   322
		if ($DefFile and not &main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   323
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   324
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   325
				"\tLIBRARY\n"
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
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   329
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   330
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   331
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   332
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   333
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   334
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   335
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   336
		my $makework="MAKEWORK$_";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   337
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   338
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   339
			"RESOURCE$_ : $makework"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   340
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   341
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   342
		my $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   343
		foreach $BitMapRef (@$BitMapStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   344
			my $file="\$(EPOCTRG$_)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   345
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   346
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   347
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   348
				"\t\"$file\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   349
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   350
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   351
		undef $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   352
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   353
		my $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   354
		foreach $ResourceRef (@$ResourceStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   355
			my $file="\$(EPOCTRG$_)\\$$ResourceRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   356
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   357
			&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
   358
			" \\\n",		# *.rsg file in $EPOCIncPath
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   359
			"\t", &Generic_Quote("$file")
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   360
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   361
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   362
		undef $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   363
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   364
		my $AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   365
		foreach $AifRef (@$AifStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   366
			my $file="\$(EPOCTRG$_)\\$TrgDir$$AifRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   367
			&Generic_MakeWorkFile($makework,$file);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   368
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   369
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   370
				"\t\"$file\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   371
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   372
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   373
		undef $AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   374
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   375
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   376
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   377
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   378
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   379
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   380
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   381
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   382
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   383
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   384
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   385
		"LIBRARY : MAKEWORKLIBRARY"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   386
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   387
	if ($BasicTrgType=~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   388
#		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
   389
		foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   390
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   391
				" $_"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   392
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   393
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   394
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   395
	elsif ($DefFile and !$NoExportLibrary) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   396
		unless (&main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   397
			if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   398
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   399
					" \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   400
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   401
			} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   402
				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   403
					"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   404
					"\t\@echo WARNING: Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\".\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   405
					"\t\@echo When exports are frozen in \"$DefFile\", regenerate Makefile.\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   406
				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   407
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   408
		} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   409
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   410
				"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   411
				"\t\@echo Not attempting to create \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   412
				"\t\@echo from frozen .DEF file, since EXPORTUNFROZEN specified.\n"
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
		my $LibLinkAs = ($BasicTrgType=~/^IMPLIB$/io) ? $LinkAs : $Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   416
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   417
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   418
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   419
			"# REAL TARGET - LIBRARY\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   420
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   421
			"\"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\" : \"$DefFile\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   422
			"\tperl -S prepdef.pl \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.prep.def\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   423
			"\tlib.exe /nologo /machine:i386 /nodefaultlib /name:\"$LibLinkAs\"    /def:\"\$(EPOCBLD)\\$ExportLibrary.prep.def\" /out:\"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   424
			"\tdel \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.exp\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   425
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   426
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   427
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   428
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   429
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   430
		"FREEZE :\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   431
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   432
	if ($DefFile and $BasicTrgType !~ /^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   433
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   434
#			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
   435
			"\tperl -S efreeze.pl \$(EFREEZE_ALLOW_REMOVE) \"$DefFile\" \"\$(EPOCBLD)\\$ExportLibrary.def\" \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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   439
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   440
		"CLEANLIBRARY :\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   441
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   442
	if ($DefFile and !$NoExportLibrary) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   443
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   444
			"\t-\$(ERASE) \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   445
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   446
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   447
	&Generic_MakeWorkDir('MAKEWORKLIBRARY',"${LibPath}UDEB");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   448
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   449
	&Generic_Releaseables;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   450
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   451
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   452
sub PMBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   453
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   454
	my $AifStructRef=&main::AifStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   455
	my @SrcList=&main::SrcList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   456
	my $BaseTrg=&main::BaseTrg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   457
	my $BitMapStructRef=&main::BitMapStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   458
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   459
	my $ExportLibrary=&main::ExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   460
	my $NoExportLibrary=&main::NoExportLibrary;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   461
	my $DefFile=&main::DefFile;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   462
	my $EPOCIncPath=&main::EPOCIncPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   463
	my $FirstLib=&main::FirstLib;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   464
	my $BasicTrgType=&main::BasicTrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   465
	my @LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   466
	my $RelPath=&main::RelPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   467
	my $ResourceStructRef=&main::ResourceStructRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   468
	my @StatLibList=&main::StatLibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   469
	my $Trg=&main::Trg;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   470
	my $TrgPath=&main::TrgPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   471
	my $TrgType=&main::TrgType;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   472
	my $MSVCVer = &Winutl_MSVCVer;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   473
	my $newlib = main::NewLib(); # Check if newlib has been set in the MMP file.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   474
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   475
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   476
    my $NewLib = 'scppnwdl.lib'; # This is where operator new and operator delete
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   477
                                 # are defined for user side targets.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   478
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   479
    my $NewKernLib = 'scppnwdl_kern.lib'; # This is where operator new and operator delete
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   480
                                 	  # are defined for kernel side targets.
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
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   484
	my $WarningLevel='/WARN:3';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   485
	if (&main::Plat() eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   486
		$WarningLevel='/WARN:1';    # avoid LNK4005 warnings about unused libraries
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   487
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   488
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   489
	if ($Bld =~ /DEB/) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   490
		@LibList=&main::DebugLibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   491
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   492
		@LibList=&main::LibList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   493
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   494
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   495
	my $BLDTRGPATH = "\$(EPOCTRG$Bld)\\";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   496
	my $BLDDATAPATH = "\$(EPOCTRG$Bld)\\";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   497
	if (&main::Plat ne "WINC") {	# target paths ignored under WINC
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   498
		if (&Generic_Definition("TRGDIR") ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   499
			$BLDTRGPATH .= "\$(TRGDIR)\\";	    # handles TARGETPATH
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   500
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   501
		$BLDDATAPATH .= "\$(DATADIR)\\";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   502
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   503
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   504
	my $Entry="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   505
	my $EntrySymbol='';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   506
	my $Include="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   507
	if ($BasicTrgType=~/^DLL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   508
		$Entry="/noentry";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   509
		$Include="/include:\"__E32Dll\"";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   510
		$EntrySymbol='_E32Dll';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   511
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   512
	elsif ($TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   513
		$Entry="/noentry";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   514
		$Include="/include:\"__E32Startup\"";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   515
		$EntrySymbol='_E32Startup';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   516
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   517
	elsif ($BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   518
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   519
			$Entry="/entry:\"_E32Bootstrap\"";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   520
			$Include="/include:\"__E32Startup\"";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   521
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   522
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   523
	my $AbsentSubst = '';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   524
	if ($EntrySymbol) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   525
		$AbsentSubst = " -absent $EntrySymbol";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   526
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   527
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   528
	# REAL TARGETS
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   529
	#-------------
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   530
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   531
		"# REAL TARGET - BUILD VARIANT $Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   532
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   533
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   534
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   535
#	releasables
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   536
	my @releaseables;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   537
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   538
	unless (&main::Plat() eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   539
		if ($BasicTrgType !~ /^IMPLIB$/io) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   540
			push @releaseables, "$BLDTRGPATH$Trg";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   541
			if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   542
				push @releaseables, "\$(EPOCTRG$Bld)\\$Trg";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   543
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   544
			my $BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   545
			foreach $BitMapRef (@$BitMapStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   546
				push @releaseables, "\$(EPOCTRG$Bld)\\$$BitMapRef{TrgPath}$$BitMapRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   547
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   548
			my $ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   549
			foreach $ResourceRef (@$ResourceStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   550
				push @releaseables, "\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   551
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   552
			my $AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   553
			foreach $AifRef (@$AifStructRef) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   554
				push @releaseables, "$BLDTRGPATH$$AifRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   555
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   556
			if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   557
				push @releaseables,"$BLDTRGPATH$BaseTrg.PDB";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   558
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   559
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   560
		if (-e $DefFile and !$NoExportLibrary) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   561
			push @releaseables, "\$(EPOCLIB$Bld)\\$ExportLibrary.lib";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   562
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   563
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   564
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   565
		my $toolspath=&main::EPOCToolsPath();
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   566
		push @releaseables, "$toolspath$Trg";
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   570
		"WHAT$Bld : WHATGENERIC\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   571
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   572
		"CLEAN$Bld : CLEANBUILD$Bld CLEANRELEASE$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   573
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   574
		"CLEANBUILD$Bld : CLEANILK$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   575
		"\t\@perl -S ermdir.pl \"\$(EPOCBLD$Bld)\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   576
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   577
		"CLEANRELEASE$Bld : CLEANGENERIC CLEANILK$Bld\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   578
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   579
		"CLEANILK$Bld :\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   580
		"\t-\$(ERASE) \"$BLDTRGPATH$BaseTrg.ILK\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   581
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   582
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   583
	&Generic_WhatCleanTargets($Bld, "WHAT$Bld", "CLEANRELEASE$Bld", @releaseables);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   584
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   585
	&Generic_MakeWorkDir("MAKEWORK$Bld", &main::BldPath);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   586
	&Generic_MakeWorkDir("MAKEWORK$Bld", $BLDTRGPATH);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   587
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   588
	return if ($BasicTrgType =~ /^IMPLIB$/io);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   589
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   590
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   591
		"LISTING$Bld : MAKEWORK$Bld"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   592
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   593
	foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   594
		my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   595
		my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   596
		$BaseSrc.='_' if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   597
   		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   598
			" \\\n\tLISTING$Bld$BaseSrc"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   599
   		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   600
   	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   601
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   602
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   603
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   604
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   605
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   606
	if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   607
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   608
			"BSC32_SBRS="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   609
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   610
		foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   611
			my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   612
			my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   613
			$BaseSrc.='_' if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   614
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   615
				" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   616
				"\t\"\$(EPOCBLD$Bld)\\$BaseSrc.sbr\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   617
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   618
   		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   619
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   620
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   621
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   622
		"\"\$(EPOCTRG$Bld)\\$BaseTrg.bsc\" : \$(BSC32_SBRS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   623
		"\tbscmake.exe \@<<\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   624
		"\t/nologo /o\$\@ \$(BSC32_SBRS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   625
		"<<\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   626
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   627
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   628
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   629
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   630
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   631
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   632
		"LIBS="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   633
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   634
	foreach (@StatLibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   635
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   636
			" \\\n\t\"\$(EPOCSTATLINK$Bld)\\$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   637
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   638
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   639
	foreach (@LibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   640
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   641
			" \\\n\t\"\$(EPOCLINK$Bld)\\$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   642
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   643
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   644
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   645
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   646
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   647
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   648
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   649
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   650
		"LINK_OBJS="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   651
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   652
	foreach (@SrcList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   653
		my $BaseSrc = &main::Path_Split('Base', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   654
		my $Ext = &main::Path_Split('Ext', $_);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   655
		$BaseSrc.='_' if (lc($Ext) eq '.cia');
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   656
   		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   657
			" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   658
			"\t\"\$(EPOCBLD$Bld)\\$BaseSrc.obj\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   659
   		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   660
   	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   661
	if ($Win32Resrc) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   662
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   663
			" \\\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   664
			"\t\"\$(EPOCBLD$Bld)\\",&main::Path_Split('Base',$Win32Resrc),".res\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   665
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   666
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   667
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   668
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   669
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   670
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   671
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   672
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   673
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   674
			"STAGE1_LINK_FLAGS="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   675
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   676
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   677
			"\"\$(EPOCSTATLINK$Bld)\\$FirstLib\""
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
        if (main::StdCppSupport())
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   681
        {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   682
            unless ($newlib) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   683
		    	if ( main::SystemTrg() ) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   684
		    		# System targets are PDD, LDD, VAR, KEXT and KDLL.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   685
		    		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   686
		    			"\"\$(EPOCSTATLINK$Bld)\\$NewKernLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   687
		    		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   688
		    	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   689
		    	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   690
		    		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   691
		    			"\"\$(EPOCSTATLINK$Bld)\\$NewLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   692
		    		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   693
		    	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   694
		    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   695
	    	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   696
	    		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   697
				    "\"\$(EPOCSTATLINK$Bld)\\$newlib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   698
			    );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   699
		    }    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   700
        }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   701
		
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   702
		foreach (@Win32LibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   703
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   704
				' ',lc $_
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   705
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   706
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   707
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   708
			" \$(LIBS) /nologo$BaseAddressFlag $Entry /subsystem:windows /dll"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   709
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   710
		if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   711
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   712
				' /debug'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   713
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   714
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   715
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   716
			" /incremental:no /machine:IX86"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   717
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   718
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   719
		if ($BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   720
			my $debug = '';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   721
			if ($Bld =~ /DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   722
				$debug .= 'd';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   723
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   724
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   725
				" /nodefaultlib:libcmt$debug.lib"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   726
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   727
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   728
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   729
			" $Include /out:\"\$(EPOCBLD$Bld)\\$Trg\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   730
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   731
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   732
		if ($MSVCVer < 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   733
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   734
				" $WarningLevel"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   735
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   736
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   737
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   738
			" /implib:\"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   739
			' /ignore:4089',		# LNK4089: all references to "dynamic-link library" discarded by /OPT:REF
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   740
			' /ignore:4005'			# LNK4005: no objects used from XXX
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   741
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   742
		if ($MSVCVer >= 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   743
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   744
				' /ignore:4210'		# LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   745
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   746
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   747
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   748
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   749
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   750
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   751
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   752
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   753
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   754
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   755
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   756
		'LINK_FLAGS='
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   757
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   758
	if ($BasicTrgType=~/^(EXE|DLL)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   759
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   760
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   761
				" \"\$(EPOCSTATLINK$Bld)\\$FirstLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   762
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   763
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   764
            if (main::StdCppSupport())
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   765
            {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   766
                unless ($newlib) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   767
			    	if ( main::SystemTrg() ) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   768
				    	# System targets are PDD, LDD, VAR, KEXT and KDLL.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   769
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   770
					    &main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   771
						    "\"\$(EPOCSTATLINK$Bld)\\$NewKernLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   772
					    );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   773
	    			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   774
		    		else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   775
			    		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   776
				    		"\"\$(EPOCSTATLINK$Bld)\\$NewLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   777
					    );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   778
    				}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   779
	    		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   780
		    	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   781
			    	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   782
				    	"\"\$(EPOCSTATLINK$Bld)\\$newlib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   783
    				);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   784
	    		}
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
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   788
	foreach (@Win32LibList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   789
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   790
			' ',lc $_
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
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   794
		' $(LIBS) /nologo'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   795
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   796
	if ($BasicTrgType=~/^(EXE|DLL)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   797
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   798
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   799
				" /fixed:no $BaseAddressFlag"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   800
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   801
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   802
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   803
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   804
		" $Entry"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   805
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   806
	if (&main::Plat=~/^(WINC|TOOLS)$/o && $BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   807
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   808
			' /subsystem:console'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   809
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   810
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   811
	else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   812
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   813
			' /subsystem:windows'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   814
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   815
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   816
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   817
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   818
			" /dll \"\$(EPOCBLD$Bld)\\$ExportLibrary.exp\""
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
	if (&main::HeapSize) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   822
		my %HeapSize=&main::HeapSize;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   823
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   824
			' /heap:',$HeapSize{Max},',',$HeapSize{Min}
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
	if ($BasicTrgType=~/^(DLL|EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   828
		if ($Bld=~/DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   829
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   830
				' /debug'
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   831
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   832
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   833
		elsif ($Bld=~/REL$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   834
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   835
				' /incremental:no'
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
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   839
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   840
		' /machine:IX86',
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   841
		' /ignore:4089',	# LNK4089: all references to "dynamic-link library" discarded by /OPT:REF
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   842
		' /ignore:4005'		# LNK4005: no objects used from XXX
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   843
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   844
	if ($MSVCVer >= 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   845
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   846
			' /ignore:4210'		# LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   847
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   848
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   849
	if (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   850
	    if (length(&main::LinkerOption("MSVC")) > 0)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   851
	    {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   852
		&main::OutFormat( " " . &main::LinkerOption("MSVC"));
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   853
	    } else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   854
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   855
			' /ignore:4098'	# LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   856
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   857
	    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   858
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   859
	else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   860
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   861
		if ($BasicTrgType=~/^EXE$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   862
			my $debug = '';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   863
			if ($Bld =~ /DEB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   864
				$debug .= 'd';
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   865
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   866
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   867
				" /nodefaultlib:libcmt$debug.lib"
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
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   871
			" $Include"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   872
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   873
	} 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   874
	&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   875
		" /out:\"$BLDTRGPATH$Trg\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   876
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   877
	if ($BasicTrgType=~/^(DLL)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   878
		if ($MSVCVer < 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   879
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   880
				" $WarningLevel"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   881
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   882
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   883
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   884
			" /implib:\"$BLDTRGPATH$ExportLibrary.lib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   885
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   886
	} elsif ($BasicTrgType=~/^(EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   887
		if ($MSVCVer < 7) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   888
			&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   889
				" $WarningLevel"
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
		&main::OutFormat(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   893
			" /implib:\"$BLDTRGPATH$ExportLibrary.exe.lib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   894
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   895
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   896
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   897
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   898
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   899
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   900
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   901
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   902
		"\"$BLDTRGPATH$Trg\" : \$(LINK_OBJS)"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   903
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   904
	if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   905
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   906
			" \"$DefFile\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   907
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   908
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   909
	if ($BasicTrgType=~/^(DLL|EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   910
		unless (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   911
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   912
				" \"\$(EPOCSTATLINK$Bld)\\$FirstLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   913
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   914
			
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   915
			if (main::StdCppSupport())
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   916
			{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   917
			    unless ($newlib) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   918
    				if ( main::SystemTrg() ) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   919
	    				# System targets are PDD, LDD, VAR, KEXT and KDLL.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   920
    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   921
	    				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   922
		    				"\"\$(EPOCSTATLINK$Bld)\\$NewKernLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   923
			    		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   924
				    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   925
    				else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   926
	    				&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   927
		    				"\"\$(EPOCSTATLINK$Bld)\\$NewLib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   928
			    		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   929
				    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   930
    			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   931
	    		else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   932
		    		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   933
			    		"\"\$(EPOCSTATLINK$Bld)\\$newlib\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   934
				    );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   935
    			}		    
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   936
			}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   937
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   938
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   939
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   940
		" \$(LIBS)\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   941
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   942
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   943
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   944
#	Link by name first time round for dlls
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   945
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   946
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   947
			"\tlink.exe \@<<\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   948
			"\t\t\$(STAGE1_LINK_FLAGS) \$(LINK_OBJS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   949
			"<<\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   950
			"\tdel \"\$(EPOCBLD$Bld)\\$Trg\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   951
			"\tdel \"\$(EPOCBLD$Bld)\\$ExportLibrary.exp\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   952
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   953
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   954
#		Generate an export info file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   955
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   956
			"\tdumpbin /exports /out:\"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\" \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   957
			"\tdel \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\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
#		call makedef to reorder the export information
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   961
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   962
#			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
   963
			"\tperl -S makedef.pl $AbsentSubst -Inffile \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   964
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   965
		if (SysTrg()) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   966
    			&main::Output( "\t\t-SystemTargetType \\\n" );
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   967
    		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   968
		if (-e $DefFile) { # effectively "if project frozen ..."
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   969
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   970
				" -Frzfile \"$DefFile\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   971
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   972
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   973
		# freeze ordinals, a maximum of 2, for polymorphic dlls
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   974
		my $Ordinal;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   975
		my $Num=1;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   976
		foreach $Ordinal (&main::Exports) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   977
#			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
   978
			$Ordinal=~s-\$-\$\$-go;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   979
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   980
				" -$Num $Ordinal"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   981
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   982
			$Num++;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   983
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   984
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   985
			" \"\$(EPOCBLD)\\$ExportLibrary.def\" \n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   986
			"\tdel \"\$(EPOCBLD$Bld)\\$ExportLibrary.inf\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   987
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   988
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   989
		# create the export object from the .DEF file
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   990
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   991
			"\tlib.exe  /nologo /machine:i386 /nodefaultlib /name:\"$Trg\" /def:\"\$(EPOCBLD)\\$ExportLibrary.def\" /out:\"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   992
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   993
		if (&main::ExportUnfrozen) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   994
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   995
			"\tcopy \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\" \"\$(EPOCLIB)\\UDEB\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   996
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   997
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   998
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   999
			"\tdel \"\$(EPOCBLD$Bld)\\$ExportLibrary.lib\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1000
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1001
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1002
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1003
	if ($BasicTrgType=~/^(DLL|EXE)$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1004
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1005
			"\tlink.exe \@<<\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1006
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1007
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1008
	elsif ($BasicTrgType=~/^LIB$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1009
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1010
			"\tlib.exe \@<<\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1011
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1012
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1013
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1014
		"\t\t\$(LINK_FLAGS) \$(LINK_OBJS)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1015
		"<<\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1016
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1017
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1018
	if ($BasicTrgType=~/^DLL$/o || $TrgType=~/^EXEXP$/o) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1019
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1020
			"\tdel \"\$(EPOCBLD$Bld)\\$ExportLibrary.exp\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1021
		);
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
	if (&main::Plat eq 'TOOLS') {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1025
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1026
			"\tcopy \"$BLDTRGPATH$Trg\" \"",&main::EPOCToolsPath,"$Trg\"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1027
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1028
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1029
	if (&Winutl_CopyForStaticLinkage) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1030
		&Generic_MakeWorkDir("MAKEWORK$Bld", "\$(EPOCTRG$Bld)");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1031
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1032
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1033
			"\"\$(EPOCTRG$Bld)\\$Trg\" : \"$BLDTRGPATH$Trg\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1034
			"\tcopy \$\? \$\@\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1035
		);
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1039
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1040
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1041
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1042
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1043
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1044
sub PMStartSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1045
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1046
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1047
		"# SOURCES\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1048
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1049
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1050
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1051
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1052
sub PMBitMapBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1053
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1054
	&Generic_BitMapBld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1055
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1056
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1057
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1058
	my $BitMapRef=&main::BitMapRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1059
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1060
	my $ChopTrgPath="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1061
	if ($$BitMapRef{TrgPath}) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1062
		$ChopTrgPath.="\\$$BitMapRef{TrgPath}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1063
		chop $ChopTrgPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1064
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1065
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1066
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1067
	my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1068
	foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1069
		my $path="\$(EPOCTRG$Bld)$ChopTrgPath";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1070
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1071
			&Generic_Quote("$path\\$$BitMapRef{Trg}"), " : ", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1072
			&Generic_Quote("$$BitMapRef{GenericTrg}"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1073
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1074
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1075
		);
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
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1080
sub PMResrcBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1081
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1082
	&Generic_ResrcBld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1083
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1084
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1085
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1086
	my $ResourceRef=&main::ResourceRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1087
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1088
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1089
	foreach my $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1090
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1091
			&Generic_Quote("\$(EPOCTRG$Bld)\\$$ResourceRef{Trg}"), " : ", 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1092
			&Generic_Quote("$$ResourceRef{GenericTrg}"), "\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1093
			"\t", &Generic_CopyAction(),
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1094
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1095
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1096
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1097
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1098
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1099
sub PMAifBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1100
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1101
	&Generic_AifBld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1102
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1103
	# Need to copy generic resource into emulated Z drive
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1104
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1105
	my $AifRef=&main::AifRef;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1106
	my $TrgDir="";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1107
	if (&Generic_Definition("TRGDIR") ne "") {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1108
		$TrgDir="\\\$(TRGDIR)";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1109
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1110
	if (&main::Plat eq "WINC") {	# target path ignored under WINC
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1111
		$TrgDir="";
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
	my @BldList=&main::BldList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1115
	my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1116
	foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1117
		my $file="\$(EPOCTRG$Bld)$TrgDir\\$$AifRef{Trg}";
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1118
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1119
			"\"$file\" : \"$$AifRef{GenericTrg}\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1120
			"\tperl -S ecopyfile.pl \$? \$\@\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1121
			"\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
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1125
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1126
sub PMStartSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1127
	my $Src=&main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1128
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1129
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1130
		"# Source $Src\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1131
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1132
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1133
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1134
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1135
sub PMSrcDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1136
	my @BldList=&main::BldList;	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1137
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1138
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1139
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1140
		"DEPEND="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1141
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1142
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1143
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1144
		" \\\n\t\"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1145
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1146
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1147
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1148
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1149
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1150
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1151
	foreach (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1152
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1153
			"DEPEND$_=\$(DEPEND)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1154
			"\n"
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
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1158
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1159
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1160
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1161
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1162
sub PMSrcBldDepend {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1163
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1164
	my @DepList=&main::DepList;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1165
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1166
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1167
		"DEPEND$Bld="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1168
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1169
	foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1170
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1171
			" \\\n\t\"$_\""
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1172
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1173
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1174
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1175
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1176
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1177
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1178
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1179
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1180
sub PMEndSrcBld {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1181
	my $BaseSrc=&main::BaseSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1182
	my $Bld=&main::Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1183
	my $Plat=&main::Plat;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1184
	my $Src=ucfirst lc &main::Src;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1185
	my $SrcPath=&main::SrcPath;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1186
	my $Ext=&main::ExtSrc;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1187
	my $Cia = (lc($Ext) eq '.cia') ? 1 : 0;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1188
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1189
	if ($Cia) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1190
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1191
			"\"\$(EPOCBLD$Bld)\\$BaseSrc\_.obj\" \"\$(EPOCBLD$Bld)\\$BaseSrc\_.sbr\" : \"$SrcPath$Src\" \$(DEPEND$Bld)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1192
			"\t\$(CL$Bld) /TP /Fo\"\$(EPOCBLD$Bld)\\$BaseSrc\_.obj\" /FR\"\$(EPOCBLD$Bld)\\$BaseSrc\_.sbr\" /c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1193
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1194
#		assembler listing target 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1195
			"LISTING$Bld$BaseSrc\_ : \"\$(EPOCBLD$Bld)\\$BaseSrc\_.lis\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1196
			"\tcopy \$? \"$SrcPath$BaseSrc\_.$Plat.lst\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1197
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1198
			"\"\$(EPOCBLD$Bld)\\$BaseSrc\_.lis\": \"$SrcPath$Src\" \$(DEPEND$Bld)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1199
			"\t\$(CL$Bld) /TP /Fa\"\$\@\" /Fo\"\$(EPOCBLD$Bld)\\$BaseSrc\_.obj\" /FR\"\$(EPOCBLD$Bld)\\$BaseSrc\_.sbr\" /c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1200
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1201
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1202
	} else {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1203
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1204
			"\"\$(EPOCBLD$Bld)\\$BaseSrc.obj\" \"\$(EPOCBLD$Bld)\\$BaseSrc.sbr\" : \"$SrcPath$Src\" \$(DEPEND$Bld)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1205
			"\t\$(CL$Bld) /Fo\"\$(EPOCBLD$Bld)/\" /FR\"\$(EPOCBLD$Bld)\\$BaseSrc.sbr\" /c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1206
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1207
#		assembler listing target 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1208
			"LISTING$Bld$BaseSrc : \"\$(EPOCBLD$Bld)\\$BaseSrc.lis\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1209
			"\tcopy \$? \"$SrcPath$BaseSrc.$Plat.lst\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1210
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1211
			"\"\$(EPOCBLD$Bld)\\$BaseSrc.lis\": \"$SrcPath$Src\" \$(DEPEND$Bld)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1212
			"\t\$(CL$Bld) /Fa\"\$\@\" /Fo\"\$(EPOCBLD$Bld)/\" /FR\"\$(EPOCBLD$Bld)\\$BaseSrc\_.sbr\" /c \"$SrcPath$Src\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1213
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1214
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1215
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1216
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1217
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1218
sub PMEndSrc {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1219
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1220
	&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1221
		"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1222
		"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1223
	);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1224
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1225
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1226
sub PMEndSrcList {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1227
	if ($Win32Resrc) {
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 @DepList=&main::Deps_GenDependsL($Win32Resrc);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1230
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1231
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1232
			"# Win32 Resource $Win32Resrc\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1233
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1234
			"DEPEND="
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1235
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1236
		foreach (@DepList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1237
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1238
				" \\\n\t\"$_\""
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
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1242
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1243
			"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1244
		);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1245
	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1246
		my $Bld;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1247
		foreach $Bld (@BldList) {
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1248
			&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1249
				"\"\$(EPOCBLD$Bld)\\",&main::Path_Split('Base',$Win32Resrc),".res\" : \"$Win32Resrc\" \$(DEPEND)\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1250
				"\trc /l 0x809 /fo\$\@ /i \"",&main::Path_Chop(&main::Path_Split('Path',$Win32Resrc)),"\" \"$Win32Resrc\"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1251
				"\n"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1252
			);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1253
		}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1254
		&main::Output(
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1255
			"\n",
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1256
			"\n"
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
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1260
	# Deal with accumulated MAKEDIRS etc.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1261
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1262
	&Generic_End;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1263
}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1264
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
  1265
1;