2 # Makefile for all the SSL related library routines and utilities
5 # make install will install:
6 # libraries into $INSTALLTOP/lib
7 # headers into $INSTALLTOP/include
8 # utilities into $INSTALLTOP/bin
10 # By default INSTALLTOP is set to /usr/local/ssl
11 # If you want things install elsewere, consider running
12 # perl util/ssldir.pl /new/path
14 # Interesting Mailing Lists:
15 # ssl-bugs@mincom.oz.au
16 # ssl-users@mincom.oz.au
18 # To join the Mailing Lists:
19 # ssl-bugs-request@mincom.oz.au
20 # ssl-users-request@mincom.oz.au
22 # If you must get hold of people directly (we much prefer the above
23 # lists to be used if the question is of general interest!):
24 # Eric Young <eay@cryptsoft.com>
25 # Tim Hudson <tjh@cryptsoft.com>
26 # or both <ssleay@cryptsoft.com>
28 # The primary distribution of SSLeay is from
29 # ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL
31 # NOCONST - Define for C compilers that don't like the const key word.
32 # NOPROTO - Define in if your compiler does not support prototypes.
33 # RSAref - Define if we are to link with RSAref.
34 # NO_IDEA - Define to build without the IDEA algorithm
35 # NO_RC4 - Define to build without the RC4 algorithm
36 # NO_RC2 - Define to build without the RC2 algorithm
37 # THREADS - Define when building with threads, you will probably also need any
38 # system defines as well, i.e. _REENTERANT for Solaris 2.[34]
39 # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
40 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
41 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
42 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
43 # one. 32 bytes will be read from this when the random
44 # number generator is initalised.
45 # SSL_ALLOW_ADH - define if you want the server to be able to use the
46 # SSLv3 anon-DH ciphers.
47 # SSL_ALLOW_ENULL - define if you want the server to be able to use the
48 # NULL encryption ciphers.
50 # LOCK_DEBUG - turns on lots of lock debug output :-)
51 # REF_CHECK - turn on some xyz_free() assertions.
52 # REF_PRINT - prints some stuff on structure free.
53 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
54 # MFUNC - Make all Malloc/Free/Realloc calls call
55 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
56 # call application defined callbacks via CRYPTO_set_mem_functions()
57 # MD5_ASM needs to be defined to use the x86 assembler for MD5
58 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
59 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
63 #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DMD5_ASM -DSHA1_ASM -DRMD160_ASM
65 PEX_LIBS= -L. -L.. -L../.. -L../../..
69 # Set BN_MULW to bn_mulw.o if you want to use the C version
72 #BN_MULW= asm/bn86-elf.o # elf, linux-elf
73 #BN_MULW= asm/bn86-sol.o # solaris
74 #BN_MULW= asm/bn86-out.o # a.out, FreeBSD
75 #BN_MULW= asm/bn86bsdi.o # bsdi
76 #BN_MULW= asm/alpha.o # DEC Alpha
77 #BN_MULW= asm/pa-risc2.o # HP-UX PA-RISC
78 #BN_MULW= asm/r3000.o # SGI MIPS cpu
79 #BN_MULW= asm/sparc.o # Sun solaris/SunOS
80 #BN_MULW= asm/bn-win32.o # Windows 95/NT
81 #BN_MULW= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
82 #BN_MULW= asm/x86w32.o # 32 bit code for Windows 3.1
84 # Set DES_ENC to des_enc.o if you want to use the C version
85 #There are 4 x86 assember options.
86 DES_ENC= des_enc.o fcrypt_b.o
87 #DES_ENC= des_enc.o fcrypt_b.o # C
88 #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
89 #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
90 #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
91 #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
93 # Set BF_ENC to bf_enc.o if you want to use the C version
94 #There are 4 x86 assember options.
97 #BF_ENC= asm/bx86-elf.o # elf
98 #BF_ENC= asm/bx86-sol.o # solaris
99 #BF_ENC= asm/bx86-out.o # a.out, FreeBSD
100 #BF_ENC= asm/bx86bsdi.o # bsdi
102 # Set CAST_ENC to c_enc.o if you want to use the C version
103 #There are 4 x86 assember options.
106 #CAST_ENC= asm/cx86-elf.o # elf
107 #CAST_ENC= asm/cx86-sol.o # solaris
108 #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
109 #CAST_ENC= asm/cx86bsdi.o # bsdi
111 # Set RC4_ENC to rc4_enc.o if you want to use the C version
112 #There are 4 x86 assember options.
115 #RC4_ENC= asm/rx86-elf.o # elf
116 #RC4_ENC= asm/rx86-sol.o # solaris
117 #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
118 #RC4_ENC= asm/rx86bsdi.o # bsdi
120 # Set RC5_ENC to rc5_enc.o if you want to use the C version
121 #There are 4 x86 assember options.
124 #RC5_ENC= asm/r586-elf.o # elf
125 #RC5_ENC= asm/r586-sol.o # solaris
126 #RC5_ENC= asm/r586-out.o # a.out, FreeBSD
127 #RC5_ENC= asm/r586bsdi.o # bsdi
129 # Also need MD5_ASM defined
131 #MD5_ASM_OBJ= asm/mx86-elf.o # elf
132 #MD5_ASM_OBJ= asm/mx86-sol.o # solaris
133 #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
134 #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
136 # Also need SHA1_ASM defined
138 #SHA1_ASM_OBJ= asm/sx86-elf.o # elf
139 #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
140 #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
141 #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
143 # Also need RMD160_ASM defined
145 #RMD160_ASM_OBJ= asm/rm86-elf.o # elf
146 #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
147 #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
148 #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
150 DIRS= crypto ssl rsaref apps test tools
151 # dirs in crypto to build
153 md2 md5 sha mdc2 hmac ripemd \
154 des rc2 rc4 rc5 idea bf cast \
156 buffer bio stack lhash rand err objects \
157 evp pem asn1 x509 conf txt_db pkcs7
159 # If you change the INSTALLTOP, make sure to also change the values
160 # in crypto/location.h
161 INSTALLTOP=/usr/local/ssl
163 MAKEFILE= Makefile.ssl
164 MAKE= make -f Makefile.ssl
172 EDIRS= times doc bugs util include certs ms shlib mt demos perl dep
173 MISC= COPYRIGHT Configure HISTORY.066 INSTALL Makefile.ssl Makefile \
174 README TODO HISTORY README.066 README.080 README.090 \
175 VERSION PROBLEMS MINFO makefile.one e_os.h \
176 MICROSOFT makevms.com config PATENTS
178 LIBS= libcrypto.a libssl.a
182 NAME= $(BASENAME)-$(VERSION)
184 WTARFILE= $(NAME)-win.tar
191 (cd $$i; echo "making $$i..."; \
192 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' all ); \
198 (cd $$i; echo "making $$i..."; \
199 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' all ); \
203 /bin/rm -f shlib/*.o *.o core a.out fluff *.map
206 (cd $$i; echo "cleaning $$i..."; \
207 $(MAKE) SDIRS='${SDIRS}' clean ); \
208 /bin/rm -f $(LIBS); \
210 /bin/rm -f *.a *.o speed.* *.map *.so .pure core
211 /bin/rm -f $(TARFILE)
212 @for i in $(ONEDIRS) ;\
218 perl util/mk1mf.pl >makefile.one; \
222 perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
225 (cd $$i; echo "making 'files' in $$i..."; \
226 $(MAKE) SDIRS='${SDIRS}' files ); \
231 ./util/point.sh Makefile.ssl Makefile;
232 $(TOP)/util/mklink.sh include $(EXHEADER) ;
235 (cd $$i; echo "making links in $$i..."; \
236 $(MAKE) SDIRS='${SDIRS}' links ); \
238 # @(cd apps; sh ./mklinks)
239 @( SSLEAY="`pwd`/apps/ssleay"; export SSLEAY; sh tools/c_rehash certs )
245 (cd $$i; echo "undoing makedepend in $$i..."; \
246 $(MAKE) SDIRS='${SDIRS}' dclean ); \
250 @(PATH="`pwd`/apps:${PATH}"; sh tools/c_rehash certs)
255 (cd test; echo "testing $$i..."; \
256 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests );
257 @apps/ssleay version -a
262 (cd $$i; echo "making dependancies $$i..."; \
263 $(MAKE) SDIRS='${SDIRS}' depend ); \
269 (cd $$i; echo "making lint $$i..."; \
270 $(MAKE) SDIRS='${SDIRS}' lint ); \
276 (cd $$i; echo "making tags $$i..."; \
277 $(MAKE) SDIRS='${SDIRS}' tags ); \
283 (cd $$i; echo "making errors in $$i..."; \
284 $(MAKE) SDIRS='${SDIRS}' errors ); \
289 mv $(BASENAME) $(NAME); \
291 for i in $(MISC) $(DIRS) $(EDIRS) $(ONEDIRS) ;\
293 STUFF="$$STUFF $(NAME)/$$i"; \
295 tar cf $(NAME)/$(TARFILE) $$STUFF; \
296 mv $(NAME) $(BASENAME) )
301 perl util/up_ver.pl ${VERSION}
303 @$(MAKE) SDIRS='${SDIRS}' clean
304 @$(MAKE) SDIRS='${SDIRS}' dclean
305 @(cd apps; sh ./rmlinks)
306 @$(MAKE) makefile.one
310 (cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
313 @-mkdir -p $(INSTALLTOP)/bin 2>/dev/null
314 @-mkdir -p $(INSTALLTOP)/lib 2>/dev/null
315 @-mkdir -p $(INSTALLTOP)/include 2>/dev/null
316 @-mkdir -p $(INSTALLTOP)/certs 2>/dev/null
317 @-mkdir -p $(INSTALLTOP)/private 2>/dev/null
320 (cd $$i; echo "installing $$i..."; \
321 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \
325 ( echo installing $$i; \
326 cp $$i $(INSTALLTOP)/lib; \
327 sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \
328 chmod 644 $(INSTALLTOP)/lib/$$i ); \
331 # DO NOT DELETE THIS LINE -- make depend depends on it.