Refactor util/mkdef.pl for clearer separation of functionality
[openssl.git] / build.info
1 {-
2      use File::Spec::Functions;
3
4      our $sover = $config{shlib_version_number};
5      our $sover_filename = $sover;
6      $sover_filename =~ s|\.|_|g
7          if $config{target} =~ /^mingw/ || $config{target} =~ /^VC-/;
8      $sover_filename =
9          sprintf "%02d%02d", split m|\.|, $config{shlib_version_number}
10          if $config{target} =~ /^vms/;
11      "";
12 -}
13 LIBS=libcrypto libssl
14 INCLUDE[libcrypto]=. crypto/include include
15 INCLUDE[libssl]=. include
16 DEPEND[libssl]=libcrypto
17
18 # Empty DEPEND "indices" means the dependencies are expected to be built
19 # unconditionally before anything else.
20 DEPEND[]=include/openssl/opensslconf.h crypto/include/internal/bn_conf.h \
21          crypto/include/internal/dso_conf.h
22 DEPEND[include/openssl/opensslconf.h]=configdata.pm
23 GENERATE[include/openssl/opensslconf.h]=include/openssl/opensslconf.h.in
24 DEPEND[crypto/include/internal/bn_conf.h]=configdata.pm
25 GENERATE[crypto/include/internal/bn_conf.h]=crypto/include/internal/bn_conf.h.in
26 DEPEND[crypto/include/internal/dso_conf.h]=configdata.pm
27 GENERATE[crypto/include/internal/dso_conf.h]=crypto/include/internal/dso_conf.h.in
28
29 IF[{- defined $target{shared_defflag} -}]
30   SHARED_SOURCE[libcrypto]=libcrypto.ld
31   SHARED_SOURCE[libssl]=libssl.ld
32
33   GENERATE[libcrypto.ld]=util/libcrypto.num libcrypto
34   GENERATE[libssl.ld]=util/libssl.num libssl
35 ENDIF
36
37 IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
38   GENERATE[libcrypto.rc]=util/mkrc.pl libcrypto
39   GENERATE[libssl.rc]=util/mkrc.pl libssl
40
41   SHARED_SOURCE[libcrypto]=libcrypto.rc
42   SHARED_SOURCE[libssl]=libssl.rc
43 ENDIF
44
45 IF[{- $config{target} =~ /^Cygwin/ -}]
46  SHARED_NAME[libcrypto]=cygcrypto-{- $sover_filename -}
47  SHARED_NAME[libssl]=cygssl-{- $sover_filename -}
48 ELSIF[{- $config{target} =~ /^mingw/ -}]
49  SHARED_NAME[libcrypto]=libcrypto-{- $sover_filename -}{- $config{target} eq "mingw64" ? "-x64" : "" -}
50  SHARED_NAME[libssl]=libssl-{- $sover_filename -}{- $config{target} eq "mingw64" ? "-x64" : "" -}
51 ELSIF[{- $config{target} =~ /^VC-/ -}]
52  SHARED_NAME[libcrypto]=libcrypto-{- $sover_filename -}{- $target{multilib} -}
53  SHARED_NAME[libssl]=libssl-{- $sover_filename -}{- $target{multilib} -}
54 ENDIF
55
56 # VMS has a cultural standard where all libraries are prefixed.
57 # For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
58 # conversation with VSI, Tuesday January 26 2016)
59 # Also, it seems it's usual to have the pointer size the libraries
60 # were built for as part of the name.
61 IF[{- $config{target} =~ /^vms/ -}]
62  RENAME[libcrypto]=ossl$libcrypto{- $target{pointer_size} -}
63  RENAME[libssl]=ossl$libssl{- $target{pointer_size} -}
64  SHARED_NAME[libcrypto]=ossl$libcrypto{- $sover_filename -}_shr{- $target{pointer_size} -}
65  SHARED_NAME[libssl]=ossl$libssl{- $sover_filename -}_shr{- $target{pointer_size} -}
66 ENDIF