Delete the unnecessary ERR and ERRC lines in makefiles, add some functionality
[openssl.git] / util / mk1mf.pl
index 11e9c16a1e4d2d8cace30e0c337822fd718319d7..c936d785cfc197b7c886580d1f4d723f991b62be 100755 (executable)
@@ -7,12 +7,13 @@
 
 $INSTALLTOP="/usr/local/ssl";
 
-$ssl_version="0.8.2";
+$ssl_version="0.9.2b";
 
 $infile="MINFO";
 
 %ops=(
-       "VC-WIN32",   "Microsoft Visual C++ 4.[01] - Windows NT [34].x",
+       "VC-WIN32",   "Microsoft Visual C++ [4-6] - Windows NT or 9X",
+       "VC-NT",   "Microsoft Visual C++ [4-6] - Windows NT ONLY",
        "VC-W31-16",  "Microsoft Visual C++ 1.52 - Windows 3.1 - 286",
        "VC-WIN16",   "Alias for VC-W31-32",
        "VC-W31-32",  "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+",
@@ -126,6 +127,8 @@ $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
 
 # $bin_dir.=$o causes a core dump on my sparc :-(
 
+$NT=0;
+
 push(@INC,"util/pl","pl");
 if ($platform eq "VC-MSDOS")
        {
@@ -147,6 +150,7 @@ elsif (($platform eq "VC-W31-32") || ($platform eq "VC-WIN16"))
        }
 elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT"))
        {
+       $NT = 1 if $platform eq "VC-NT";
        require 'VC-32.pl';
        }
 elsif ($platform eq "BC-NT")
@@ -230,11 +234,6 @@ else       { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
 $ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
 
-if ($ranlib ne "")
-       {
-       $ranlib="\$(SRC_D)$o$ranlib";
-       }
-
 if ($msdos)
        {
        $banner ="\t\@echo Make sure you have run 'perl Configure $platform' in the\n";
@@ -249,8 +248,8 @@ $link="$bin_dir$link" if ($link !~ /^\$/);
 $INSTALLTOP =~ s|/|$o|g;
 
 $defs= <<"EOF";
-# This makefile has been automatically generated from the SSLeay distribution.
-# This single makefile will build the complete SSLeay distribution and
+# This makefile has been automatically generated from the OpenSSL distribution.
+# This single makefile will build the complete OpenSSL distribution and
 # by default leave the 'intertesting' output files in .${o}out and the stuff
 # that needs deleting in .${o}tmp.
 # The file was generated by running 'make makefile.one', which
@@ -277,7 +276,7 @@ SHLIB_EX_OBJ=$shlib_ex_obj
 # be added
 EX_LIBS=$ex_libs
 
-# The SSLeay directory
+# The OpenSSL directory
 SRC_D=$src_dir
 
 LINK=$link
@@ -308,6 +307,7 @@ OUT_D=$out_dir
 TMP_D=$tmp_dir
 # The output directory for the header files
 INC_D=$inc_dir
+INCO_D=$inc_dir${o}openssl
 
 CP=$cp
 RM=$rm
@@ -321,7 +321,7 @@ ASM=$bin_dir$asm
 # You should not need to touch anything below this point
 ######################################################
 
-E_EXE=ssleay
+E_EXE=openssl
 SSL=$ssl
 CRYPTO=$crypto
 RSAGLUE=$RSAglue
@@ -329,6 +329,9 @@ RSAGLUE=$RSAglue
 # BIN_D  - Binary output directory
 # TEST_D - Binary test file output directory
 # LIB_D  - library output directory
+# Note: if you change these point to different directories then uncomment out
+# the lines around the 'NB' comment below.
+# 
 BIN_D=\$(OUT_D)
 TEST_D=\$(OUT_D)
 LIB_D=\$(OUT_D)
@@ -363,23 +366,26 @@ LIBS_DEP=\$(O_CRYPTO) \$(O_RSAGLUE) \$(O_SSL)
 EOF
 
 $rules=<<"EOF";
-all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INC_D) headers lib exe
+all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe
 
 banner:
 $banner
 
 \$(TMP_D):
        \$(MKDIR) \$(TMP_D)
-
-\$(BIN_D):
-       \$(MKDIR) \$(BIN_D)
-
-\$(TEST_D):
-       \$(MKDIR) \$(TEST_D)
+# NB: uncomment out these lines if BIN_D, TEST_D and LIB_D are different
+#\$(BIN_D):
+#      \$(MKDIR) \$(BIN_D)
+#
+#\$(TEST_D):
+#      \$(MKDIR) \$(TEST_D)
 
 \$(LIB_D):
        \$(MKDIR) \$(LIB_D)
 
+\$(INCO_D): \$(INC_D)
+       \$(MKDIR) \$(INC_D)${o}openssl
+
 \$(INC_D):
        \$(MKDIR) \$(INC_D)
 
@@ -393,8 +399,9 @@ install:
        \$(MKDIR) \$(INSTALLTOP)
        \$(MKDIR) \$(INSTALLTOP)${o}bin
        \$(MKDIR) \$(INSTALLTOP)${o}include
+       \$(MKDIR) \$(INSTALLTOP)${o}include${o}openssl
        \$(MKDIR) \$(INSTALLTOP)${o}lib
-       \$(CP) \$(INC_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include
+       \$(CP) \$(INCO_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include${o}openssl
        \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin
        \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib
        \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib
@@ -474,8 +481,8 @@ chop($h); $header=$h;
 $defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h");
 $rules.=&do_copy_rule("\$(INCL_D)",$header,".h");
 
-$defs.=&do_defs("EXHEADER",$exheader,"\$(INC_D)",".h");
-$rules.=&do_copy_rule("\$(INC_D)",$exheader,".h");
+$defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)",".h");
+$rules.=&do_copy_rule("\$(INCO_D)",$exheader,".h");
 
 $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj);
 $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");