]> git.ipfire.org Git - thirdparty/openssl.git/blame - INSTALL
This commit was generated by cvs2svn to track changes on a CVS vendor
[thirdparty/openssl.git] / INSTALL
CommitLineData
d02b48c6
RE
1# Installation of SSLeay.
2# It depends on perl for a few bits but those steps can be skipped and
3# the top level makefile edited by hand
4
5# When bringing the SSLeay distribution back from the evil intel world
6# of Windows NT, do the following to make it nice again under unix :-)
7# You don't normally need to run this.
8sh util/fixNT.sh # This only works for NT now - eay - 21-Jun-1996
9
10# If you have perl, and it is not in /usr/local/bin, you can run
11perl util/perlpath.pl /new/path
12# and this will fix the paths in all the scripts. DO NOT put
13# /new/path/perl, just /new/path. The build
14# environment always run scripts as 'perl perlscript.pl' but some of the
15# 'applications' are easier to usr with the path fixed.
16
17# Edit crypto/cryptlib.h, tools/c_rehash, and Makefile.ssl
18# to set the install locations if you don't like
19# the default location of /usr/local/ssl
20# Do this by running
21perl util/ssldir.pl /new/ssl/home
22# if you have perl, or by hand if not.
23
24# If things have been stuffed up with the sym links, run
25make -f Makefile.ssl links
26# This will re-populate lib/include with symlinks and for each
27# directory, link Makefile to Makefile.ssl
28
29# Setup the machine dependent stuff for the top level makefile
30# and some select .h files
31# If you don't have perl, this will bomb, in which case just edit the
32# top level Makefile.ssl
33./Configure 'system type'
34
35# The 'Configure' command contains default configuration parameters
36# for lots of machines. Configure edits 5 lines in the top level Makefile
37# It modifies the following values in the following files
38Makefile.ssl CC CFLAG EX_LIBS BN_MULW
39crypto/des/des.h DES_LONG
40crypto/des/des_locl.h DES_PTR
41crypto/md/md2.h MD2_INT
42crypto/rc4/rc4.h RC4_INT
43crypto/rc4/rc4_enc.c RC4_INDEX
44crypto/rc2/rc2.h RC2_INT
45crypto/bf/bf_locl.h BF_INT
46crypto/idea/idea.h IDEA_INT
47crypto/bn/bn.h BN_LLONG (and defines one of SIXTY_FOUR_BIT,
48 SIXTY_FOUR_BIT_LONG, THIRTY_TWO_BIT,
49 SIXTEEN_BIT or EIGHT_BIT)
50Please remember that all these files are actually copies of the file with
51a .org extention. So if you change crypto/des/des.h, the next time
52you run Configure, it will be runover by a 'configured' version of
53crypto/des/des.org. So to make the changer the default, change the .org
54files. The reason these files have to be edited is because most of
55these modifications change the size of fundamental data types.
56While in theory this stuff is optional, it often makes a big
57difference in performance and when using assember, it is importaint
58for the 'Bignum bits' match those required by the assember code.
59A warning for people using gcc with sparc cpu's. Gcc needs the -mv8
60flag to use the hardware multiply instruction which was not present in
61earlier versions of the sparc CPU. I define it by default. If you
62have an old sparc, and it crashes, try rebuilding with this flag
63removed. I am leaving this flag on by default because it makes
64things run 4 times faster :-)
65
66# clean out all the old stuff
67make clean
68
69# Do a make depend only if you have the makedepend command installed
70# This is not needed but it does make things nice when developing.
71make depend
72
73# make should build everything
74make
75
76# fix up the demo certificate hash directory if it has been stuffed up.
77make rehash
78
79# test everything
80make test
81
82# install the lot
83make install
84
85# It is worth noting that all the applications are built into the one
86# program, ssleay, which is then has links from the other programs
87# names to it.
88# The applicatons can be built by themselves, just don't define the
89# 'MONOLITH' flag. So to build the 'enc' program stand alone,
90gcc -O2 -Iinclude apps/enc.c apps/apps.c libcrypto.a
91
92# Other useful make options are
93make makefile.one
94# which generate a 'makefile.one' file which will build the complete
95# SSLeay distribution with temp. files in './tmp' and 'installable' files
96# in './out'
97
98# Have a look at running
99perl util/mk1mf.pl help
100# this can be used to generate a single makefile and is about the only
101# way to generate makefiles for windows.
102
103# There is actually a final way of building SSLeay.
104gcc -O2 -c -Icrypto -Iinclude crypto/crypto.c
105gcc -O2 -c -Issl -Iinclude ssl/ssl.c
106# and you now have the 2 libraries as single object files :-).
107# If you want to use the assember code for your particular platform
108# (DEC alpha/x86 are the main ones, the other assember is just the
109# output from gcc) you will need to link the assember with the above generated
110# object file and also do the above compile as
111gcc -O2 -DBN_ASM -c -Icrypto -Iinclude crypto/crypto.c
112
113This last option is probably the best way to go when porting to another
114platform or building shared libraries. It is not good for development so
115I don't normally use it.
116
117To build shared libararies under unix, have a look in shlib, basically
118you are on your own, but it is quite easy and all you have to do
119is compile 2 (or 3) files.
120
121For mult-threading, have a read of doc/threads.doc. Again it is quite
122easy and normally only requires some extra callbacks to be defined
123by the application.
124The examples for solaris and windows NT/95 are in the mt directory.
125
126have fun
127
128eric 25-Jun-1997