src2dep(obj => "PATH/TO/objectfile",
srcs => [ "PATH/TO/sourcefile", ... ],
+ deps => [ "dep1", ... ],
incs => [ "INCL/PATH", ... ]);
'obj' has the dependent object file as well as
'srcs' has the list of source files to build the
object file, with the first item being the source
file that directly corresponds to the object file.
- 'incs' is a list of include file directories.
+ 'deps' is a list of explicit dependencies. 'incs'
+ is a list of include file directories.
src2obj - function that produces build file lines to build an
object file from source files and associated data.
'srcs' has the list of source files to build the
object file, with the first item being the source
file that directly corresponds to the object file.
- 'deps' is a list of dependencies. 'incs' is a list
- of include file directories.
+ 'deps' is a list of explicit dependencies. 'incs'
+ is a list of include file directories.
obj2lib - function that produces build file lines to build a
static library file ("libfoo.a" in Unix terms) from
@{$unified_info{includes}->{$obj}} ]);
$OUT .= src2dep(obj => $obj_no_o,
srcs => $unified_info{sources}->{$obj},
+ deps => [ reducedepends(resolvedepends($obj)) ],
incs => [ @{$unified_info{includes}->{$bin}},
@{$unified_info{includes}->{$obj}} ]);
}
sub src2dep {
my %args = @_;
my $dep = $args{obj};
+ my $deps = join(", -\n\t\t", @{$args{srcs}}, @{$args{deps}});
# Because VMS C isn't very good at combining a /INCLUDE path with
# #includes having a relative directory (like '#include "../foo.h"),
my $after = $unified_info{after}->{$dep.".OBJ"} || "\@ !";
return <<"EOF";
-$dep.MMS : $srcs
+$dep.MMS : $deps
${before}
SET DEFAULT $forward
\$(CC) \$(CFLAGS)${incs} /MMS=(TARGET=.OBJ)/OBJECT=${depd}${depn}.MMS $srcs
my $dep = $args{obj}.'$(DEP_EXT)';
my $obj = $args{obj}.'$(OBJ_EXT)';
my $srcs = join(" ", @{$args{srcs}});
+ my $deps = join(" ", @{$args{srcs}}, @{$args{deps}});
my $incs = join(" ", map { " -I".$_ } @{$args{incs}});
my $makedepprog = $config{makedepprog};
if ($makedepprog eq "makedepend") {
return <<"EOF";
-$dep : $srcs
+$dep : $deps
rm -f \$\@.tmp; touch \$\@.tmp
\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj"\
-- -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs \
EOF
}
return <<"EOF";
-$dep : $srcs Makefile
+$dep : $deps Makefile
\$(CC) -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs -MM -MF \$\@ -MQ $obj $srcs
EOF
}