diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2006-10-19 17:30:03 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2006-10-19 17:30:03 +0000 |
commit | 6d63d2ae7449d6c00b5e9ac38da503e7c3d1ec44 (patch) | |
tree | 702ed3083d9a4a67a69cfede406f81033dadda2e /modules/GHSWorkspaceCreator.pm | |
parent | a804f09039b398a29a88b5d93e54a55670b2eef9 (diff) | |
download | MPC-6d63d2ae7449d6c00b5e9ac38da503e7c3d1ec44.tar.gz |
ChangeLogTag: Thu Oct 19 17:29:08 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/GHSWorkspaceCreator.pm')
-rw-r--r-- | modules/GHSWorkspaceCreator.pm | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/modules/GHSWorkspaceCreator.pm b/modules/GHSWorkspaceCreator.pm index 8ddd502c..411beceb 100644 --- a/modules/GHSWorkspaceCreator.pm +++ b/modules/GHSWorkspaceCreator.pm @@ -90,18 +90,40 @@ sub create_integrity_project { my($int_proj) = shift; my($project) = shift; my($type) = shift; + my($target) = shift; + my($outdir) = $self->get_outdir(); my($crlf) = $self->crlf(); my($fh) = new FileHandle(); + my($int_name) = $int_proj; + $int_name =~ s/\.gpj$//; + my($int_file) = $int_name . '.int'; - if (open($fh, ">$int_proj")) { + if (open($fh, ">$outdir/$int_proj")) { print $fh "#!gbuild$crlf", "\t$integrity$crlf", - "\t-dynamic$crlf", - "$project\t\t$type$crlf"; + "$project\t\t$type$crlf", + "$int_file$crlf"; foreach my $bsp (@integ_bsps) { print $fh "$bsp$crlf"; } close($fh); + + if (open($fh, ">$outdir/$int_file")) { + print $fh "Kernel$crlf", + "\tFilename\t\t\tDynamicDownload$crlf", + "EndKernel$crlf$crlf", + "AddressSpace$crlf", + "\tFilename\t\t\t$target$crlf", + "\tLanguage\t\t\tC++$crlf", + "\tLibrary\t\t\t\tlibINTEGRITY.so$crlf", + "\tLibrary\t\t\t\tlibc.so$crlf", + "\tLibrary\t\t\t\tlibscxx_e.so$crlf", + "\tTask Initial$crlf", + "\t\tStackLength\t\t0x8000$crlf", + "\tEndTask$crlf", + "EndAddressSpace$crlf"; + close($fh); + } } } @@ -120,6 +142,7 @@ sub mix_settings { my($integrity_project) = (index($tgt, 'integrity') >= 0); my($int_proj) = undef; my($int_type) = undef; + my($target) = undef; while(<$rh>) { if (/^\s*(\[(Program|Library|Subproject)\])\s*$/) { my($type) = $1; @@ -145,14 +168,22 @@ sub mix_settings { } else { if (/^\s*\-((\w)\w*)/) { + ## Save the required options into the mixed project string if (defined $directives{$2} || defined $directives{$1}) { $mix .= $_; } + + ## If this is an integrity project, we need to find out + ## what the output file will be for the integrate file. + if (defined $int_proj && /^\s*\-o\s+(.*)\s$/) { + $target = $1; + } } } } if (defined $int_proj) { - $self->create_integrity_project($int_proj, $project, $int_type); + $self->create_integrity_project($int_proj, $project, + $int_type, $target); } close($rh); } |