Subversion Repositories DevTools

Rev

Rev 227 | Rev 261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 255
Line 27... Line 27...
27
#
27
#
28
my $toolset_info;
28
my $toolset_info;
29
my $toolset_version = 'MSVC6';
29
my $toolset_version = 'MSVC6';
30
my %ToolsetVersion =
30
my %ToolsetVersion =
31
    (
31
    (
32
        'MSVC6'      =>  { 'def'      => 'vcwin32.def' ,
32
        'MSVC6'      =>  { 'def'        => 'vcwin32.def' ,
33
                           'buildcmd' => 'msdev =DSW= /make "ALL - =TYPE=" /useenv /out =LOG=' ,
33
                           'buildcmd'   => 'msdev =DSW= /make "ALL - =TYPE=" /useenv /out =LOG=' ,
34
                           'cleancmd' => 'msdev =DSW= /make "ALL - =TYPE=" /clean /useenv' ,
34
                           'cleancmd'   => 'msdev =DSW= /make "ALL - =TYPE=" /clean /useenv' ,
35
                           'tmp'      => 'vc60'},
35
                           'tmp'        => 'vc60',
-
 
36
                           'VSCOMPILER' => '1',
-
 
37
                           },
36
 
38
 
37
        'MS.NET2003' =>  { 'def'      => 'vcwin32_net2003.def' ,
39
        'MS.NET2003' =>  { 'def'        => 'vcwin32_net2003.def' ,
38
                           'buildcmd' => 'devenv =DSW= /build =TYPE= /useenv /out =LOG=' ,
40
                           'buildcmd'   => 'devenv =DSW= /build =TYPE= /useenv /out =LOG=' ,
39
                           'cleancmd' => 'devenv =DSW= /clean =TYPE= /useenv' ,
41
                           'cleancmd'   => 'devenv =DSW= /clean =TYPE= /useenv' ,
40
                           'tmp'      => 'vc70'},
42
                           'tmp'        => 'vc70',
-
 
43
                           'VSCOMPILER' => '2',
-
 
44
                           },
-
 
45
                           
-
 
46
        'MS.NET2005' =>  { 'def'        => 'vcwin32_net2005.def' ,
-
 
47
                           'buildcmd'   => 'devenv =DSW= /build =TYPE= /useenv /out =LOG=' ,
-
 
48
                           'cleancmd'   => 'devenv =DSW= /clean =TYPE= /useenv' ,
-
 
49
                           'tmp'        => 'vc80',
-
 
50
                           'VSCOMPILER' => '3',
-
 
51
                           'GenManifest' => '1',
-
 
52
                           },
41
    );
53
    );
42
 
54
 
43
 
55
 
44
##############################################################################
56
##############################################################################
45
#   ToolsetInit()
57
#   ToolsetInit()
Line 81... Line 93...
81
            Message( "vcwin32 toolset: unknown platform argument $_ -- ignored\n" );
93
            Message( "vcwin32 toolset: unknown platform argument $_ -- ignored\n" );
82
        }
94
        }
83
    }
95
    }
84
 
96
 
85
#.. Validate SDK version
97
#.. Validate SDK version
86
#   Currently two versions are supported
98
#   Currently three versions are supported
87
#       1) MSVC6            - As provided via Visual Studio
99
#       1) MSVC6            - As provided via Visual Studio
88
#       2) MSVS.net 2003    - Used to create .NET applications
100
#       2) MSVS.net 2003    - Used to create .NET applications
-
 
101
#       2) MSVS.net 2005    - Used to create .NET applications
89
#
102
#
90
    $toolset_info = $ToolsetVersion{$toolset_version};
103
    $toolset_info = $ToolsetVersion{$toolset_version};
91
    Error( "Unknown version: $toolset_version" ) unless ( defined $toolset_info );
104
    Error( "Unknown version: $toolset_version" ) unless ( defined $toolset_info );
92
 
105
 
93
 
106
 
Line 106... Line 119...
106
    $::ScmToolsetIFLAG3 = 1;                    # supports IFLAG3
119
    $::ScmToolsetIFLAG3 = 1;                    # supports IFLAG3
107
 
120
 
108
#.. define Visual C/C+ environment
121
#.. define Visual C/C+ environment
109
    Init( "visualc" );
122
    Init( "visualc" );
110
    ToolsetDefines( $toolset_info->{'def'} );
123
    ToolsetDefines( $toolset_info->{'def'} );
-
 
124
    PlatformDefine ("VSCOMPILER\t= $toolset_info->{'VSCOMPILER'}" );
111
    ToolsetRequire( "exctags" );                # and Exuberant Ctags
125
    ToolsetRequire( "exctags" );                # and Exuberant Ctags
112
    ToolsetRules( "vcwin32.rul" );
126
    ToolsetRules( "vcwin32.rul" );
113
    ToolsetRules( "standard.rul" );
127
    ToolsetRules( "standard.rul" );
114
 
128
 
115
#.. define PCLint envrionment
129
#.. define PCLint envrionment
Line 719... Line 733...
719
        ToolsetGenerate( "\$(LIBDIR)/${lib}.dep" );
733
        ToolsetGenerate( "\$(LIBDIR)/${lib}.dep" );
720
        ToolsetGenerate( "\$(LIBDIR)/${lib}.map" );
734
        ToolsetGenerate( "\$(LIBDIR)/${lib}.map" );
721
        ToolsetGenerate( "\$(LIBDIR)/${lib}.exp" );
735
        ToolsetGenerate( "\$(LIBDIR)/${lib}.exp" );
722
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ilk" );
736
        ToolsetGenerate( "\$(LIBDIR)/${lib}.ilk" );
723
        ToolsetGenerate( "\$(LIBDIR)/${full}" );
737
        ToolsetGenerate( "\$(LIBDIR)/${full}" );
-
 
738
        ToolsetGenerate( "\$(LIBDIR)/${full}.manifest" ) if $toolset_info->{'GenManifest'};
724
 
739
 
725
    #.. Linker rules
740
    #.. Linker rules
726
    #
741
    #
727
        my ($io) = ToolsetPrinter::New();
742
        my ($io) = ToolsetPrinter::New();
728
 
743
 
Line 1024... Line 1039...
1024
        }
1039
        }
1025
    }
1040
    }
1026
 
1041
 
1027
#.. Cleanup rules
1042
#.. Cleanup rules
1028
#
1043
#
1029
#   dep     Dependency file
1044
#   dep             Dependency file
1030
#   ld      Linker command file
1045
#   ld              Linker command file
1031
#   map     Map file
1046
#   map             Map file
1032
#   pdb     Microsoft C/C++ program database
1047
#   pdb             Microsoft C/C++ program database
1033
#   ilk     Microsoft Linker Database
1048
#   ilk             Microsoft Linker Database
1034
#   res     Compiled resource script
1049
#   res             Compiled resource script
-
 
1050
#   .exe.manifest   Manifest file (VS2005)
1035
#
1051
#
1036
    ToolsetGenerate( "\$(BINDIR)/${name}.dep" );
1052
    ToolsetGenerate( "\$(BINDIR)/${name}.dep" );
1037
    ToolsetGenerate( "\$(BINDIR)/${name}.ld" );
1053
    ToolsetGenerate( "\$(BINDIR)/${name}.ld" );
1038
    ToolsetGenerate( "\$(BINDIR)/${name}.map" );
1054
    ToolsetGenerate( "\$(BINDIR)/${name}.map" );
1039
    ToolsetGenerate( "\$(BINDIR)/${name}.pdb" );
1055
    ToolsetGenerate( "\$(BINDIR)/${name}.pdb" );
1040
    ToolsetGenerate( "\$(BINDIR)/${name}.ilk" );
1056
    ToolsetGenerate( "\$(BINDIR)/${name}.ilk" );
-
 
1057
    ToolsetGenerate( "\$(BINDIR)/${name}.exe.manifest" ) if $toolset_info->{'GenManifest'};
1041
 
1058
 
1042
#.. Linker command
1059
#.. Linker command
1043
#
1060
#
1044
    my ($io) = ToolsetPrinter::New();
1061
    my ($io) = ToolsetPrinter::New();
1045
 
1062
 
Line 1387... Line 1404...
1387
    $io->Label( "Build project", $name );
1404
    $io->Label( "Build project", $name );
1388
    $io->PrtLn( "Project_$name: $solution \$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
1405
    $io->PrtLn( "Project_$name: $solution \$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
1389
 
1406
 
1390
    $io->PrtLn( "\t\$(XX_PRE)( \$(rm) -f $name\$(GBE_TYPE).log; \\" );
1407
    $io->PrtLn( "\t\$(XX_PRE)( \$(rm) -f $name\$(GBE_TYPE).log; \\" );
1391
    $io->PrtLn( "\t. \$(INTERFACEDIR)/set_$::ScmPlatform.sh; \\" );
1408
    $io->PrtLn( "\t. \$(INTERFACEDIR)/set_$::ScmPlatform.sh; \\" );
-
 
1409
    $io->PrtLn( "\t\$(show_environment); \\" );
1392
    $io->PrtLn( "\t$buildcmd; \\" );
1410
    $io->PrtLn( "\t$buildcmd; \\" );
1393
    $io->PrtLn( "\tret=\$\$?; \\" );
1411
    $io->PrtLn( "\tret=\$\$?; \\" );
1394
    $io->PrtLn( "\t\$(GBE_BIN)/cat $name\$(GBE_TYPE).log; \\" );
1412
    $io->PrtLn( "\t\$(GBE_BIN)/cat $name\$(GBE_TYPE).log; \\" );
1395
    $io->PrtLn( "\texit \$\$ret )" );
1413
    $io->PrtLn( "\texit \$\$ret )" );
1396
    $io->Newline();
1414
    $io->Newline();