mingw related changes as in head
This commit is contained in:
parent
dab0aaa612
commit
0480574310
552
INSTALL.W32
552
INSTALL.W32
@ -1,278 +1,274 @@
|
|||||||
|
|
||||||
INSTALLATION ON THE WIN32 PLATFORM
|
INSTALLATION ON THE WIN32 PLATFORM
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
[Instructions for building for Windows CE can be found in INSTALL.WCE]
|
[Instructions for building for Windows CE can be found in INSTALL.WCE]
|
||||||
|
|
||||||
Heres a few comments about building OpenSSL in Windows environments. Most
|
Heres a few comments about building OpenSSL in Windows environments. Most
|
||||||
of this is tested on Win32 but it may also work in Win 3.1 with some
|
of this is tested on Win32 but it may also work in Win 3.1 with some
|
||||||
modification.
|
modification.
|
||||||
|
|
||||||
You need Perl for Win32. Unless you will build on Cygwin, you will need
|
You need Perl for Win32. Unless you will build on Cygwin, you will need
|
||||||
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
||||||
For Cygwin users, there's more info in the Cygwin section.
|
For Cygwin users, there's more info in the Cygwin section.
|
||||||
|
|
||||||
and one of the following C compilers:
|
and one of the following C compilers:
|
||||||
|
|
||||||
* Visual C++
|
* Visual C++
|
||||||
* Borland C
|
* Borland C
|
||||||
* GNU C (Mingw32 or Cygwin)
|
* GNU C (MinGW or Cygwin)
|
||||||
|
|
||||||
If you want to compile in the assembly language routines with Visual C++ then
|
If you want to compile in the assembly language routines with Visual C++ then
|
||||||
you will need an assembler. This is worth doing because it will result in
|
you will need an assembler. This is worth doing because it will result in
|
||||||
faster code: for example it will typically result in a 2 times speedup in the
|
faster code: for example it will typically result in a 2 times speedup in the
|
||||||
RSA routines. Currently the following assemblers are supported:
|
RSA routines. Currently the following assemblers are supported:
|
||||||
|
|
||||||
* Microsoft MASM (aka "ml")
|
* Microsoft MASM (aka "ml")
|
||||||
* Free Netwide Assembler NASM.
|
* Free Netwide Assembler NASM.
|
||||||
|
|
||||||
MASM is distributed with most versions of VC++. For the versions where it is
|
MASM is distributed with most versions of VC++. For the versions where it is
|
||||||
not included in VC++, it is also distributed with some Microsoft DDKs, for
|
not included in VC++, it is also distributed with some Microsoft DDKs, for
|
||||||
example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
|
example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
|
||||||
either of these DDKs then you can just download the binaries for the Windows
|
either of these DDKs then you can just download the binaries for the Windows
|
||||||
98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
|
98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
|
||||||
ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
|
ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
|
||||||
downloaded from the Microsoft developers site www.msdn.com.
|
downloaded from the Microsoft developers site www.msdn.com.
|
||||||
|
|
||||||
NASM is freely available. Version 0.98 was used during testing: other versions
|
NASM is freely available. Version 0.98 was used during testing: other versions
|
||||||
may also work. It is available from many places, see for example:
|
may also work. It is available from many places, see for example:
|
||||||
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
||||||
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
||||||
|
|
||||||
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
||||||
may well be not up to date. This may mean that some "tweaking" is required to
|
may well be not up to date. This may mean that some "tweaking" is required to
|
||||||
get it all to work. See the trouble shooting section later on for if (when?)
|
get it all to work. See the trouble shooting section later on for if (when?)
|
||||||
it goes wrong.
|
it goes wrong.
|
||||||
|
|
||||||
Visual C++
|
Visual C++
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Firstly you should run Configure:
|
Firstly you should run Configure:
|
||||||
|
|
||||||
> perl Configure VC-WIN32
|
> perl Configure VC-WIN32
|
||||||
|
|
||||||
Next you need to build the Makefiles and optionally the assembly language
|
Next you need to build the Makefiles and optionally the assembly language
|
||||||
files:
|
files:
|
||||||
|
|
||||||
- If you are using MASM then run:
|
- If you are using MASM then run:
|
||||||
|
|
||||||
> ms\do_masm
|
> ms\do_masm
|
||||||
|
|
||||||
- If you are using NASM then run:
|
- If you are using NASM then run:
|
||||||
|
|
||||||
> ms\do_nasm
|
> ms\do_nasm
|
||||||
|
|
||||||
- If you don't want to use the assembly language files at all then run:
|
- If you don't want to use the assembly language files at all then run:
|
||||||
|
|
||||||
> ms\do_ms
|
> ms\do_ms
|
||||||
|
|
||||||
If you get errors about things not having numbers assigned then check the
|
If you get errors about things not having numbers assigned then check the
|
||||||
troubleshooting section: you probably won't be able to compile it as it
|
troubleshooting section: you probably won't be able to compile it as it
|
||||||
stands.
|
stands.
|
||||||
|
|
||||||
Then from the VC++ environment at a prompt do:
|
Then from the VC++ environment at a prompt do:
|
||||||
|
|
||||||
> nmake -f ms\ntdll.mak
|
> nmake -f ms\ntdll.mak
|
||||||
|
|
||||||
If all is well it should compile and you will have some DLLs and executables
|
If all is well it should compile and you will have some DLLs and executables
|
||||||
in out32dll. If you want to try the tests then do:
|
in out32dll. If you want to try the tests then do:
|
||||||
|
|
||||||
> cd out32dll
|
> cd out32dll
|
||||||
> ..\ms\test
|
> ..\ms\test
|
||||||
|
|
||||||
Tweaks:
|
Tweaks:
|
||||||
|
|
||||||
There are various changes you can make to the Win32 compile environment. By
|
There are various changes you can make to the Win32 compile environment. By
|
||||||
default the library is not compiled with debugging symbols. If you add 'debug'
|
default the library is not compiled with debugging symbols. If you add 'debug'
|
||||||
to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
|
to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
|
||||||
compiled in. Note that mk1mf.pl expects the platform to be the last argument
|
compiled in. Note that mk1mf.pl expects the platform to be the last argument
|
||||||
on the command line, so 'debug' must appear before that, as all other options.
|
on the command line, so 'debug' must appear before that, as all other options.
|
||||||
|
|
||||||
The default Win32 environment is to leave out any Windows NT specific
|
The default Win32 environment is to leave out any Windows NT specific
|
||||||
features.
|
features.
|
||||||
|
|
||||||
If you want to enable the NT specific features of OpenSSL (currently only the
|
If you want to enable the NT specific features of OpenSSL (currently only the
|
||||||
logging BIO) follow the instructions above but call the batch file do_nt.bat
|
logging BIO) follow the instructions above but call the batch file do_nt.bat
|
||||||
instead of do_ms.bat.
|
instead of do_ms.bat.
|
||||||
|
|
||||||
You can also build a static version of the library using the Makefile
|
You can also build a static version of the library using the Makefile
|
||||||
ms\nt.mak
|
ms\nt.mak
|
||||||
|
|
||||||
Borland C++ builder 5
|
Borland C++ builder 5
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
* Configure for building with Borland Builder:
|
* Configure for building with Borland Builder:
|
||||||
> perl Configure BC-32
|
> perl Configure BC-32
|
||||||
|
|
||||||
* Create the appropriate makefile
|
* Create the appropriate makefile
|
||||||
> ms\do_nasm
|
> ms\do_nasm
|
||||||
|
|
||||||
* Build
|
* Build
|
||||||
> make -f ms\bcb.mak
|
> make -f ms\bcb.mak
|
||||||
|
|
||||||
Borland C++ builder 3 and 4
|
Borland C++ builder 3 and 4
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
* Setup PATH. First must be GNU make then bcb4/bin
|
* Setup PATH. First must be GNU make then bcb4/bin
|
||||||
|
|
||||||
* Run ms\bcb4.bat
|
* Run ms\bcb4.bat
|
||||||
|
|
||||||
* Run make:
|
* Run make:
|
||||||
> make -f bcb.mak
|
> make -f bcb.mak
|
||||||
|
|
||||||
GNU C (Mingw32)
|
GNU C (MinGW)
|
||||||
---------------
|
-------------
|
||||||
|
|
||||||
To build OpenSSL, you need the Mingw32 package and GNU make.
|
* Compiler installation:
|
||||||
|
|
||||||
* Compiler installation:
|
MinGW is available from http://www.mingw.org. Run the installer and
|
||||||
|
set the MinGW \bin directory to the PATH in "System Properties" or
|
||||||
Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/
|
autoexec.bat.
|
||||||
gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. Extract it
|
|
||||||
to a directory such as C:\gcc-2.95.2 and add c:\gcc-2.95.2\bin to
|
* Compile OpenSSL:
|
||||||
the PATH environment variable in "System Properties"; or edit and
|
|
||||||
run C:\gcc-2.95.2\mingw32.bat to set the PATH.
|
> ms\mingw32
|
||||||
|
|
||||||
* Compile OpenSSL:
|
This will create the library and binaries in out. In case any problems
|
||||||
|
occur, try
|
||||||
> ms\mingw32
|
> ms\mingw32 no-asm
|
||||||
|
instead.
|
||||||
This will create the library and binaries in out. In case any problems
|
|
||||||
occur, try
|
libcrypto.a and libssl.a are the static libraries. To use the DLLs,
|
||||||
> ms\mingw32 no-asm
|
link with libeay32.a and libssl32.a instead.
|
||||||
instead.
|
|
||||||
|
See troubleshooting if you get error messages about functions not having
|
||||||
libcrypto.a and libssl.a are the static libraries. To use the DLLs,
|
a number assigned.
|
||||||
link with libeay32.a and libssl32.a instead.
|
|
||||||
|
* You can now try the tests:
|
||||||
See troubleshooting if you get error messages about functions not having
|
|
||||||
a number assigned.
|
> cd out
|
||||||
|
> ..\ms\test
|
||||||
* You can now try the tests:
|
|
||||||
|
GNU C (Cygwin)
|
||||||
> cd out
|
--------------
|
||||||
> ..\ms\test
|
|
||||||
|
Cygwin provides a bash shell and GNU tools environment running
|
||||||
GNU C (Cygwin)
|
on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
|
||||||
--------------
|
Consequently, a make of OpenSSL with Cygwin is closer to a GNU
|
||||||
|
bash environment such as Linux than to other W32 makes which are
|
||||||
Cygwin provides a bash shell and GNU tools environment running
|
based on a single makefile approach. Cygwin implements Posix/Unix
|
||||||
on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
|
calls through cygwin1.dll, and is contrasted to MingW which links
|
||||||
Consequently, a make of OpenSSL with Cygwin is closer to a GNU
|
dynamically to msvcrt.dll or crtdll.dll.
|
||||||
bash environment such as Linux than to other W32 makes which are
|
|
||||||
based on a single makefile approach. Cygwin implements Posix/Unix
|
To build OpenSSL using Cygwin:
|
||||||
calls through cygwin1.dll, and is contrasted to Mingw32 which links
|
|
||||||
dynamically to msvcrt.dll or crtdll.dll.
|
* Install Cygwin (see http://cygwin.com/)
|
||||||
|
|
||||||
To build OpenSSL using Cygwin:
|
* Install Perl and ensure it is in the path (recent Cygwin perl
|
||||||
|
(version 5.6.1-2 of the latter has been reported to work) or
|
||||||
* Install Cygwin (see http://cygwin.com/)
|
ActivePerl)
|
||||||
|
|
||||||
* Install Perl and ensure it is in the path (recent Cygwin perl
|
* Run the Cygwin bash shell
|
||||||
(version 5.6.1-2 of the latter has been reported to work) or
|
|
||||||
ActivePerl)
|
* $ tar zxvf openssl-x.x.x.tar.gz
|
||||||
|
$ cd openssl-x.x.x
|
||||||
* Run the Cygwin bash shell
|
$ ./config
|
||||||
|
[...]
|
||||||
* $ tar zxvf openssl-x.x.x.tar.gz
|
$ make
|
||||||
$ cd openssl-x.x.x
|
[...]
|
||||||
$ ./config
|
$ make test
|
||||||
[...]
|
$ make install
|
||||||
$ make
|
|
||||||
[...]
|
This will create a default install in /usr/local/ssl.
|
||||||
$ make test
|
|
||||||
$ make install
|
Cygwin Notes:
|
||||||
|
|
||||||
This will create a default install in /usr/local/ssl.
|
"make test" and normal file operations may fail in directories
|
||||||
|
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||||
Cygwin Notes:
|
stripping of carriage returns. To avoid this ensure that a binary
|
||||||
|
mount is used, e.g. mount -b c:\somewhere /home.
|
||||||
"make test" and normal file operations may fail in directories
|
|
||||||
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
"bc" is not provided in older Cygwin distribution. This causes a
|
||||||
stripping of carriage returns. To avoid this ensure that a binary
|
non-fatal error in "make test" but is otherwise harmless. If
|
||||||
mount is used, e.g. mount -b c:\somewhere /home.
|
desired and needed, GNU bc can be built with Cygwin without change.
|
||||||
|
|
||||||
"bc" is not provided in older Cygwin distribution. This causes a
|
|
||||||
non-fatal error in "make test" but is otherwise harmless. If
|
Installation
|
||||||
desired and needed, GNU bc can be built with Cygwin without change.
|
------------
|
||||||
|
|
||||||
|
If you used the Cygwin procedure above, you have already installed and
|
||||||
Installation
|
can skip this section. For all other procedures, there's currently no real
|
||||||
------------
|
installation procedure for Win32. There are, however, some suggestions:
|
||||||
|
|
||||||
If you used the Cygwin procedure above, you have already installed and
|
- do nothing. The include files are found in the inc32/ subdirectory,
|
||||||
can skip this section. For all other procedures, there's currently no real
|
all binaries are found in out32dll/ or out32/ depending if you built
|
||||||
installation procedure for Win32. There are, however, some suggestions:
|
dynamic or static libraries.
|
||||||
|
|
||||||
- do nothing. The include files are found in the inc32/ subdirectory,
|
- do as is written in INSTALL.Win32 that comes with modssl:
|
||||||
all binaries are found in out32dll/ or out32/ depending if you built
|
|
||||||
dynamic or static libraries.
|
$ md c:\openssl
|
||||||
|
$ md c:\openssl\bin
|
||||||
- do as is written in INSTALL.Win32 that comes with modssl:
|
$ md c:\openssl\lib
|
||||||
|
$ md c:\openssl\include
|
||||||
$ md c:\openssl
|
$ md c:\openssl\include\openssl
|
||||||
$ md c:\openssl\bin
|
$ copy /b inc32\* c:\openssl\include\openssl
|
||||||
$ md c:\openssl\lib
|
$ copy /b out32dll\ssleay32.lib c:\openssl\lib
|
||||||
$ md c:\openssl\include
|
$ copy /b out32dll\libeay32.lib c:\openssl\lib
|
||||||
$ md c:\openssl\include\openssl
|
$ copy /b out32dll\ssleay32.dll c:\openssl\bin
|
||||||
$ copy /b inc32\* c:\openssl\include\openssl
|
$ copy /b out32dll\libeay32.dll c:\openssl\bin
|
||||||
$ copy /b out32dll\ssleay32.lib c:\openssl\lib
|
$ copy /b out32dll\openssl.exe c:\openssl\bin
|
||||||
$ copy /b out32dll\libeay32.lib c:\openssl\lib
|
|
||||||
$ copy /b out32dll\ssleay32.dll c:\openssl\bin
|
Of course, you can choose another device than c:. C: is used here
|
||||||
$ copy /b out32dll\libeay32.dll c:\openssl\bin
|
because that's usually the first (and often only) harddisk device.
|
||||||
$ copy /b out32dll\openssl.exe c:\openssl\bin
|
Note: in the modssl INSTALL.Win32, p: is used rather than c:.
|
||||||
|
|
||||||
Of course, you can choose another device than c:. C: is used here
|
|
||||||
because that's usually the first (and often only) harddisk device.
|
Troubleshooting
|
||||||
Note: in the modssl INSTALL.Win32, p: is used rather than c:.
|
---------------
|
||||||
|
|
||||||
|
Since the Win32 build is only occasionally tested it may not always compile
|
||||||
Troubleshooting
|
cleanly. If you get an error about functions not having numbers assigned
|
||||||
---------------
|
when you run ms\do_ms then this means the Win32 ordinal files are not up to
|
||||||
|
date. You can do:
|
||||||
Since the Win32 build is only occasionally tested it may not always compile
|
|
||||||
cleanly. If you get an error about functions not having numbers assigned
|
> perl util\mkdef.pl crypto ssl update
|
||||||
when you run ms\do_ms then this means the Win32 ordinal files are not up to
|
|
||||||
date. You can do:
|
then ms\do_XXX should not give a warning any more. However the numbers that
|
||||||
|
get assigned by this technique may not match those that eventually get
|
||||||
> perl util\mkdef.pl crypto ssl update
|
assigned in the CVS tree: so anything linked against this version of the
|
||||||
|
library may need to be recompiled.
|
||||||
then ms\do_XXX should not give a warning any more. However the numbers that
|
|
||||||
get assigned by this technique may not match those that eventually get
|
If you get errors about unresolved symbols there are several possible
|
||||||
assigned in the CVS tree: so anything linked against this version of the
|
causes.
|
||||||
library may need to be recompiled.
|
|
||||||
|
If this happens when the DLL is being linked and you have disabled some
|
||||||
If you get errors about unresolved symbols there are several possible
|
ciphers then it is possible the DEF file generator hasn't removed all
|
||||||
causes.
|
the disabled symbols: the easiest solution is to edit the DEF files manually
|
||||||
|
to delete them. The DEF files are ms\libeay32.def ms\ssleay32.def.
|
||||||
If this happens when the DLL is being linked and you have disabled some
|
|
||||||
ciphers then it is possible the DEF file generator hasn't removed all
|
Another cause is if you missed or ignored the errors about missing numbers
|
||||||
the disabled symbols: the easiest solution is to edit the DEF files manually
|
mentioned above.
|
||||||
to delete them. The DEF files are ms\libeay32.def ms\ssleay32.def.
|
|
||||||
|
If you get warnings in the code then the compilation will halt.
|
||||||
Another cause is if you missed or ignored the errors about missing numbers
|
|
||||||
mentioned above.
|
The default Makefile for Win32 halts whenever any warnings occur. Since VC++
|
||||||
|
has its own ideas about warnings which don't always match up to other
|
||||||
If you get warnings in the code then the compilation will halt.
|
environments this can happen. The best fix is to edit the file with the
|
||||||
|
warning in and fix it. Alternatively you can turn off the halt on warnings by
|
||||||
The default Makefile for Win32 halts whenever any warnings occur. Since VC++
|
editing the CFLAG line in the Makefile and deleting the /WX option.
|
||||||
has its own ideas about warnings which don't always match up to other
|
|
||||||
environments this can happen. The best fix is to edit the file with the
|
You might get compilation errors. Again you will have to fix these or report
|
||||||
warning in and fix it. Alternatively you can turn off the halt on warnings by
|
them.
|
||||||
editing the CFLAG line in the Makefile and deleting the /WX option.
|
|
||||||
|
One final comment about compiling applications linked to the OpenSSL library.
|
||||||
You might get compilation errors. Again you will have to fix these or report
|
If you don't use the multithreaded DLL runtime library (/MD option) your
|
||||||
them.
|
program will almost certainly crash because malloc gets confused -- the
|
||||||
|
OpenSSL DLLs are statically linked to one version, the application must
|
||||||
One final comment about compiling applications linked to the OpenSSL library.
|
not use a different one. You might be able to work around such problems
|
||||||
If you don't use the multithreaded DLL runtime library (/MD option) your
|
by adding CRYPTO_malloc_init() to your program before any calls to the
|
||||||
program will almost certainly crash because malloc gets confused -- the
|
OpenSSL libraries: This tells the OpenSSL libraries to use the same
|
||||||
OpenSSL DLLs are statically linked to one version, the application must
|
malloc(), free() and realloc() as the application. However there are many
|
||||||
not use a different one. You might be able to work around such problems
|
standard library functions used by OpenSSL that call malloc() internally
|
||||||
by adding CRYPTO_malloc_init() to your program before any calls to the
|
(e.g. fopen()), and OpenSSL cannot change these; so in general you cannot
|
||||||
OpenSSL libraries: This tells the OpenSSL libraries to use the same
|
rely on CRYPTO_malloc_init() solving your problem, and you should
|
||||||
malloc(), free() and realloc() as the application. However there are many
|
consistently use the multithreaded library.
|
||||||
standard library functions used by OpenSSL that call malloc() internally
|
|
||||||
(e.g. fopen()), and OpenSSL cannot change these; so in general you cannot
|
|
||||||
rely on CRYPTO_malloc_init() solving your problem, and you should
|
|
||||||
consistently use the multithreaded library.
|
|
||||||
|
@ -66,21 +66,16 @@ cd ..\..\..
|
|||||||
echo Generating makefile
|
echo Generating makefile
|
||||||
perl util\mkfiles.pl >MINFO
|
perl util\mkfiles.pl >MINFO
|
||||||
perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak
|
perl util\mk1mf.pl gaswin Mingw32 >ms\mingw32a.mak
|
||||||
perl util\mk1mf.pl gaswin Mingw32-files >ms\mingw32f.mak
|
|
||||||
echo Generating DLL definition files
|
echo Generating DLL definition files
|
||||||
perl util\mkdef.pl 32 libeay >ms\libeay32.def
|
perl util\mkdef.pl 32 libeay >ms\libeay32.def
|
||||||
if errorlevel 1 goto end
|
if errorlevel 1 goto end
|
||||||
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
|
perl util\mkdef.pl 32 ssleay >ms\ssleay32.def
|
||||||
if errorlevel 1 goto end
|
if errorlevel 1 goto end
|
||||||
|
|
||||||
rem Create files -- this can be skipped if using the GNU file utilities
|
rem copy ms\tlhelp32.h outinc
|
||||||
make -f ms/mingw32f.mak
|
|
||||||
echo You can ignore the error messages above
|
|
||||||
|
|
||||||
copy ms\tlhelp32.h outinc
|
|
||||||
|
|
||||||
echo Building the libraries
|
echo Building the libraries
|
||||||
make -f ms/mingw32a.mak
|
mingw32-make -f ms/mingw32a.mak
|
||||||
if errorlevel 1 goto end
|
if errorlevel 1 goto end
|
||||||
|
|
||||||
echo Generating the DLLs and input libraries
|
echo Generating the DLLs and input libraries
|
||||||
|
@ -67,6 +67,10 @@ echo dsatest
|
|||||||
dsatest
|
dsatest
|
||||||
if errorlevel 1 goto done
|
if errorlevel 1 goto done
|
||||||
|
|
||||||
|
echo ectest
|
||||||
|
ectest
|
||||||
|
if errorlevel 1 goto done
|
||||||
|
|
||||||
echo testenc
|
echo testenc
|
||||||
call %test%\testenc openssl
|
call %test%\testenc openssl
|
||||||
if errorlevel 1 goto done
|
if errorlevel 1 goto done
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#!/usr/local/bin/perl
|
#!/usr/local/bin/perl
|
||||||
#
|
#
|
||||||
# Mingw32.pl -- Mingw32 with GNU cp (Mingw32f.pl uses DOS tools)
|
# Mingw32.pl -- Mingw
|
||||||
#
|
#
|
||||||
|
|
||||||
$o='/';
|
$o='/';
|
||||||
$cp='cp';
|
$cp='cp';
|
||||||
$rm='rem'; # use 'rm -f' if using GNU file utilities
|
$rm='rm -f';
|
||||||
$mkdir='gmkdir';
|
$mkdir='gmkdir';
|
||||||
|
|
||||||
# gcc wouldn't accept backslashes in paths
|
$o='\\';
|
||||||
#$o='\\';
|
$cp='copy';
|
||||||
#$cp='copy';
|
$rm='del';
|
||||||
#$rm='del';
|
$mkdir='mkdir';
|
||||||
|
|
||||||
# C compiler stuff
|
# C compiler stuff
|
||||||
|
|
||||||
@ -19,29 +19,29 @@ $cc='gcc';
|
|||||||
if ($debug)
|
if ($debug)
|
||||||
{ $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
|
{ $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
|
||||||
else
|
else
|
||||||
{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -m486 -Wall"; }
|
{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; }
|
||||||
|
|
||||||
if ($gaswin and !$no_asm)
|
if ($gaswin and !$no_asm)
|
||||||
{
|
{
|
||||||
$bn_asm_obj='$(OBJ_D)/bn-win32.o';
|
$bn_asm_obj='$(OBJ_D)\bn-win32.o';
|
||||||
$bn_asm_src='crypto/bn/asm/bn-win32.s';
|
$bn_asm_src='crypto/bn/asm/bn-win32.s';
|
||||||
$bnco_asm_obj='$(OBJ_D)/co-win32.o';
|
$bnco_asm_obj='$(OBJ_D)\co-win32.o';
|
||||||
$bnco_asm_src='crypto/bn/asm/co-win32.s';
|
$bnco_asm_src='crypto/bn/asm/co-win32.s';
|
||||||
$des_enc_obj='$(OBJ_D)/d-win32.o $(OBJ_D)/y-win32.o';
|
$des_enc_obj='$(OBJ_D)\d-win32.o $(OBJ_D)\y-win32.o';
|
||||||
$des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s';
|
$des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s';
|
||||||
$bf_enc_obj='$(OBJ_D)/b-win32.o';
|
$bf_enc_obj='$(OBJ_D)\b-win32.o';
|
||||||
$bf_enc_src='crypto/bf/asm/b-win32.s';
|
$bf_enc_src='crypto/bf/asm/b-win32.s';
|
||||||
# $cast_enc_obj='$(OBJ_D)/c-win32.o';
|
# $cast_enc_obj='$(OBJ_D)\c-win32.o';
|
||||||
# $cast_enc_src='crypto/cast/asm/c-win32.s';
|
# $cast_enc_src='crypto/cast/asm/c-win32.s';
|
||||||
$rc4_enc_obj='$(OBJ_D)/r4-win32.o';
|
$rc4_enc_obj='$(OBJ_D)\r4-win32.o';
|
||||||
$rc4_enc_src='crypto/rc4/asm/r4-win32.s';
|
$rc4_enc_src='crypto/rc4/asm/r4-win32.s';
|
||||||
$rc5_enc_obj='$(OBJ_D)/r5-win32.o';
|
$rc5_enc_obj='$(OBJ_D)\r5-win32.o';
|
||||||
$rc5_enc_src='crypto/rc5/asm/r5-win32.s';
|
$rc5_enc_src='crypto/rc5/asm/r5-win32.s';
|
||||||
$md5_asm_obj='$(OBJ_D)/m5-win32.o';
|
$md5_asm_obj='$(OBJ_D)\m5-win32.o';
|
||||||
$md5_asm_src='crypto/md5/asm/m5-win32.s';
|
$md5_asm_src='crypto/md5/asm/m5-win32.s';
|
||||||
$rmd160_asm_obj='$(OBJ_D)/rm-win32.o';
|
$rmd160_asm_obj='$(OBJ_D)\rm-win32.o';
|
||||||
$rmd160_asm_src='crypto/ripemd/asm/rm-win32.s';
|
$rmd160_asm_src='crypto/ripemd/asm/rm-win32.s';
|
||||||
$sha1_asm_obj='$(OBJ_D)/s1-win32.o';
|
$sha1_asm_obj='$(OBJ_D)\s1-win32.o';
|
||||||
$sha1_asm_src='crypto/sha/asm/s1-win32.s';
|
$sha1_asm_src='crypto/sha/asm/s1-win32.s';
|
||||||
$cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM";
|
$cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM";
|
||||||
}
|
}
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
#!/usr/local/bin/perl
|
|
||||||
#
|
|
||||||
# Mingw32f.pl -- copy files; Mingw32.pl is needed to do the compiling.
|
|
||||||
#
|
|
||||||
|
|
||||||
$o='\\';
|
|
||||||
$cp='copy';
|
|
||||||
$rm='del';
|
|
||||||
|
|
||||||
# C compiler stuff
|
|
||||||
|
|
||||||
$cc='gcc';
|
|
||||||
if ($debug)
|
|
||||||
{ $cflags="-g2 -ggdb -DDSO_WIN32"; }
|
|
||||||
else
|
|
||||||
{ $cflags="-O3 -fomit-frame-pointer -DDSO_WIN32"; }
|
|
||||||
|
|
||||||
$obj='.o';
|
|
||||||
$ofile='-o ';
|
|
||||||
|
|
||||||
# EXE linking stuff
|
|
||||||
$link='${CC}';
|
|
||||||
$lflags='${CFLAGS}';
|
|
||||||
$efile='-o ';
|
|
||||||
$exep='';
|
|
||||||
$ex_libs="-lwsock32 -lgdi32";
|
|
||||||
|
|
||||||
# static library stuff
|
|
||||||
$mklib='ar r';
|
|
||||||
$mlflags='';
|
|
||||||
$ranlib='ranlib';
|
|
||||||
$plib='lib';
|
|
||||||
$libp=".a";
|
|
||||||
$shlibp=".a";
|
|
||||||
$lfile='';
|
|
||||||
|
|
||||||
$asm='as';
|
|
||||||
$afile='-o ';
|
|
||||||
$bn_asm_obj="";
|
|
||||||
$bn_asm_src="";
|
|
||||||
$des_enc_obj="";
|
|
||||||
$des_enc_src="";
|
|
||||||
$bf_enc_obj="";
|
|
||||||
$bf_enc_src="";
|
|
||||||
|
|
||||||
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";
|
|
||||||
$ret.="\t\$(RM) $target\n";
|
|
||||||
$ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
|
|
||||||
$ret.="\t\$(RANLIB) $target\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) ${efile}$target \$(LFLAGS) $files $libs\n\n";
|
|
||||||
return($ret);
|
|
||||||
}
|
|
||||||
1;
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user