Subversion Repositories DevTools

Rev

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

Rev 227 Rev 261
Line 13... Line 13...
13
# Version   Who      Date        Description
13
# Version   Who      Date        Description
14
# 1.0       APY      07/05/99    Created
14
# 1.0       APY      07/05/99    Created
15
# 1.3       APY      06/12/99    NetTcp/NetUdp linker options
15
# 1.3       APY      06/12/99    NetTcp/NetUdp linker options
16
#                    09/12/99    ToolsetProg()
16
#                    09/12/99    ToolsetProg()
17
# 1.5                06/01/00    Linker --Kdb support
17
# 1.5                06/01/00    Linker --Kdb support
18
#                    07/01/00    ifeq "$(IFLAG)" "2"
18
#                    07/01/00    ifeq "$(IFLAG)" "3"
19
#                                  around -include directives
19
#                                  around -include directives
20
#                    14/03/99    vpath2() for remove abs depend issues
20
#                    14/03/99    vpath2() for remove abs depend issues
21
#                    15/03/00    Wasn't build dependency list for binaries.
21
#                    15/03/00    Wasn't build dependency list for binaries.
22
# 1.9       APY      16/03/00    --Section switch
22
# 1.9       APY      16/03/00    --Section switch
23
# 1.10      APY      06/04/00    MRI version (4.4) support
23
# 1.10      APY      06/04/00    MRI version (4.4) support
Line 63... Line 63...
63
        }
63
        }
64
    }
64
    }
65
 
65
 
66
#.. Standard.rul requirements
66
#.. Standard.rul requirements
67
#
67
#
68
    $s   = asm;         # Assembler source file
68
    $s   = 'asm';       # Assembler source file
69
    $o   = obj;         # Object file
69
    $o   = 'obj';       # Object file
70
    $a	 = lib;         # Library file
70
    $a	 = 'lib';       # Library file
71
    $exe = "";          # Dummy, real image is either 'abs' or 'bin'
71
    $exe = "";          # Dummy, real image is either 'abs' or 'bin'
72
 
72
 
73
#.. Define MRI environment
73
#.. Define MRI environment
74
#
74
#
75
    Init( "mri", "mri2" );
75
    Init( "mri", "mri2" );
Line 130... Line 130...
130
#   ToolsetCXX( $source, $obj, \@args )
130
#   ToolsetCXX( $source, $obj, \@args )
131
#       This subroutine takes the user options and builds the rule(s)
131
#       This subroutine takes the user options and builds the rule(s)
132
#       required to compile the source file 'source' to 'obj'
132
#       required to compile the source file 'source' to 'obj'
133
#
133
#
134
###############################################################################
134
###############################################################################
135
 
-
 
136
sub ToolsetCXX
-
 
137
{
-
 
138
    MakePrint( "\n\t\$(CXX)\n" );
-
 
139
}
-
 
140
 
-
 
141
###############################################################################
-
 
142
#   ToolsetCXXDepend( $depend, \@sources )
-
 
143
#       This subroutine takes the user options and builds the
-
 
144
#       rule(s) required to build the dependencies for the source
-
 
145
#       files 'sources' to 'depend'.
-
 
146
#
-
 
147
###############################################################################
-
 
148
 
-
 
149
sub ToolsetCXXDepend
-
 
150
{
-
 
151
    #ToolsetCCDepend() handles both CC and CXX source
-
 
152
}
-
 
153
 
-
 
154
 
-
 
155
###############################################################################
-
 
156
#   ToolsetCXX( $source, $obj, \@args )
-
 
157
#       This subroutine takes the user options and builds the rule(s)
-
 
158
#       required to compile the source file 'source' to 'obj'
-
 
159
#
-
 
160
###############################################################################
-
 
161
	
135
	
162
sub ToolsetCXX
136
sub ToolsetCXX
163
{
137
{
164
    my( $source, $obj, $pArgs ) = @_;
138
    my( $source, $obj, $pArgs ) = @_;
165
    my( $cflags ) = "";
139
    my( $cflags ) = "";
Line 181... Line 155...
181
        if ( $cflags );
155
        if ( $cflags );
182
}	
156
}	
183
 
157
 
184
 
158
 
185
###############################################################################
159
###############################################################################
-
 
160
#   ToolsetCXXDepend( $depend, \@sources )
-
 
161
#       This subroutine takes the user options and builds the
-
 
162
#       rule(s) required to build the dependencies for the source
-
 
163
#       files 'sources' to 'depend'.
-
 
164
#
-
 
165
###############################################################################
-
 
166
 
-
 
167
sub ToolsetCXXDepend
-
 
168
{
-
 
169
    #ToolsetCCDepend() handles both CC and CXX source
-
 
170
}
-
 
171
 
-
 
172
 
-
 
173
###############################################################################
186
#   ToolsetAS( $source, $obj, \@args )
174
#   ToolsetAS( $source, $obj, \@args )
187
#       This subroutine takes the user options and builds the rule(s)
175
#       This subroutine takes the user options and builds the rule(s)
188
#       required to compile the source file 'source' to 'obj'
176
#       required to compile the source file 'source' to 'obj'
189
#
177
#
190
###############################################################################
178
###############################################################################
Line 304... Line 292...
304
#       .PHONY:                 $(BINDIR)/name${exe}:
292
#       .PHONY:                 $(BINDIR)/name${exe}:
305
#
293
#
306
#       $(BINDIR)/name.dep:     $(SCM_PLATFORM).mk
294
#       $(BINDIR)/name.dep:     $(SCM_PLATFORM).mk
307
#               $(LDDEPEND)
295
#               $(LDDEPEND)
308
#
296
#
309
#       ifeq "$(IFLAG)" "2"
297
#       ifeq "$(IFLAG)" "3"
310
#       -include	"$(BINDIR)/name.dep"
298
#       -include	"$(BINDIR)/name.dep"
311
#       endif
299
#       endif
312
#
300
#
313
# 	$(BINDIR)/name.[abs|bin]
301
# 	$(BINDIR)/name.[abs|bin]
314
#                       objs ...
302
#                       objs ...
Line 441... Line 429...
441
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
429
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
442
 
430
 
443
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
431
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
444
 	            "\t\$(LDDEPEND)\n\n" );
432
 	            "\t\$(LDDEPEND)\n\n" );
445
 
433
 
446
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
434
    MakePrint( "ifeq \"\$(IFLAG)\" \"3\"\n" .
447
               "-include\t\$(BINDIR)/${name}.dep\n" .
435
               "-include\t\$(BINDIR)/${name}.dep\n" .
448
               "endif\n\n" );
436
               "endif\n\n" );
449
 
437
 
450
    MakePrint( "\$(BINDIR)/${name}.bin:\tLADDR=$laddr\n" )
438
    MakePrint( "\$(BINDIR)/${name}.bin:\tLADDR=$laddr\n" )
451
        if ( $laddr );
439
        if ( $laddr );
Line 465... Line 453...
465
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
453
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
466
 
454
 
467
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
455
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
468
 	            "\t\$(LDDEPEND)\n\n" );
456
 	            "\t\$(LDDEPEND)\n\n" );
469
 
457
 
470
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
458
    MakePrint( "ifeq \"\$(IFLAG)\" \"3\"\n" .
471
               "-include\t\$(BINDIR)/${name}.dep\n" .
459
               "-include\t\$(BINDIR)/${name}.dep\n" .
472
               "endif\n\n" );
460
               "endif\n\n" );
473
 
461
 
474
    MakePrint( "\$(BINDIR)/${name}.abs:" );
462
    MakePrint( "\$(BINDIR)/${name}.abs:" );
475
    foreach $i ( @$pObjs ) {
463
    foreach $i ( @$pObjs ) {
Line 495... Line 483...
495
#       Now the fun part... piecing together a variable $(name_ld)
483
#       Now the fun part... piecing together a variable $(name_ld)
496
#       which ends up in the command file.
484
#       which ends up in the command file.
497
#
485
#
498
    $varname = "${name}_ld";
486
    $varname = "${name}_ld";
499
    sub VarCmd {
487
    sub VarCmd {
500
        MakeQuote "$varname += @_\\n\n";
488
        MakeQuote ("$varname += @_\\n\n");
501
    }
489
    }
502
    sub VarPrt {
490
    sub VarPrt {
503
        MakePrint "@_\n";
491
        MakePrint ("@_\n");
504
    }
492
    }
505
 
493
 
506
       VarCmd("CASE");                          #preserve symbols case
494
       VarCmd("CASE");                          #preserve symbols case
507
       VarCmd("WARN	356");                  #warning for undef sections
495
       VarCmd("WARN	356");                  #warning for undef sections
508
       VarCmd("CHIP	CPU32");                #68xxx (68332/68340/68341)
496
       VarCmd("CHIP	CPU32");                #68xxx (68332/68340/68341)