2
0

00-base-templates.conf 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. # -*- Mode: perl -*-
  2. my %targets=(
  3. DEFAULTS => {
  4. template => 1,
  5. cflags => "",
  6. cppflags => "",
  7. lflags => "",
  8. defines => [],
  9. includes => [],
  10. lib_cflags => "",
  11. lib_cppflags => "",
  12. lib_defines => [],
  13. thread_scheme => "(unknown)", # Assume we don't know
  14. thread_defines => [],
  15. unistd => "<unistd.h>",
  16. shared_target => "",
  17. shared_cflag => "",
  18. shared_defines => [],
  19. shared_ldflag => "",
  20. shared_rcflag => "",
  21. #### Defaults for the benefit of the config targets who don't inherit
  22. #### a BASE and assume Unix defaults
  23. #### THESE WILL DISAPPEAR IN OpenSSL 1.2
  24. build_scheme => [ "unified", "unix" ],
  25. build_file => "Makefile",
  26. AR => "(unused)",
  27. ARFLAGS => "(unused)",
  28. CC => "cc",
  29. HASHBANGPERL => "/usr/bin/env perl",
  30. RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
  31. ? "ranlib" : "" },
  32. RC => "windres",
  33. #### THESE WILL BE ENABLED IN OpenSSL 1.2
  34. #HASHBANGPERL => "PERL", # Only Unix actually cares
  35. },
  36. BASE_common => {
  37. template => 1,
  38. enable => [],
  39. disable => [],
  40. defines =>
  41. sub {
  42. my @defs = ( 'OPENSSL_BUILDING_OPENSSL' );
  43. push @defs, "ZLIB" unless $disabled{zlib};
  44. push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
  45. return [ @defs ];
  46. },
  47. includes =>
  48. sub {
  49. my @incs = ();
  50. push @incs, $withargs{zlib_include}
  51. if !$disabled{zlib} && $withargs{zlib_include};
  52. return [ @incs ];
  53. },
  54. },
  55. BASE_unix => {
  56. inherit_from => [ "BASE_common" ],
  57. template => 1,
  58. AR => "ar",
  59. ARFLAGS => "qc",
  60. CC => "cc",
  61. lflags =>
  62. sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
  63. ex_libs =>
  64. sub { !defined($disabled{zlib})
  65. && defined($disabled{"zlib-dynamic"})
  66. ? "-lz" : () },
  67. HASHBANGPERL => "/usr/bin/env perl", # Only Unix actually cares
  68. RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
  69. ? "ranlib" : "" },
  70. RC => "windres",
  71. build_scheme => [ "unified", "unix" ],
  72. build_file => "Makefile",
  73. perl_platform => 'Unix',
  74. },
  75. BASE_Windows => {
  76. inherit_from => [ "BASE_common" ],
  77. template => 1,
  78. lib_defines =>
  79. sub {
  80. my @defs = ();
  81. unless ($disabled{"zlib-dynamic"}) {
  82. my $zlib = $withargs{zlib_lib} // "ZLIB1";
  83. push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
  84. }
  85. return [ @defs ];
  86. },
  87. ex_libs =>
  88. sub {
  89. unless ($disabled{zlib}) {
  90. if (defined($disabled{"zlib-dynamic"})) {
  91. return $withargs{zlib_lib} // "ZLIB1";
  92. }
  93. }
  94. return ();
  95. },
  96. MT => "mt",
  97. MTFLAGS => "-nologo",
  98. mtinflag => "-manifest ",
  99. mtoutflag => "-outputresource:",
  100. build_file => "makefile",
  101. build_scheme => [ "unified", "windows" ],
  102. perl_platform => 'Windows',
  103. },
  104. BASE_VMS => {
  105. inherit_from => [ "BASE_common" ],
  106. template => 1,
  107. includes =>
  108. add(sub {
  109. my @incs = ();
  110. # GNV$ZLIB_INCLUDE is the standard logical name for later
  111. # zlib incarnations.
  112. push @incs, 'GNV$ZLIB_INCLUDE:'
  113. if !$disabled{zlib} && !$withargs{zlib_include};
  114. return [ @incs ];
  115. }),
  116. build_file => "descrip.mms",
  117. build_scheme => [ "unified", "VMS" ],
  118. perl_platform => 'VMS',
  119. },
  120. );