summaryrefslogtreecommitdiff
path: root/ACE/bin/DependencyGenerator/MakeObjectGenerator.pm
blob: 67e5cf174b8a4b82343a063aba1b984477e4d77e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package MakeObjectGenerator;

# ************************************************************
# Description   : Generates object files for generic Makefiles.
# Author        : Chad Elliott
# Create Date   : 5/23/2003
# ************************************************************

# ************************************************************
# Pragmas
# ************************************************************

use strict;
use ObjectGenerator;

use vars qw(@ISA);
@ISA = qw(ObjectGenerator);

# ************************************************************
# Subroutine Section
# ************************************************************

sub process {
  my($noext)   = $_[1];
  my(@objects) = ();
  my(@exts)    = ('o');
  my(@dirs)    = (defined $ENV{VDIR} ? $ENV{VDIR} : '');
  $noext =~ s/\.[^\.]+$//o;

  if (defined $ENV{SOEXT}) {
    push(@exts, $ENV{SOEXT});
  }
  if (defined $ENV{VSHDIR}) {
    push(@dirs, $ENV{VSHDIR});
  }

  foreach my $dirs (@dirs) {
    foreach my $ext (@exts) {
      push(@objects, "$dirs$noext.$ext");
    }
  }

  return \@objects;
}


1;