summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-03-17 12:53:11 -0400
committerRich Salz <rsalz@openssl.org>2016-03-17 17:06:57 -0400
commit1fbab1dc6fcb14f512a40c5755708a8bcbf84f40 (patch)
treea54f0b0b24b2a5af56e3f3e533e0a5c7063266bd /util
parent014267f68ce98cfe61df4574552043fbbd144a1f (diff)
Remove Netware and OS/2
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'util')
-rw-r--r--util/libcrypto.num10
-rwxr-xr-xutil/mk1mf.pl21
-rwxr-xr-xutil/mkdef.pl27
-rw-r--r--util/pl/OS2-EMX.pl120
-rw-r--r--util/pl/netware.pl534
5 files changed, 10 insertions, 702 deletions
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 7a86ac8106..8383e52c91 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -288,7 +288,7 @@ TS_REQ_free 282 1_1_0 EXIST::FUNCTION:
PEM_read_DHparams 283 1_1_0 EXIST::FUNCTION:DH
RSA_private_decrypt 284 1_1_0 EXIST::FUNCTION:RSA
X509V3_EXT_get_nid 285 1_1_0 EXIST::FUNCTION:
-BIO_s_log 286 1_1_0 EXIST:!OS2,!WIN32,!macintosh:FUNCTION:
+BIO_s_log 286 1_1_0 EXIST:!WIN32,!macintosh:FUNCTION:
EC_POINT_set_to_infinity 287 1_1_0 EXIST::FUNCTION:EC
EVP_des_ede_ofb 288 1_1_0 EXIST::FUNCTION:DES
ECDH_KDF_X9_62 289 1_1_0 EXIST::FUNCTION:EC
@@ -1719,8 +1719,8 @@ X509_ATTRIBUTE_create_by_NID 1669 1_1_0 EXIST::FUNCTION:
TS_VERIFY_CTX_free 1670 1_1_0 EXIST::FUNCTION:
EC_KEY_up_ref 1671 1_1_0 EXIST::FUNCTION:EC
EC_GROUP_get_basis_type 1672 1_1_0 EXIST::FUNCTION:EC
-OCSP_crlID_new 1673 1_1_0 EXIST:!OS2,!VMS:FUNCTION:
-OCSP_crlID2_new 1673 1_1_0 EXIST:OS2,VMS:FUNCTION:
+OCSP_crlID_new 1673 1_1_0 EXIST:!VMS:FUNCTION:
+OCSP_crlID2_new 1673 1_1_0 EXIST:VMS:FUNCTION:
PEM_write_PKCS7 1674 1_1_0 EXIST::FUNCTION:
PKCS7_add_signer 1675 1_1_0 EXIST::FUNCTION:
X509_SIG_it 1676 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
@@ -2176,8 +2176,8 @@ ENGINE_load_public_key 2109 1_1_0 EXIST::FUNCTION:ENGINE
ASIdOrRange_it 2110 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:RFC3779
ASIdOrRange_it 2110 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:RFC3779
DHparams_print_fp 2111 1_1_0 EXIST::FUNCTION:DH,STDIO
-ERR_load_CRYPTO_strings 2112 1_1_0 EXIST:!OS2,!VMS:FUNCTION:
-ERR_load_CRYPTOlib_strings 2112 1_1_0 EXIST:OS2,VMS:FUNCTION:
+ERR_load_CRYPTO_strings 2112 1_1_0 EXIST:!VMS:FUNCTION:
+ERR_load_CRYPTOlib_strings 2112 1_1_0 EXIST:VMS:FUNCTION:
X509_REQ_set_version 2113 1_1_0 EXIST::FUNCTION:
d2i_ASN1_GENERALSTRING 2114 1_1_0 EXIST::FUNCTION:
i2d_ASIdentifiers 2115 1_1_0 EXIST::FUNCTION:RFC3779
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 55a8ddddd8..69bc89530e 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -108,11 +108,6 @@ $infile="MINFO";
"Mingw32-files", "Create files with DOS copy ...",
"linux-elf","Linux elf",
"FreeBSD","FreeBSD distribution",
- "OS2-EMX", "EMX GCC OS/2",
- "netware-clib", "CodeWarrior for NetWare - CLib - with WinSock Sockets",
- "netware-clib-bsdsock", "CodeWarrior for NetWare - CLib - with BSD Sockets",
- "netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets",
- "netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets",
"default","cc under unix",
"auto", "auto detect from top level Makefile",
"copy", "copy from top level Makefile"
@@ -149,8 +144,6 @@ and [options] can be one of
no-autoalginit - Don't auto load algorithms in libcrypto
no-autoerrinit - Don't auto load error strings for libcrypto or libssl
nasm - Use NASM for x86 asm
- nw-nasm - Use NASM x86 asm for NetWare
- nw-mwasm - Use Metrowerks x86 asm for NetWare
gaswin - Use GNU as with Mingw32
no-socks - No socket code
no-err - No error strings
@@ -233,18 +226,6 @@ elsif ($platform eq "linux-elf")
require "linux.pl";
$unix=1;
}
-elsif ($platform eq "OS2-EMX")
- {
- $wc=1;
- require 'OS2-EMX.pl';
- }
-elsif (($platform eq "netware-clib") || ($platform eq "netware-libc") ||
- ($platform eq "netware-clib-bsdsock") || ($platform eq "netware-libc-bsdsock"))
- {
- $LIBC=1 if $platform eq "netware-libc" || $platform eq "netware-libc-bsdsock";
- $BSDSOCK=1 if ($platform eq "netware-libc-bsdsock") || ($platform eq "netware-clib-bsdsock");
- require 'netware.pl';
- }
else
{
require "unix.pl";
@@ -1377,8 +1358,6 @@ sub read_options
"no-dh" => \$no_dh,
"no-asm" => \$no_asm,
"nasm" => \$nasm,
- "nw-nasm" => \$nw_nasm,
- "nw-mwasm" => \$nw_mwasm,
"gaswin" => \$gaswin,
"no-ssl3" => \$no_ssl3,
"no-ssl3-method" => 0,
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 4578c9afc2..ec1907890f 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -61,7 +61,6 @@ my $VMSNonVAX=0;
my $VMS=0;
my $W32=0;
my $NT=0;
-my $OS2=0;
my $linux=0;
# Set this to make typesafe STACK definitions appear in DEF
my $safe_stack_def = 0;
@@ -155,7 +154,6 @@ foreach (@ARGV, split(/ /, $config{options}))
$linux=1;
}
$VMS=$VMSNonVAX=1 if $_ eq "VMS";
- $OS2=1 if $_ eq "OS2";
if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic"
|| $_ eq "enable-zlib-dynamic") {
$zlib = 1;
@@ -212,11 +210,11 @@ if (!$libname) {
}
# If no platform is given, assume WIN32
-if ($W32 + $VMS + $OS2 + $linux == 0) {
+if ($W32 + $VMS + $linux == 0) {
$W32 = 1;
}
die "Please, only one platform at a time"
- if ($W32 + $VMS + $OS2 + $linux > 1);
+ if ($W32 + $VMS + $linux > 1);
if (!$do_ssl && !$do_crypto)
{
@@ -1113,7 +1111,6 @@ sub is_valid
if ($keyword eq "VMS" && $VMS) { return 1; }
if ($keyword eq "WIN32" && $W32) { return 1; }
if ($keyword eq "WINNT" && $NT) { return 1; }
- if ($keyword eq "OS2" && $OS2) { return 1; }
# Special platforms:
# EXPORT_VAR_AS_FUNCTION means that global variables
# will be represented as functions. This currently
@@ -1202,22 +1199,8 @@ sub print_def_file
if ($W32)
{ $libname.="32"; }
- elsif ($OS2)
- { # DLL names should not clash on the whole system.
- # However, they should not have any particular relationship
- # to the name of the static library. Chose descriptive names
- # (must be at most 8 chars).
- my %translate = (ssl => 'open_ssl', crypto => 'cryptssl');
- $libname = $translate{$name} || $name;
- $liboptions = <<EOO;
-INITINSTANCE
-DATA MULTIPLE NONSHARED
-EOO
- # Vendor field can't contain colon, drat; so we omit http://
- $description = "\@#$http_vendor:$version#\@$what; DLL for library $name. Build for EMX -Zmtd";
- }
- if ($W32 || $OS2)
+ if ($W32)
{
print OUT <<"EOF";
;
@@ -1329,12 +1312,12 @@ EOF
}
print OUT $symline;
$symvtextcount += length($symline) - 2;
- } elsif($v && !$OS2) {
+ } elsif($v) {
printf OUT " %s%-39s @%-8d DATA\n",
($W32)?"":"_",$s2,$n;
} else {
printf OUT " %s%-39s @%d\n",
- ($W32||$OS2)?"":"_",$s2,$n;
+ ($W32)?"":"_",$s2,$n;
}
}
}
diff --git a/util/pl/OS2-EMX.pl b/util/pl/OS2-EMX.pl
deleted file mode 100644
index 92a332e6e9..0000000000
--- a/util/pl/OS2-EMX.pl
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/local/bin/perl
-#
-# OS2-EMX.pl - for EMX GCC on OS/2
-#
-
-$o='/';
-$cp='cp';
-$rm='rm -f';
-
-$preamble = "SHELL=sh\n";
-
-# C compiler stuff
-
-$cc='gcc';
-$cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmtd -Wall ";
-$cflags.="-Zomf " if $shlib;
-$shl_cflag="-Zdll";
-
-if ($debug) {
- $cflags.="-g ";
-}
-
-$obj=$shlib ? '.obj' : '.o';
-$ofile='-o ';
-
-# EXE linking stuff
-$link='${CC}';
-$lflags='${CFLAGS} -Zbsd-signals -s';
-$efile='-o ';
-$exep='.exe';
-$ex_libs="-lsocket";
-
-# static library stuff
-$mklib='ar r';
-$mlflags='';
-$ranlib="ar s";
-$plib='';
-$libp=$shlib ? ".lib" : ".a";
-$shlibp=$shlib ? ".dll" : ".a";
-$lfile='';
-
-$asm=$shlib ? 'as -Zomf' : 'as';
-$afile='-o ';
-$bn_asm_obj="";
-$bn_asm_src="";
-$des_enc_obj="";
-$des_enc_src="";
-$bf_enc_obj="";
-$bf_enc_src="";
-
-if (!$no_asm)
- {
- $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj";
- $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm";
- $des_enc_obj="crypto/des/asm/d-os2$obj crypto/des/asm/y-os2$obj";
- $des_enc_src="crypto/des/asm/d-os2.asm crypto/des/asm/y-os2.asm";
- $bf_enc_obj="crypto/bf/asm/b-os2$obj";
- $bf_enc_src="crypto/bf/asm/b-os2.asm";
- $cast_enc_obj="crypto/cast/asm/c-os2$obj";
- $cast_enc_src="crypto/cast/asm/c-os2.asm";
- $rc4_enc_obj="crypto/rc4/asm/r4-os2$obj";
- $rc4_enc_src="crypto/rc4/asm/r4-os2.asm";
- $rc5_enc_obj="crypto/rc5/asm/r5-os2$obj";
- $rc5_enc_src="crypto/rc5/asm/r5-os2.asm";
- $md5_asm_obj="crypto/md5/asm/m5-os2$obj";
- $md5_asm_src="crypto/md5/asm/m5-os2.asm";
- $sha1_asm_obj="crypto/sha/asm/s1-os2$obj";
- $sha1_asm_src="crypto/sha/asm/s1-os2.asm";
- $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj";
- $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm";
- $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS";
- }
-
-if ($shlib)
- {
- $mlflags.=" $lflags -Zdll";
- $lib_cflag=" -D_DLL";
- $out_def="out_dll";
- $tmp_def="tmp_dll";
- }
-
-sub do_lib_rule
- {
- local($obj,$target,$name,$shlib)=@_;
- local($ret,$_,$Name);
-
- $target =~ s/\//$o/g if $o ne '/';
- $target="$target";
- ($Name=$name) =~ tr/a-z/A-Z/;
-
- $ret.="$target: \$(${Name}OBJ)\n";
- if (!$shlib)
- {
- $ret.="\t\$(RM) $target\n";
- $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
- $ret.="\t\$(RANLIB) $target\n\n";
- }
- else
- {
- local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
- $ex.=' -lsocket';
- $ret.="\t\$(LINK_CMD) \$(SHLIB_CFLAGS) \$(MLFLAGS) $efile$target \$(SHLIB_EX_OBJ) \$(${Name}OBJ) $ex os2/${Name}.def\n";
- $ret.="\temximp -o $out_def/$name.a os2/${Name}.def\n";
- $ret.="\temximp -o $out_def/$name.lib os2/${Name}.def\n\n";
- }
- }
-
-sub do_link_rule
- {
- local($target,$files,$dep_libs,$libs)=@_;
- local($ret,$_);
-
- $file =~ s/\//$o/g if $o ne '/';
- $n=&bname($target);
- $ret.="$target: $files $dep_libs\n";
- $ret.="\t\$(LINK_CMD) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n";
- return($ret);
- }
-
-1;
diff --git a/util/pl/netware.pl b/util/pl/netware.pl
deleted file mode 100644
index 070c7aa79c..0000000000
--- a/util/pl/netware.pl
+++ /dev/null
@@ -1,534 +0,0 @@
-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
-#
-
-$version_header = "crypto/opensslv.h";
-open(IN, "$version_header") or die "Couldn't open $version_header: $!";
-while (<IN>) {
- if (/^#define[\s\t]+OPENSSL_VERSION_NUMBER[\s\t]+0x(\d)(\d{2})(\d{2})(\d{2})/)
- {
- # die "OpenSSL version detected: $1.$2.$3.$4\n";
- #$nlmvernum = "$1,$2,$3";
- $nlmvernum = "$1,".($2*10+$3).",".($4*1);
- #$nlmverstr = "$1.".($2*1).".".($3*1).($4?(chr(96+$4)):"");
- break;
- }
-}
-close(IN) or die "Couldn't close $version_header: $!";
-
-$readme_file = "README";
-open(IN, $readme_file) or die "Couldn't open $readme_file: $!";
-while (<IN>) {
- if (/^[\s\t]+OpenSSL[\s\t]+(\d)\.(\d{1,2})\.(\d{1,2})([a-z])(.*)/)
- {
- #$nlmvernum = "$1,$2,$3";
- #$nlmvernum = "$1,".($2*10+$3).",".($4*1);
- $nlmverstr = "$1.$2.$3$4$5";
- }
- elsif (/^[\s\t]+(Copyright \(c\) \d{4}\-\d{4} The OpenSSL Project)$/)
- {
- $nlmcpystr = $1;
- }
- break if ($nlmvernum && $nlmcpystr);
-}
-close(IN) or die "Couldn't close $readme_file: $!";
-
-# Define stacksize here
-$nlmstack = "32768";
-
-# some default settings here in case we failed to find them in README
-$nlmvernum = "1,0,0" if (!$nlmvernum);
-$nlmverstr = "OpenSSL" if (!$nlmverstr);
-$nlmcpystr = "Copyright (c) 1998-now The OpenSSL Project" if (!$nlmcpystr);
-
-# die "OpenSSL copyright: $nlmcpystr\nOpenSSL verstring: $nlmverstr\nOpenSSL vernumber: $nlmvernum\n";
-
-# The import files and other misc imports needed to link
-@misc_imports = ("GetProcessSwitchCount", "RunningProcess",
- "GetSuperHighResolutionTimer");
-if ($LIBC)
-{
- @import_files = ("libc.imp");
- @module_files = ("libc");
- $libarch = "LIBC";
-}
-else
-{
- # clib build
- @import_files = ("clib.imp");
- push(@import_files, "socklib.imp") if ($BSDSOCK);
- @module_files = ("clib");
- # push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16");
- $libarch = "CLIB";
-}
-if ($BSDSOCK)
-{
- $libarch .= "-BSD";
-}
-else
-{
- $libarch .= "-WS2";
- push(@import_files, "ws2nlm.imp");
-}
-
-# The "IMPORTS" environment variable must be set and point to the location
-# where import files (*.imp) can be found.
-# Example: set IMPORTS=c:\ndk\nwsdk\imports
-$import_path = $ENV{"IMPORTS"} || die ("IMPORTS environment variable not set\n");
-
-
-# The "PRELUDE" environment variable must be set and point to the location
-# and name of the prelude source to link with ( nwpre.obj is recommended ).
-# Example: set PRELUDE=c:\codewar\novell support\metrowerks support\libraries\runtime\nwpre.obj
-$prelude = $ENV{"PRELUDE"} || die ("PRELUDE environment variable not set\n");
-
-# The "INCLUDES" environment variable must be set and point to the location
-# where import files (*.imp) can be found.
-$include_path = $ENV{"INCLUDE"} || die ("INCLUDES environment variable not set\n");
-$include_path =~ s/\\/\//g;
-$include_path = join(" -I", split(/;/, $include_path));
-
-# check for gcc compiler
-$gnuc = $ENV{"GNUC"};
-
-#$ssl= "libssl32";
-#$crypto="libcrypto32";
-
-if ($gnuc)
-{
- # C compiler
- $cc='gcc';
- # Linker
- $link='nlmconv';
- # librarian
- $mklib='ar';
- $o='/';
- # cp command
- $cp='cp -af';
- # rm command
- $rm='rm -f';
- # mv command
- $mv='mv -f';
- # mkdir command
- $mkdir='gmkdir';
- #$ranlib='ranlib';
-}
-else
-{
- # C compiler
- $cc='mwccnlm';
- # Linker
- $link='mwldnlm';
- # librarian
- $mklib='mwldnlm';
- # Path separator
- $o='\\';
- # cp command
- $cp='copy >nul:';
- # rm command
- $rm='del /f /q';
- # mv command
- $mv='move /y';
-}
-
-# assembler
-if ($nw_nasm)
-{
- $asm=(`nasm -v 2>NUL` gt `nasmw -v 2>NUL`?"nasm":"nasmw");
- if ($gnuc)
- {
- $asm.=" -s -f elf";
- }
- else
- {
- $asm.=" -s -f coff -d __coff__";
- }
- $afile="-o ";
- $asm.=" -g" if $debug;
-}
-elsif ($nw_mwasm)
-{
- $asm="mwasmnlm -maxerrors 20";
- $afile="-o ";
- $asm.=" -g" if $debug;
-}
-elsif ($nw_masm)
-{
-# masm assembly settings - it should be possible to use masm but haven't
-# got it working.
-# $asm='ml /Cp /coff /c /Cx';
-# $asm.=" /Zi" if $debug;
-# $afile='/Fo';
- die("Support for masm assembler not yet functional\n");
-}
-else
-{
- $asm="";
- $afile="";
-}
-
-
-
-if ($gnuc)
-{
- # compile flags for GNUC
- # additional flags based upon debug | non-debug
- if ($debug)
- {
- $cflags="-g -DDEBUG";
- }
- else
- {
- $cflags="-O2";
- }
- $cflags.=" -nostdinc -I$include_path \\
- -fno-builtin -fpcc-struct-return -fno-strict-aliasing \\
- -funsigned-char -Wall -Wno-unused -Wno-uninitialized";
-
- # link flags
- $lflags="-T";
-}
-else
-{
- # compile flags for CodeWarrior
- # additional flags based upon debug | non-debug
- if ($debug)
- {
- $cflags="-opt off -g -sym internal -DDEBUG";
- }
- else
- {
- # CodeWarrior compiler has a problem with optimizations for floating
- # points - no optimizations until further investigation
- # $cflags="-opt all";
- }
-
- # NOTES: Several c files in the crypto subdirectory include headers from
- # their local directories. Metrowerks wouldn't find these h files
- # without adding individual include directives as compile flags
- # or modifying the c files. Instead of adding individual include
- # paths for each subdirectory a recursive include directive
- # is used ( -ir crypto ).
- #
- # A similar issue exists for the engines and apps subdirectories.
- #
- # Turned off the "possible" warnings ( -w nopossible ). Metrowerks
- # complained a lot about various stuff. May want to turn back
- # on for further development.
- $cflags.=" -nostdinc -ir crypto -ir ssl -ir engines -ir apps -I$include_path \\
- -msgstyle gcc -align 4 -processor pentium -char unsigned \\
- -w on -w nolargeargs -w nopossible -w nounusedarg -w nounusedexpr \\
- -w noimplicitconv -relax_pointers -nosyspath -maxerrors 20";
-
- # link flags
- $lflags="-msgstyle gcc -zerobss -nostdlib -sym internal -commandfile";
-}
-
-# common defines
-$cflags.=" -DL_ENDIAN -DOPENSSL_SYS_NETWARE -U_WIN32";
-
-# If LibC build add in NKS_LIBC define and set the entry/exit
-# routines - The default entry/exit routines are for CLib and don't exist
-# in LibC
-if ($LIBC)
-{
- $cflags.=" -DNETWARE_LIBC";
- $nlmstart = "_LibCPrelude";
- $nlmexit = "_LibCPostlude";
- @nlm_flags = ("pseudopreemption", "flag_on 64");
-}
-else
-{
- $cflags.=" -DNETWARE_CLIB";
- $nlmstart = "_Prelude";
- $nlmexit = "_Stop";
-}
-
-# If BSD Socket support is requested, set a define for the compiler
-if ($BSDSOCK)
-{
- $cflags.=" -DNETWARE_BSDSOCK";
- if (!$LIBC)
- {
- $cflags.=" -DNETDB_USE_INTERNET";
- }
-}
-
-
-# linking stuff
-# for the output directories use the mk1mf.pl values with "_nw" appended
-if ($shlib)
-{
- if ($LIBC)
- {
- $out_def.="_nw_libc_nlm";
- $tmp_def.="_nw_libc_nlm";
- $inc_def.="_nw_libc_nlm";
- }
- else # NETWARE_CLIB
- {
- $out_def.="_nw_clib_nlm";
- $tmp_def.="_nw_clib_nlm";
- $inc_def.="_nw_clib_nlm";
- }
-}
-else
-{
- if ($gnuc) # GNUC Tools
- {
- $libp=".a";
- $shlibp=".a";
- $lib_flags="-cr";
- }
- else # CodeWarrior
- {
- $libp=".lib";
- $shlibp=".lib";
- $lib_flags="-nodefaults -type library -o";
- }
- if ($LIBC)
- {
- $out_def.="_nw_libc";
- $tmp_def.="_nw_libc";
- $inc_def.="_nw_libc";
- }
- else # NETWARE_CLIB
- {
- $out_def.="_nw_clib";
- $tmp_def.="_nw_clib";
- $inc_def.="_nw_clib";
- }
-}
-
-# used by mk1mf.pl
-$obj='.o';
-$ofile='-o ';
-$efile='';
-$exep='.nlm';
-$ex_libs='';
-
-if (!$no_asm)
-{
- $bn_asm_obj="\$(OBJ_D)${o}bn-nw${obj}";
- $bn_asm_src="crypto${o}bn${o}asm${o}bn-nw.asm";
- $bnco_asm_obj="\$(OBJ_D)${o}co-nw${obj}";
- $bnco_asm_src="crypto${o}bn${o}asm${o}co-nw.asm";
- $aes_asm_obj="\$(OBJ_D)${o}a-nw${obj}";
- $aes_asm_src="crypto${o}aes${o}asm${o}a-nw.asm";
- $des_enc_obj="\$(OBJ_D)${o}d-nw${obj} \$(OBJ_D)${o}y-nw${obj}";
- $des_enc_src="crypto${o}des${o}asm${o}d-nw.asm crypto${o}des${o}asm${o}y-nw.asm";
- $bf_enc_obj="\$(OBJ_D)${o}b-nw${obj}";
- $bf_enc_src="crypto${o}bf${o}asm${o}b-nw.asm";
- $cast_enc_obj="\$(OBJ_D)${o}c-nw${obj}";
- $cast_enc_src="crypto${o}cast${o}asm${o}c-nw.asm";
- $rc4_enc_obj="\$(OBJ_D)${o}r4-nw${obj}";
- $rc4_enc_src="crypto${o}rc4${o}asm${o}r4-nw.asm";
- $rc5_enc_obj="\$(OBJ_D)${o}r5-nw${obj}";
- $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm";
- $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}";
- $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm";
- $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj} \$(OBJ_D)${o}sha256-nw${obj} \$(OBJ_D)${o}sha512-nw${obj}";
- $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm crypto${o}sha${o}asm${o}sha256-nw.asm crypto${o}sha${o}asm${o}sha512-nw.asm";
- $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}";
- $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm";
- $whirlpool_asm_obj="\$(OBJ_D)${o}wp-nw${obj}";
- $whirlpool_asm_src="crypto${o}whrlpool${o}asm${o}wp-nw.asm";
- $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}";
- $cpuid_asm_src="crypto${o}x86cpuid-nw.asm";
- $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DWHIRLPOOL_ASM";
- $cflags.=" -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM";
- $cflags.=" -DAES_ASM -DRMD160_ASM";
-}
-else
-{
- $bn_asm_obj='';
- $bn_asm_src='';
- $bnco_asm_obj='';
- $bnco_asm_src='';
- $aes_asm_obj='';
- $aes_asm_src='';
- $des_enc_obj='';
- $des_enc_src='';
- $bf_enc_obj='';
- $bf_enc_src='';
- $cast_enc_obj='';
- $cast_enc_src='';
- $rc4_enc_obj='';
- $rc4_enc_src='';
- $rc5_enc_obj='';
- $rc5_enc_src='';
- $md5_asm_obj='';
- $md5_asm_src='';
- $sha1_asm_obj='';
- $sha1_asm_src='';
- $rmd160_asm_obj='';
- $rmd160_asm_src='';
- $whirlpool_asm_obj='';
- $whirlpool_asm_src='';
- $cpuid_asm_obj='';
- $cpuid_asm_src='';
-}
-
-# create the *.def linker command files in \openssl\netware\ directory
-sub do_def_file
-{
- # strip off the leading path
- my($target) = bname(shift);
- my($i);
-
- if ($target =~ /(.*).nlm/)
- {
- $target = $1;
- }
-
- # special case for openssl - the mk1mf.pl defines E_EXE = openssl
- if ($target =~ /E_EXE/)
- {
- $target =~ s/\$\(E_EXE\)/openssl/;
- }
-
- # Note: originally tried to use full path ( \openssl\netware\$target.def )
- # Metrowerks linker choked on this with an assertion failure. bug???
- #
- my($def_file) = "netware${o}$target.def";
-
- open(DEF_OUT, ">$def_file") || die("unable to open file $def_file\n");
-
- print( DEF_OUT "# command file generated by netware.pl for NLM target.\n" );
- print( DEF_OUT "# do not edit this file - all your changes will be lost!!\n" );
- print( DEF_OUT "#\n");
- print( DEF_OUT "DESCRIPTION \"$target ($libarch) - OpenSSL $nlmverstr\"\n");
- print( DEF_OUT "COPYRIGHT \"$nlmcpystr\"\n");
- print( DEF_OUT "VERSION $nlmvernum\n");
- print( DEF_OUT "STACK $nlmstack\n");
- print( DEF_OUT "START $nlmstart\n");
- print( DEF_OUT "EXIT $nlmexit\n");
-
- # special case for openssl
- if ($target eq "openssl")
- {
- print( DEF_OUT "SCREENNAME \"OpenSSL $nlmverstr\"\n");
- }
- else
- {
- print( DEF_OUT "SCREENNAME \"DEFAULT\"\n");
- }
-
- foreach $i (@misc_imports)
- {
- print( DEF_OUT "IMPORT $i\n");
- }
-
- foreach $i (@import_files)
- {
- print( DEF_OUT "IMPORT \@$import_path${o}$i\n");
- }
-
- foreach $i (@module_files)
- {
- print( DEF_OUT "MODULE $i\n");
- }
-
- foreach $i (@nlm_flags)
- {
- print( DEF_OUT "$i\n");
- }
-
- if ($gnuc)
- {
- if ($target =~ /openssl/)
- {
- print( DEF_OUT "INPUT ${tmp_def}${o}openssl${obj}\n");
- print( DEF_OUT "INPUT ${tmp_def}${o}openssl${libp}\n");
- }
- else
- {
- print( DEF_OUT "INPUT ${tmp_def}${o}${target}${obj}\n");
- }
- print( DEF_OUT "INPUT $prelude\n");
- print( DEF_OUT "INPUT ${out_def}${o}${ssl}${libp} ${out_def}${o}${crypto}${libp}\n");
- print( DEF_OUT "OUTPUT $target.nlm\n");
- }
-
- close(DEF_OUT);
- return($def_file);
-}
-
-sub do_lib_rule
-{
- my($objs,$target,$name,$shlib)=@_;
- my($ret);
-
- $ret.="$target: $objs\n";
- if (!$shlib)
- {
- $ret.="\t\@echo Building Lib: $name\n";
- $ret.="\t\$(MKLIB) $lib_flags $target $objs\n";
- $ret.="\t\@echo .\n"
- }
- else
- {
- die( "Building as NLM not currently supported!" );
- }
-
- $ret.="\n";
- return($ret);
-}
-
-sub do_link_rule
-{
- my($target,$files,$dep_libs,$libs)=@_;
- my($ret);
- my($def_file) = do_def_file($target);
-
- $ret.="$target: $files $dep_libs\n";
-
- # NOTE: When building the test nlms no screen name is given
- # which causes the console screen to be used. By using the console
- # screen there is no "<press any key to continue>" message which
- # requires user interaction. The test script ( do_tests.pl ) needs
- # to be able to run the tests without requiring user interaction.
- #
- # However, the sample program "openssl.nlm" is used by the tests and is
- # a interactive sample so a screen is desired when not be run by the
- # tests. To solve the problem, two versions of the program are built:
- # openssl2 - no screen used by tests
- # openssl - default screen - use for normal interactive modes
- #
-
- # special case for openssl - the mk1mf.pl defines E_EXE = openssl
- if ($target =~ /E_EXE/)
- {
- my($target2) = $target;
-
- $target2 =~ s/\(E_EXE\)/\(E_EXE\)2/;
-
- # openssl2
- my($def_file2) = do_def_file($target2);
-
- if ($gnuc)
- {
- $ret.="\t\$(MKLIB) $lib_flags \$(TMP_D)${o}\$(E_EXE).a \$(filter-out \$(TMP_D)${o}\$(E_EXE)${obj},$files)\n";
- $ret.="\t\$(LINK_CMD) \$(LFLAGS) $def_file2\n";
- $ret.="\t\@$mv \$(E_EXE)2.nlm \$(TEST_D)\n";
- }
- else
- {
- $ret.="\t\$(LINK_CMD) \$(LFLAGS) $def_file2 $files \"$prelude\" $libs -o $target2\n";
- }
- }
- if ($gnuc)
- {
- $ret.="\t\$(LINK_CMD) \$(LFLAGS) $def_file\n";
- $ret.="\t\@$mv \$(\@F) \$(TEST_D)\n";
- }
- else
- {
- $ret.="\t\$(LINK_CMD) \$(LFLAGS) $def_file $files \"$prelude\" $libs -o $target\n";
- }
-
- $ret.="\n";
- return($ret);
-
-}
-
-1;