mk1mf.pl and mkdef.pl read OPTIONS from toplevel Makefile.
[openssl.git] / util / mkdef.pl
index 4576c76144bb6c79f684085067dfcd8c4c54b0df..1f05fe040f845170e85b94752b3d49d354eec2f0 100755 (executable)
@@ -18,7 +18,14 @@ $W32=1;
 $NT=0;
 # Set this to make typesafe STACK definitions appear in DEF
 $safe_stack_def = 1;
-foreach (@ARGV)
+
+$options="";
+open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
+while(<IN>) {
+    $options=$1 if (/^OPTIONS=(.*)$/);
+}
+
+foreach (@ARGV, split(/ /, $options))
        {
        $W32=1 if $_ eq "32";
        $W32=0 if $_ eq "16";