Subversion Repositories DevTools

Rev

Rev 335 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 335 Rev 343
Line 684... Line 684...
684
sub ToolsetPROJECT
684
sub ToolsetPROJECT
685
{
685
{
686
    my( $name, $solution ,$pArgs ) = @_;
686
    my( $name, $solution ,$pArgs ) = @_;
687
    my $buildcmd = $toolset_info->{'buildcmd'};
687
    my $buildcmd = $toolset_info->{'buildcmd'};
688
    my $cleancmd = $toolset_info->{'cleancmd'};
688
    my $cleancmd = $toolset_info->{'cleancmd'};
-
 
689
    my $release = 'RELEASE';
-
 
690
    my $debug = 'DEBUG';
689
 
691
 
690
    #
692
    #
691
    #   Process options
693
    #   Process options
692
    #
694
    #
693
    foreach ( @$pArgs ) {
695
    foreach ( @$pArgs ) {
-
 
696
        if ( m/^--TargetProd*=(.+)/ ) {
-
 
697
            $release = $1;
-
 
698
 
-
 
699
        } elsif ( m/^--TargetDebug=(.+)/ ) {
-
 
700
            $debug = $1;
-
 
701
            
-
 
702
        } else {
694
        Message( "$toolset_name PROJECT: unknown option $_ -- ignored\n" );
703
            Message( "$toolset_name PROJECT: unknown option $_ -- ignored\n" );
-
 
704
        }
695
    }
705
    }
696
 
706
 
697
    my ($io) = ToolsetPrinter::New();
707
    my ($io) = ToolsetPrinter::New();
698
 
708
 
699
    #
709
    #
700
    #   Setup toolset pecific difinitions. Once
710
    #   Setup toolset pecific difinitions. Once
701
    #
711
    #
702
    unless( $project_defines_done )
712
    unless( $project_defines_done )
703
    {
713
    {
704
        $project_defines_done = 1;
714
        $project_defines_done = 1;
705
        $io->PrtLn( "ifeq \"\$(DEBUG)\" \"1\"");
715
        $io->PrtLn( 'project_target = $(if $(findstring 1,$(DEBUG)),$2,$1)' );
706
        $io->PrtLn( "PROJECT_CMD\t:= DEBUG");
-
 
707
        $io->PrtLn( "else");
-
 
708
        $io->PrtLn( "PROJECT_CMD\t:= RELEASE");
-
 
709
        $io->PrtLn( "endif");
-
 
710
        $io->Newline();
716
        $io->Newline();
711
    }
717
    }
712
 
718
 
713
    #
719
    #
714
    #   Process the build and clean commands
720
    #   Process the build and clean commands
715
    #       Substitute arguments
721
    #       Substitute arguments
716
    #           =TYPE=
722
    #           =TYPE=
717
    #           =LOG=
723
    #           =LOG=
718
    #           =DSW=
724
    #           =DSW=
719
    #
725
    #
720
    $buildcmd =~ s~=TYPE=~\$\(PROJECT_CMD)~g;
726
    $buildcmd =~ s~=TYPE=~"\$(call project_target,$release,$debug)"~g;
721
    $buildcmd =~ s~=LOG=~$name\$(GBE_TYPE).log~g;
727
    $buildcmd =~ s~=LOG=~$name\$(GBE_TYPE).log~g;
722
    $buildcmd =~ s~=DSW=~$solution~g;
728
    $buildcmd =~ s~=DSW=~$solution~g;
723
 
729
 
724
    $cleancmd =~ s~=TYPE=~\$\(PROJECT_CMD)~g;
730
    $cleancmd =~ s~=TYPE=~"\$(call project_target,$release,$debug)"~g;
725
    $cleancmd =~ s~=LOG=~$name\$(GBE_TYPE).log~g;
731
    $cleancmd =~ s~=LOG=~$name\$(GBE_TYPE).log~g;
726
    $cleancmd =~ s~=DSW=~$solution~g;
732
    $cleancmd =~ s~=DSW=~$solution~g;
727
    
733
    
728
    #
734
    #
729
    #   Generate the recipe to create the project
735
    #   Generate the recipe to create the project
730
    #   Use the set_WIN32.sh file to extend the DLL search path
736
    #   Use the set_<PLATFORM>.sh file to extend the DLL search path
731
    #
737
    #
732
    $io->Label( "Build project", $name );
738
    $io->Label( "Build project", $name );
733
    $io->PrtLn( "Project_$name: $solution \$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
739
    $io->PrtLn( "Project_$name: $solution \$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
734
 
740
 
735
    $io->PrtLn( "\t\$(XX_PRE)( \$(rm) -f $name\$(GBE_TYPE).log; \\" );
741
    $io->PrtLn( "\t\$(XX_PRE)( \$(rm) -f $name\$(GBE_TYPE).log; \\" );