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 251
Line 273... Line 273...
273
#.. Command file EOS dependencies
273
#.. Command file EOS dependencies
274
#
274
#
275
 
275
 
276
#.. Cleanup rules
276
#.. Cleanup rules
277
#
277
#
278
    ToolsetGenerate( "\$(BINDIR)/${name}.ld" );
278
    ToolsetGenerate( "\$(BINDIR)/${name}\$(GBE_TYPE).ld" );
279
    ToolsetGenerate( "\$(BINDIR)/${name}.dep" );
279
    ToolsetGenerate( "\$(BINDIR)/${name}\$(GBE_TYPE).dep" );
280
if ($bin) {
280
if ($bin) {
281
    ToolsetGenerate( "\$(BINDIR)/${name}.bin" );
281
    ToolsetGenerate( "\$(BINDIR)/${name}\$(GBE_TYPE).bin" );
282
    ToolsetGenerate( "\$(BINDIR)/${name}.s2" );
282
    ToolsetGenerate( "\$(BINDIR)/${name}\$(GBE_TYPE).s2" );
283
}
283
}
284
    ToolsetGenerate( "\$(BINDIR)/${name}.map" );
284
    ToolsetGenerate( "\$(BINDIR)/${name}\$(GBE_TYPE).map" );
285
 
285
 
286
#.. Linker command file
286
#.. Linker command file
287
#
287
#
288
#       Now the fun part... piecing together a variable $(name_ld)
288
#       Now the fun part... piecing together a variable $(name_ld)
289
#       which ends up in the command file.
289
#       which ends up in the command file.
290
#
290
#
291
if ($bin)
291
if ($bin)
292
{
292
{
293
    MakePrint( "\\\n\t\t\$(BINDIR)/${name}.dep " .
293
    MakePrint( "\\\n\t\t\$(BINDIR)/${name}\$(GBE_TYPE).dep " .
294
               "\\\n\t\t\$(BINDIR)/${name}.prg\n\n" .
294
               "\\\n\t\t\$(BINDIR)/${name}\$(GBE_TYPE).prg\n\n" .
295
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
295
               ".PHONY:\t\t\t\$(BINDIR)/${name}\$(GBE_TYPE)${exe}\n\n" );
296
 
296
 
297
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
297
    MakePrint( "\$(BINDIR)/${name}\$(GBE_TYPE).dep:\t\$(SCM_PLATFORM).mk\n".
298
                 "\t\$(LDDEPEND)\n\n" );
298
                 "\t\$(LDDEPEND)\n\n" );
299
 
299
 
300
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
300
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
301
               "-include\t\$(BINDIR)/${name}.dep\n" .
301
               "-include\t\$(BINDIR)/${name}\$(GBE_TYPE).dep\n" .
302
               "endif\n\n" );
302
               "endif\n\n" );
303
 
303
 
304
    MakePrint( "\$(BINDIR)/${name}.prg:" );
304
    MakePrint( "\$(BINDIR)/${name}\$(GBE_TYPE).prg:" );
305
    foreach $i ( @$pObjs ) {
305
    foreach $i ( @$pObjs ) {
306
        MakePrint( " \\\n\t\t$i.${o}" );
306
        MakePrint( " \\\n\t\t$i.${o}" );
307
    }
307
    }
308
    MakePrint( "\n\t\$(LD)" );
308
    MakePrint( "\n\t\$(LD)" );
309
    MakePrint( "\n\t\$(GNUBIN)\\objcopy -O srec \$(basename \$@).bin \$(basename \$@).s2" );
309
    MakePrint( "\n\t\$(GNUBIN)\\objcopy -O srec \$(basename \$@).bin \$(basename \$@).s2" );
310
    MakePrint( "\n\t\$(thyron)\\thyron\\tools\\s2toprog \$(basename \$@).s2 \$@" );
310
    MakePrint( "\n\t\$(thyron)\\thyron\\tools\\s2toprog \$(basename \$@).s2 \$@" );
311
}
311
}
312
else
312
else
313
{
313
{
314
    MakePrint( "\\\n\t\t\$(BINDIR)/${name}.dep " .
314
    MakePrint( "\\\n\t\t\$(BINDIR)/${name}\$(GBE_TYPE).dep " .
315
               "\\\n\t\t\$(BINDIR)/${name}.abs\n\n" .
315
               "\\\n\t\t\$(BINDIR)/${name}\$(GBE_TYPE).abs\n\n" .
316
               ".PHONY:\t\t\t\$(BINDIR)/${name}${exe}\n\n" );
316
               ".PHONY:\t\t\t\$(BINDIR)/${name}\$(GBE_TYPE)${exe}\n\n" );
317
 
317
 
318
    MakePrint( "\$(BINDIR)/${name}.dep:\t\$(SCM_PLATFORM).mk\n".
318
    MakePrint( "\$(BINDIR)/${name}\$(GBE_TYPE).dep:\t\$(SCM_PLATFORM).mk\n".
319
                 "\t\$(LDDEPEND)\n\n" );
319
                 "\t\$(LDDEPEND)\n\n" );
320
 
320
 
321
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
321
    MakePrint( "ifeq \"\$(IFLAG)\" \"2\"\n" .
322
               "-include\t\$(BINDIR)/${name}.dep\n" .
322
               "-include\t\$(BINDIR)/${name}\$(GBE_TYPE).dep\n" .
323
               "endif\n\n" );
323
               "endif\n\n" );
324
 
324
 
325
    MakePrint( "\$(BINDIR)/${name}.abs:" );
325
    MakePrint( "\$(BINDIR)/${name}\$(GBE_TYPE).abs:" );
326
    foreach $i ( @$pObjs ) {
326
    foreach $i ( @$pObjs ) {
327
        MakePrint( " \\\n\t\t$i.${o}" );
327
        MakePrint( " \\\n\t\t$i.${o}" );
328
    }
328
    }
329
    MakePrint( "\n\t\$(LD)\n" );
329
    MakePrint( "\n\t\$(LD)\n" );
330
}
330
}
Line 333... Line 333...
333
#.. Linker command file
333
#.. Linker command file
334
#
334
#
335
#       Now the fun part... piecing together a variable $(name_ld)
335
#       Now the fun part... piecing together a variable $(name_ld)
336
#       which ends up in the command file.
336
#       which ends up in the command file.
337
#
337
#
338
    $varname = "${name}_ld";
338
    $varname = "${name}\$(GBE_TYPE)_ld";
339
    sub VarCmd {                                # with line feed ...
339
    sub VarCmd {                                # with line feed ...
340
        MakeQuote "$varname += @_\\n\n";
340
        MakeQuote "$varname += @_\\n\n";
341
    }
341
    }
342
    sub VarCmd2 {                               # without line feed ...
342
    sub VarCmd2 {                               # without line feed ...
343
        MakeQuote "$varname += @_\n";
343
        MakeQuote "$varname += @_\n";
Line 388... Line 388...
388
        VarCmd( "-L \$(MPTLIB)/genlib/tmr/paycell2/release/bin" );
388
        VarCmd( "-L \$(MPTLIB)/genlib/tmr/paycell2/release/bin" );
389
        VarCmd( "-L \$(MPTLIB)/genlib/tsk/paycell2/release/bin" );
389
        VarCmd( "-L \$(MPTLIB)/genlib/tsk/paycell2/release/bin" );
390
        VarCmd( "-L \$(MPTLIB)/genlib/xtr/paycell2/release/bin" );
390
        VarCmd( "-L \$(MPTLIB)/genlib/xtr/paycell2/release/bin" );
391
    VarPrt( "endif" );
391
    VarPrt( "endif" );
392
 
392
 
393
    VarCmd( "-Map \$(BINDIR)/${name}.map" );
393
    VarCmd( "-Map \$(BINDIR)/${name}\$(GBE_TYPE).map" );
394
 
394
 
395
    if ($bin)
395
    if ($bin)
396
    {
396
    {
397
        VarCmd( "-o \$(BINDIR)/${name}.bin" );
397
        VarCmd( "-o \$(BINDIR)/${name}\$(GBE_TYPE).bin" );
398
    }
398
    }
399
    else
399
    else
400
    {
400
    {
401
        VarCmd( "-o \$(BINDIR)/${name}.abs" );
401
        VarCmd( "-o \$(BINDIR)/${name}\$(GBE_TYPE).abs" );
402
    }
402
    }
403
 
403
 
404
    VarPrt( "ifeq \"\$(DEBUG)\" \"1\"" );
404
    VarPrt( "ifeq \"\$(DEBUG)\" \"1\"" );
405
        VarCmd( "-T \$(MPTLIB)/Lib/Debug/Lnk/link.cmd" );
405
        VarCmd( "-T \$(MPTLIB)/Lib/Debug/Lnk/link.cmd" );
406
        VarCmd( "-lgdb" );                        # Required for Insight debugger
406
        VarCmd( "-lgdb" );                        # Required for Insight debugger
Line 425... Line 425...
425
#.. Dependency link,
425
#.. Dependency link,
426
#
426
#
427
#       Now piece together a variable $(name_dp) which ends up in
427
#       Now piece together a variable $(name_dp) which ends up in
428
#       the command file building the application dependency list.
428
#       the command file building the application dependency list.
429
#
429
#
430
    $varname = "${name}_dp";
430
    $varname = "${name}\$(GBE_TYPE)_dp";
431
 
431
 
432
    foreach $i ( @$pLibs ) {
432
    foreach $i ( @$pLibs ) {
433
         VarCmd("\$(BINDIR)/${name}${exe}: @(vpath,$i.${a},GCC_LIB)" );
433
         VarCmd("\$(BINDIR)/${name}\$(GBE_TYPE)${exe}: @(vpath,$i.${a},GCC_LIB)" );
-
 
434
    }
-
 
435
 
-
 
436
    if ($bin)
-
 
437
    {
-
 
438
        PackageProgRemoveFiles($name);
-
 
439
        PackageProgAddFiles($name, "\$(BINDIR)/${name}\$(GBE_TYPE).prg");
-
 
440
    }
-
 
441
    else
-
 
442
    {
-
 
443
        PackageProgRemoveFiles($name);
-
 
444
        PackageProgAddFiles($name, "\$(BINDIR)/${name}\$(GBE_TYPE).abs");
434
    }
445
    }
435
}
446
}
436
 
447
 
437
#.. Successful termination
448
#.. Successful termination
438
1;
449
1;