Removed svn Id tag
[MPC.git] / modules / Depgen / MakeObjectGenerator.pm
blob2ac6d303d042a43b4c2469bd8a33344182a6a552
1 package MakeObjectGenerator;
3 # ************************************************************
4 # Description : Generates object files for generic Makefiles.
5 # Author : Chad Elliott
6 # Create Date : 5/23/2003
7 # ************************************************************
9 # ************************************************************
10 # Pragmas
11 # ************************************************************
13 use strict;
14 use ObjectGenerator;
15 use DirectoryManager;
17 use vars qw(@ISA);
18 @ISA = qw(ObjectGenerator);
20 my $dm = bless {}, 'DirectoryManager';
22 # ************************************************************
23 # Subroutine Section
24 # ************************************************************
26 sub process {
27 my $noext = $dm->translate_directory($_[1]);
28 my @exts = ('o');
29 my @dirs = (defined $ENV{VDIR} ? $ENV{VDIR} : '');
30 $noext =~ s/\.[^\.]+$//o;
32 push(@exts, $ENV{SOEXT}) if (defined $ENV{SOEXT});
33 push(@dirs, $ENV{VSHDIR}) if (defined $ENV{VSHDIR});
35 my @objects;
36 foreach my $dirs (@dirs) {
37 foreach my $ext (@exts) {
38 push(@objects, "$dirs$noext.$ext");
42 return \@objects;