diff options
author | Richard Levitte <levitte@openssl.org> | 2018-09-10 02:21:40 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-09-12 01:59:45 +0200 |
commit | bec2db1809df52f6e6548e7e883cdc7fec79964a (patch) | |
tree | 95d85b5ff53c06be60e16f77170e1692170bdfa3 /Configurations/common.tmpl | |
parent | 609e4be88e63e489c32438b3b0872fd891829301 (diff) |
Configure: Name object files according to the product they are part of
This will allow to have different object files for different products,
even if they share the same source code, and possibly different builds
for those different object files.
For example, one can have something like this:
SOURCES[libfoo]=cookie.c
INCLUDES[libfoo]=include/foo
SOURCES[libbar]=cookie.c
INCLUDES[libbar]=include/bar
This would mean that the object files and libraries would be build
somewhat like this:
$(CC) -Iinclude/foo -o libfoo-lib-cookie.o cookie.c
$(AR) $(ARFLAGS) libfoo.a libfoo-lib-cookie.o
$(CC) -Iinclude/bar -o libbar-lib-cookie.o cookie.c
$(AR) $(ARFLAGS) libbar.a libbar-lib-cookie.o
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7159)
Diffstat (limited to 'Configurations/common.tmpl')
-rw-r--r-- | Configurations/common.tmpl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl index ad67591e9d..246f18a4c1 100644 --- a/Configurations/common.tmpl +++ b/Configurations/common.tmpl @@ -125,8 +125,7 @@ unless ($disabled{shared} || $lib =~ /\.a$/) { $OUT .= libobj2shlib(shlib => $unified_info{sharednames}->{$lib}, lib => $lib, - objs => [ @{$unified_info{shared_sources}->{$lib}}, - @{$unified_info{sources}->{$lib}} ], + objs => $unified_info{shared_sources}->{$lib}, deps => [ reducedepends(resolvedepends($lib)) ], installed => is_installed($lib)); foreach ((@{$unified_info{shared_sources}->{$lib}}, @@ -155,12 +154,10 @@ my $lib = shift; return "" if $cache{$lib}; $OUT .= obj2dso(lib => $lib, - objs => [ @{$unified_info{sources}->{$lib}}, - @{$unified_info{shared_sources}->{$lib}} ], + objs => $unified_info{shared_sources}->{$lib}, deps => [ resolvedepends($lib) ], installed => is_installed($lib)); - foreach ((@{$unified_info{sources}->{$lib}}, - @{$unified_info{shared_sources}->{$lib}})) { + foreach (@{$unified_info{shared_sources}->{$lib}}) { doobj($_, $lib, intent => "dso", installed => is_installed($lib)); } $cache{$lib} = 1; |