Add build file support for generic symbol exports with DSOs
[openssl.git] / Configurations / common.tmpl
index 246f18a4c1048446060189e7ad2a5bd69be3d96a..c1c96a2b4ea9a9f526c18def47fd6620510ce6cd 100644 (file)
@@ -78,6 +78,7 @@
              if ref $unified_info{generate}->{$src} eq "";
          my $script = $unified_info{generate}->{$src}->[0];
          $OUT .= generatesrc(src => $src,
+                             product => $bin,
                              generator => $unified_info{generate}->{$src},
                              generator_incs => $unified_info{includes}->{$script},
                              generator_deps => $unified_info{depends}->{$script},
  }
 
  # dolib is responsible for building libraries.  It will call
- # libobj2shlib is shared libraries are produced, and obj2lib in all
+ # obj2shlib is shared libraries are produced, and obj2lib in all
  # cases.  It also makes sure all object files for the library are
  # built.
  sub dolib {
      my $lib = shift;
      return "" if $cache{$lib};
      unless ($disabled{shared} || $lib =~ /\.a$/) {
-         $OUT .= libobj2shlib(shlib => $unified_info{sharednames}->{$lib},
+         my $obj2shlib = defined &obj2shlib ? \&obj2shlib : \&libobj2shlib;
+         $OUT .= $obj2shlib->(shlib => $unified_info{sharednames}->{$lib},
                               lib => $lib,
                               objs => $unified_info{shared_sources}->{$lib},
                               deps => [ reducedepends(resolvedepends($lib)) ],
              # If this is somehow a compiled object, take care of it that way
              # Otherwise, it might simply be generated
              if (defined $unified_info{sources}->{$_}) {
-                 doobj($_, $lib, intent => "lib", installed => is_installed($lib));
+                 doobj($_, $lib, intent => "shlib", installed => is_installed($lib));
              } else {
                  dogenerate($_, undef, undef, intent => "lib");
              }
                      deps => [ resolvedepends($lib) ],
                      installed => is_installed($lib));
      foreach (@{$unified_info{shared_sources}->{$lib}}) {
-         doobj($_, $lib, intent => "dso", installed => is_installed($lib));
+         # If this is somehow a compiled object, take care of it that way
+         # Otherwise, it might simply be generated
+         if (defined $unified_info{sources}->{$_}) {
+             doobj($_, $lib, intent => "dso", installed => is_installed($lib));
+         } else {
+             dogenerate($_, undef, $lib, intent => "dso");
+         }
      }
      $cache{$lib} = 1;
  }