summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc/why.doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/doc/why.doc')
-rw-r--r--src/lib/libssl/src/doc/why.doc79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/lib/libssl/src/doc/why.doc b/src/lib/libssl/src/doc/why.doc
new file mode 100644
index 0000000000..a1ac84bd27
--- /dev/null
+++ b/src/lib/libssl/src/doc/why.doc
@@ -0,0 +1,79 @@
1This file is more of a note for other people who wish to understand why
2the build environment is the way it is :-).
3
4The include files 'depend' as follows.
5Each of
6crypto/*/*.c includes crypto/cryptlib.h
7ssl/*.c include ssl/ssl_locl.h
8apps/*.c include apps/apps.h
9crypto/cryptlib.h, ssl/ssl_locl.h and apps/apps.h
10all include e_os.h which contains OS/environment specific information.
11If you need to add something todo with a particular environment,
12add it to this file. It is worth remembering that quite a few libraries,
13like lhash, des, md, sha etc etc do not include crypto/cryptlib.h. This
14is because these libraries should be 'independantly compilable' and so I
15try to keep them this way.
16e_os.h is not so much a part of SSLeay, as the placing in one spot all the
17evil OS dependant muck.
18
19I wanted to automate as many things as possible. This includes
20error number generation. A
21make errors
22will scan the source files for error codes, append them to the correct
23header files, and generate the functions to print the text version
24of the error numbers. So don't even think about adding error numbers by
25hand, put them in the form
26XXXerr(XXXX_F_XXXX,YYYY_R_YYYY);
27on line and it will be automatically picked up my a make errors.
28
29In a similar vein, programs to be added into ssleay in the apps directory
30just need to have an entry added to E_EXE in makefile.ssl and
31everthing will work as expected. Don't edit progs.h by hand.
32
33make links re-generates the symbolic links that are used. The reason why
34I keep everything in its own directory, and don't put all the
35test programs and header files in 'test' and 'include' is because I want
36to keep the 'sub-libraries' independant. I still 'pull' out
37indervidual libraries for use in specific projects where the code is
38required. I have used the 'lhash' library in just about every software
39project I have worked on :-).
40
41make depend generates dependancies and
42make dclean removes them.
43
44You will notice that I use perl quite a bit when I could be using 'sed'.
45The reason I decided to do this was to just stick to one 'extra' program.
46For Windows NT, I have perl and no sed.
47
48The util/mk1mf.pl program can be used to generate a single makefile.
49I use this because makefiles under Microsoft are horrific.
50Each C compiler seems to have different linker formats, which have
51to be used because the retarted C compilers explode when you do
52cl -o file *.o.
53
54Now some would argue that I should just use the single makefile. I don't
55like it during develoment for 2 reasons. First, the actuall make
56command takes a long time. For my current setup, if I'm in
57crypto/bn and I type make, only the crypto/bn directory gets rebuilt,
58which is nice when you are modifying prototypes in bn.h which
59half the SSLeay depends on. The second is that to add a new souce file
60I just plonk it in at the required spot in the local makefile. This
61then alows me to keep things local, I don't need to modify a 'global'
62tables (the make for unix, the make for NT, the make for w31...).
63When I am ripping apart a library structure, it is nice to only
64have to worry about one directory :-).
65
66Having said all this, for the hell of it I put together 2 files that
67#include all the souce code (generated by doing a ls */*.o after a build).
68crypto.c takes only 30 seconds to build under NT and 2 minutes under linux
69for my pentium100. Much faster that the normal build :-).
70Again, the problem is that when using libraries, every program linked
71to libcrypto.a would suddenly get 330k of library when it may only need
721k. This technique does look like a nice way to do shared libraries though.
73
74Oh yes, as a final note, to 'build' a distribution, I just type
75make dist.
76This cleans and packages everything. The directory needs to be called
77SSLeay since the make does a 'cd ..' and renames and tars things up.
78
79