INSTALL revision 1.1 1 1.1 christos Check the CC and CFLAGS lines in the makefile
2 1.1 christos
3 1.1 christos If your C library does not support the times(3) function, change the
4 1.1 christos #define TIMES to
5 1.1 christos #undef TIMES in speed.c
6 1.1 christos If it does, check the HZ value for the times(3) function.
7 1.1 christos If your system does not define CLK_TCK it will be assumed to
8 1.1 christos be 100.0.
9 1.1 christos
10 1.1 christos If possible use gcc v 2.7.?
11 1.1 christos Turn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc)
12 1.1 christos In recent times, some system compilers give better performace.
13 1.1 christos
14 1.1 christos type 'make'
15 1.1 christos
16 1.1 christos run './destest' to check things are ok.
17 1.1 christos run './rpw' to check the tty code for reading passwords works.
18 1.1 christos run './speed' to see how fast those optimisations make the library run :-)
19 1.1 christos run './des_opts' to determin the best compile time options.
20 1.1 christos
21 1.1 christos The output from des_opts should be put in the makefile options and des_enc.c
22 1.1 christos should be rebuilt. For 64 bit computers, do not use the DES_PTR option.
23 1.1 christos For the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int'
24 1.1 christos and then you can use the 'DES_PTR' option.
25 1.1 christos
26 1.1 christos The file options.txt has the options listed for best speed on quite a
27 1.1 christos few systems. Look and the options (UNROLL, PTR, RISC2 etc) and then
28 1.1 christos turn on the relevent option in the Makefile
29 1.1 christos
30 1.1 christos There are some special Makefile targets that make life easier.
31 1.1 christos make cc - standard cc build
32 1.1 christos make gcc - standard gcc build
33 1.1 christos make x86-elf - x86 assembler (elf), linux-elf.
34 1.1 christos make x86-out - x86 assembler (a.out), FreeBSD
35 1.1 christos make x86-solaris- x86 assembler
36 1.1 christos make x86-bsdi - x86 assembler (a.out with primative assembler).
37 1.1 christos
38 1.1 christos If at all possible use the assembler (for Windows NT/95, use
39 1.1 christos asm/win32.obj to link with). The x86 assembler is very very fast.
40 1.1 christos
41 1.1 christos A make install will by default install
42 1.1 christos libdes.a in /usr/local/lib/libdes.a
43 1.1 christos des in /usr/local/bin/des
44 1.1 christos des_crypt.man in /usr/local/man/man3/des_crypt.3
45 1.1 christos des.man in /usr/local/man/man1/des.1
46 1.1 christos des.h in /usr/include/des.h
47 1.1 christos
48 1.1 christos des(1) should be compatible with sunOS's but I have been unable to
49 1.1 christos test it.
50 1.1 christos
51 1.1 christos These routines should compile on MSDOS, most 32bit and 64bit version
52 1.1 christos of Unix (BSD and SYSV) and VMS, without modification.
53 1.1 christos The only problems should be #include files that are in the wrong places.
54 1.1 christos
55 1.1 christos These routines can be compiled under MSDOS.
56 1.1 christos I have successfully encrypted files using des(1) under MSDOS and then
57 1.1 christos decrypted the files on a SparcStation.
58 1.1 christos I have been able to compile and test the routines with
59 1.1 christos Microsoft C v 5.1 and Turbo C v 2.0.
60 1.1 christos The code in this library is in no way optimised for the 16bit
61 1.1 christos operation of MSDOS.
62 1.1 christos
63 1.1 christos When building for glibc, ignore all of the above and just unpack into
64 1.1 christos glibc-1.??/des and then gmake as per normal.
65 1.1 christos
66 1.1 christos As a final note on performace. Certain CPUs like sparcs and Alpha often give
67 1.1 christos a %10 speed difference depending on the link order. It is rather anoying
68 1.1 christos when one program reports 'x' DES encrypts a second and another reports
69 1.1 christos 'x*0.9' the speed.
70