-DPLATFORM and -DCFLAGS command line arguments are no longer used.
[openssl.git] / util / mk1mf.pl
index 355143b703d84815746cde04b3ef91c67fa0be8b..90f2dfca06cf0d46eba67d82f48f75f6586b7d5e 100755 (executable)
@@ -12,7 +12,7 @@ $ssl_version="";
 open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
 while(<IN>) {
     $ssl_version=$1 if (/^VERSION=(.*)$/);
-    $options=$1 if (/^OPTIONS=(.*)$/);
+    $OPTIONS=$1 if (/^OPTIONS=(.*)$/);
     $INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/);
 }
 close(IN);
@@ -45,7 +45,7 @@ foreach (@ARGV)
        if (!&read_options && !defined($ops{$_}))
                {
                print STDERR "unknown option - $_\n";
-               print STDERR "usage: perl mk1mf.pl [system] [options]\n";
+               print STDERR "usage: perl mk1mf.pl [options] [system]\n";
                print STDERR "\nwhere [system] can be one of the following\n";
                foreach $i (sort keys %ops)
                { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; }
@@ -58,6 +58,7 @@ and [options] can be one of
        no-ssl2 no-ssl3                         - Skip this version of SSL
        just-ssl                                - remove all non-ssl keys/digest
        no-asm                                  - No x86 asm
+       nasm                                    - Use NASM for x86 asm
        no-socks                                - No socket code
        no-err                                  - No error strings
        dll/shlib                               - Build shared libraries (MS)
@@ -729,8 +730,6 @@ sub cc_compile_target
        local($target,$source,$ex_flags)=@_;
        local($ret);
        
-       # EAY EAY
-       $ex_flags.=' -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\""' if ($source =~ /cversion/ and $dcflags ne 'n');
        $target =~ s/\//$o/g if $o ne "/";
        $source =~ s/\//$o/g if $o ne "/";
        $ret ="$target: \$(SRC_D)$o$source\n\t";
@@ -813,6 +812,7 @@ sub read_options
        elsif (/^no-dh$/)       { $no_dh=1; }
        elsif (/^no-hmac$/)     { $no_hmac=1; }
        elsif (/^no-asm$/)      { $no_asm=1; }
+       elsif (/^nasm$/)        { $nasm=1; }
        elsif (/^no-ssl2$/)     { $no_ssl2=1; }
        elsif (/^no-ssl3$/)     { $no_ssl3=1; }
        elsif (/^no-err$/)      { $no_err=1; }
@@ -831,6 +831,6 @@ sub read_options
        elsif (/^-[lL].*$/)     { $l_flags.="$_ "; }
        elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/)
                { $c_flags.="$_ "; }
-       else { return(1); }
-       return(0);
+       else { return(0); }
+       return(1);
        }