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 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
53 # MFUNC - Make all Malloc/Free/Realloc calls call
54 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
55 # call application defined callbacks via CRYPTO_set_mem_functions()
60 #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized
61 PEX_LIBS= -L. -L.. -L../.. -L../../..
63 #EX_LIBS= #-lRSAglue -lrsaref -lnsl -lsocket
66 # Set BN_MULW to bn_mulw.o if you want to use the C version
67 #BN_MULW= asm/x86-lnx.o
69 #BN_MULW= asm/x86-lnx.o # elf
70 #BN_MULW= asm/x86-sol.o # solaris
71 #BN_MULW= asm/x86-lnxa.o # a.out, FreeBSD
72 #BN_MULW= asm/x86-bsdi.o # bsdi
73 #BN_MULW= asm/alpha.o # DEC Alpha
74 #BN_MULW= asm/pa-risc2.o # HP-UX PA-RISC
75 #BN_MULW= asm/r3000.o # SGI MIPS cpu
76 #BN_MULW= asm/sparc.o # Sun solaris/SunOS
77 #BN_MULW= asm/x86nt32.o # Windows 95/NT
78 #BN_MULW= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
79 #BN_MULW= asm/x86w32.o # 32 bit code for Windows 3.1
81 # Set DES_ENC to des_enc.o if you want to use the C version
82 #There are 4 x86 assember options.
83 DES_ENC= des_enc.o fcrypt_b.o
84 #DES_ENC= des_enc.o fcrypt_b.o # C
85 #DES_ENC= asm/dx86-elf.o asm/cx86-elf.o # elf
86 #DES_ENC= asm/dx86-sol.o asm/cx86-sol.o # solaris
87 #DES_ENC= asm/dx86-out.o asm/cx86-out.o # a.out, FreeBSD
88 #DES_ENC= asm/dx86bsdi.o asm/cx86bsdi.o # bsdi
90 # Set BF_ENC to bf_enc.o if you want to use the C version
91 #There are 4 x86 assember options.
94 #BF_ENC= asm/bx86-elf.o # elf
95 #BF_ENC= asm/bx86-sol.o # solaris
96 #BF_ENC= asm/bx86-out.o # a.out, FreeBSD
97 #BF_ENC= asm/bx86bsdi.o # bsdi
99 DIRS= crypto ssl rsaref apps test tools
100 # dirs in crypto to build
102 md sha mdc2 des rc4 rc2 idea bf bn rsa dsa dh \
103 buffer bio stack lhash rand err objects \
104 evp pem asn1 x509 conf txt_db pkcs7
106 # If you change the INSTALLTOP, make sure to also change the values
107 # in crypto/location.h
108 INSTALLTOP=/usr/local/ssl
110 MAKEFILE= Makefile.ssl
111 MAKE= make -f Makefile.ssl
119 EDIRS= times doc bugs util include certs ms shlib mt demos
120 MISC= COPYRIGHT Configure HISTORY.066 INSTALL Makefile.ssl Makefile \
121 README TODO HISTORY README.066 README.080 \
122 VERSION PROBLEMS MINFO makefile.one e_os.h \
123 MICROSOFT makevms.com
125 LIBS= libcrypto.a libssl.a
129 NAME= $(BASENAME)-$(VERSION)
131 WTARFILE= $(NAME)-win.tar
138 (cd $$i; echo "making $$i..."; \
139 $(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}' SDIRS='${SDIRS}' AR='${AR}' all ); \
145 (cd $$i; echo "making $$i..."; \
146 $(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}' AR='${AR}' all ); \
150 /bin/rm -f *.o core a.out fluff *.map
153 (cd $$i; echo "cleaning $$i..."; \
154 $(MAKE) SDIRS='${SDIRS}' clean ); \
155 /bin/rm -f $(LIBS); \
157 /bin/rm -f *.a *.o speed.* *.map *.so .pure core
158 /bin/rm -f $(TARFILE)
159 @for i in $(ONEDIRS) ;\
165 perl util/mk1mf.pl >makefile.one; \
169 perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
172 (cd $$i; echo "making 'files' in $$i..."; \
173 $(MAKE) SDIRS='${SDIRS}' files ); \
178 ./util/point.sh Makefile.ssl Makefile;
181 (cd $$i; echo "making links in $$i..."; \
182 $(MAKE) SDIRS='${SDIRS}' links ); \
184 # @(cd apps; sh ./mklinks)
185 sh tools/c_rehash certs
191 (cd $$i; echo "undoing makedepend in $$i..."; \
192 $(MAKE) SDIRS='${SDIRS}' dclean ); \
196 @(PATH="`pwd`/apps:${PATH}"; sh tools/c_rehash certs)
201 (cd test; echo "testing $$i..."; \
202 $(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}' SDIRS='${SDIRS}' AR='${AR}' tests );
203 @apps/ssleay version -a
208 (cd $$i; echo "making dependancies $$i..."; \
209 $(MAKE) SDIRS='${SDIRS}' depend ); \
215 (cd $$i; echo "making lint $$i..."; \
216 $(MAKE) SDIRS='${SDIRS}' lint ); \
222 (cd $$i; echo "making tags $$i..."; \
223 $(MAKE) SDIRS='${SDIRS}' tags ); \
229 (cd $$i; echo "making errors in $$i..."; \
230 $(MAKE) SDIRS='${SDIRS}' errors ); \
235 mv $(BASENAME) $(NAME); \
237 for i in $(MISC) $(DIRS) $(EDIRS) $(ONEDIRS) ;\
239 STUFF="$$STUFF $(NAME)/$$i"; \
241 tar cf $(NAME)/$(TARFILE) $$STUFF; \
242 mv $(NAME) $(BASENAME) )
248 @$(MAKE) SDIRS='${SDIRS}' clean
249 @$(MAKE) SDIRS='${SDIRS}' dclean
250 @(cd apps; sh ./rmlinks)
251 @$(MAKE) makefile.one
255 (cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
258 @-mkdir -p $(INSTALLTOP)/bin 2>/dev/null
259 @-mkdir -p $(INSTALLTOP)/lib 2>/dev/null
260 @-mkdir -p $(INSTALLTOP)/include 2>/dev/null
261 @-mkdir -p $(INSTALLTOP)/certs 2>/dev/null
262 @-mkdir -p $(INSTALLTOP)/private 2>/dev/null
265 (cd $$i; echo "installing $$i..."; \
266 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \
270 ( echo installing $$i; \
271 cp $$i $(INSTALLTOP)/lib; \
272 sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \
273 chmod 644 $(INSTALLTOP)/lib/$$i ); \
276 # DO NOT DELETE THIS LINE -- make depend depends on it.