]>
Commit | Line | Data |
---|---|---|
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. | |
8 | sh 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 | |
11 | perl 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 | |
21 | perl 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 | |
25 | make -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 | |
38 | Makefile.ssl CC CFLAG EX_LIBS BN_MULW | |
39 | crypto/des/des.h DES_LONG | |
40 | crypto/des/des_locl.h DES_PTR | |
41 | crypto/md/md2.h MD2_INT | |
42 | crypto/rc4/rc4.h RC4_INT | |
43 | crypto/rc4/rc4_enc.c RC4_INDEX | |
44 | crypto/rc2/rc2.h RC2_INT | |
45 | crypto/bf/bf_locl.h BF_INT | |
46 | crypto/idea/idea.h IDEA_INT | |
47 | crypto/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) | |
50 | Please remember that all these files are actually copies of the file with | |
51 | a .org extention. So if you change crypto/des/des.h, the next time | |
52 | you run Configure, it will be runover by a 'configured' version of | |
53 | crypto/des/des.org. So to make the changer the default, change the .org | |
54 | files. The reason these files have to be edited is because most of | |
55 | these modifications change the size of fundamental data types. | |
56 | While in theory this stuff is optional, it often makes a big | |
57 | difference in performance and when using assember, it is importaint | |
58 | for the 'Bignum bits' match those required by the assember code. | |
59 | A warning for people using gcc with sparc cpu's. Gcc needs the -mv8 | |
60 | flag to use the hardware multiply instruction which was not present in | |
61 | earlier versions of the sparc CPU. I define it by default. If you | |
62 | have an old sparc, and it crashes, try rebuilding with this flag | |
63 | removed. I am leaving this flag on by default because it makes | |
64 | things run 4 times faster :-) | |
65 | ||
66 | # clean out all the old stuff | |
67 | make 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. | |
71 | make depend | |
72 | ||
73 | # make should build everything | |
74 | make | |
75 | ||
76 | # fix up the demo certificate hash directory if it has been stuffed up. | |
77 | make rehash | |
78 | ||
79 | # test everything | |
80 | make test | |
81 | ||
82 | # install the lot | |
83 | make 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, | |
90 | gcc -O2 -Iinclude apps/enc.c apps/apps.c libcrypto.a | |
91 | ||
92 | # Other useful make options are | |
93 | make 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 | |
99 | perl 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. | |
104 | gcc -O2 -c -Icrypto -Iinclude crypto/crypto.c | |
105 | gcc -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 | |
111 | gcc -O2 -DBN_ASM -c -Icrypto -Iinclude crypto/crypto.c | |
112 | ||
113 | This last option is probably the best way to go when porting to another | |
114 | platform or building shared libraries. It is not good for development so | |
115 | I don't normally use it. | |
116 | ||
117 | To build shared libararies under unix, have a look in shlib, basically | |
118 | you are on your own, but it is quite easy and all you have to do | |
119 | is compile 2 (or 3) files. | |
120 | ||
121 | For mult-threading, have a read of doc/threads.doc. Again it is quite | |
122 | easy and normally only requires some extra callbacks to be defined | |
123 | by the application. | |
124 | The examples for solaris and windows NT/95 are in the mt directory. | |
125 | ||
126 | have fun | |
127 | ||
128 | eric 25-Jun-1997 |