10Sstevel@tonic-gateCheck the CC and CFLAGS lines in the makefile 20Sstevel@tonic-gate 30Sstevel@tonic-gateIf your C library does not support the times(3) function, change the 40Sstevel@tonic-gate#define TIMES to 50Sstevel@tonic-gate#undef TIMES in speed.c 60Sstevel@tonic-gateIf it does, check the HZ value for the times(3) function. 70Sstevel@tonic-gateIf your system does not define CLK_TCK it will be assumed to 80Sstevel@tonic-gatebe 100.0. 90Sstevel@tonic-gate 100Sstevel@tonic-gateIf possible use gcc v 2.7.? 110Sstevel@tonic-gateTurn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc) 120Sstevel@tonic-gateIn recent times, some system compilers give better performace. 130Sstevel@tonic-gate 140Sstevel@tonic-gatetype 'make' 150Sstevel@tonic-gate 160Sstevel@tonic-gaterun './destest' to check things are ok. 170Sstevel@tonic-gaterun './rpw' to check the tty code for reading passwords works. 180Sstevel@tonic-gaterun './speed' to see how fast those optimisations make the library run :-) 190Sstevel@tonic-gaterun './des_opts' to determin the best compile time options. 200Sstevel@tonic-gate 210Sstevel@tonic-gateThe output from des_opts should be put in the makefile options and des_enc.c 220Sstevel@tonic-gateshould be rebuilt. For 64 bit computers, do not use the DES_PTR option. 230Sstevel@tonic-gateFor the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int' 240Sstevel@tonic-gateand then you can use the 'DES_PTR' option. 250Sstevel@tonic-gate 260Sstevel@tonic-gateThe file options.txt has the options listed for best speed on quite a 270Sstevel@tonic-gatefew systems. Look and the options (UNROLL, PTR, RISC2 etc) and then 28*3517Smp204432turn on the relevant option in the Makefile 290Sstevel@tonic-gate 300Sstevel@tonic-gateThere are some special Makefile targets that make life easier. 310Sstevel@tonic-gatemake cc - standard cc build 320Sstevel@tonic-gatemake gcc - standard gcc build 330Sstevel@tonic-gatemake x86-elf - x86 assembler (elf), linux-elf. 340Sstevel@tonic-gatemake x86-out - x86 assembler (a.out), FreeBSD 350Sstevel@tonic-gatemake x86-solaris- x86 assembler 360Sstevel@tonic-gatemake x86-bsdi - x86 assembler (a.out with primative assembler). 370Sstevel@tonic-gate 380Sstevel@tonic-gateIf at all possible use the assembler (for Windows NT/95, use 390Sstevel@tonic-gateasm/win32.obj to link with). The x86 assembler is very very fast. 400Sstevel@tonic-gate 410Sstevel@tonic-gateA make install will by default install 420Sstevel@tonic-gatelibdes.a in /usr/local/lib/libdes.a 430Sstevel@tonic-gatedes in /usr/local/bin/des 440Sstevel@tonic-gatedes_crypt.man in /usr/local/man/man3/des_crypt.3 450Sstevel@tonic-gatedes.man in /usr/local/man/man1/des.1 460Sstevel@tonic-gatedes.h in /usr/include/des.h 470Sstevel@tonic-gate 480Sstevel@tonic-gatedes(1) should be compatible with sunOS's but I have been unable to 490Sstevel@tonic-gatetest it. 500Sstevel@tonic-gate 510Sstevel@tonic-gateThese routines should compile on MSDOS, most 32bit and 64bit version 520Sstevel@tonic-gateof Unix (BSD and SYSV) and VMS, without modification. 530Sstevel@tonic-gateThe only problems should be #include files that are in the wrong places. 540Sstevel@tonic-gate 550Sstevel@tonic-gateThese routines can be compiled under MSDOS. 560Sstevel@tonic-gateI have successfully encrypted files using des(1) under MSDOS and then 570Sstevel@tonic-gatedecrypted the files on a SparcStation. 580Sstevel@tonic-gateI have been able to compile and test the routines with 590Sstevel@tonic-gateMicrosoft C v 5.1 and Turbo C v 2.0. 600Sstevel@tonic-gateThe code in this library is in no way optimised for the 16bit 610Sstevel@tonic-gateoperation of MSDOS. 620Sstevel@tonic-gate 630Sstevel@tonic-gateWhen building for glibc, ignore all of the above and just unpack into 640Sstevel@tonic-gateglibc-1.??/des and then gmake as per normal. 650Sstevel@tonic-gate 660Sstevel@tonic-gateAs a final note on performace. Certain CPUs like sparcs and Alpha often give 670Sstevel@tonic-gatea %10 speed difference depending on the link order. It is rather anoying 680Sstevel@tonic-gatewhen one program reports 'x' DES encrypts a second and another reports 690Sstevel@tonic-gate'x*0.9' the speed. 70