]>
Commit | Line | Data |
---|---|---|
d02b48c6 RE |
1 | # |
2 | # Makefile for all the SSL related library routines and utilities | |
3 | VERSION = 0.8.1a | |
4 | # | |
5 | # make install will install: | |
6 | # libraries into $INSTALLTOP/lib | |
7 | # headers into $INSTALLTOP/include | |
8 | # utilities into $INSTALLTOP/bin | |
9 | # | |
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 | |
13 | # | |
14 | # Interesting Mailing Lists: | |
15 | # ssl-bugs@mincom.oz.au | |
16 | # ssl-users@mincom.oz.au | |
17 | # | |
18 | # To join the Mailing Lists: | |
19 | # ssl-bugs-request@mincom.oz.au | |
20 | # ssl-users-request@mincom.oz.au | |
21 | # | |
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> | |
27 | # | |
28 | # The primary distribution of SSLeay is from | |
29 | # ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL | |
30 | # | |
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. | |
49 | # | |
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() | |
56 | ||
57 | ||
58 | CC= cc | |
59 | CFLAG= -O -DNOPROTO | |
60 | #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized | |
61 | PEX_LIBS= -L. -L.. -L../.. -L../../.. | |
62 | EX_LIBS= | |
63 | #EX_LIBS= #-lRSAglue -lrsaref -lnsl -lsocket | |
64 | AR=ar r | |
65 | ||
66 | # Set BN_MULW to bn_mulw.o if you want to use the C version | |
67 | #BN_MULW= asm/x86-lnx.o | |
68 | BN_MULW= bn_mulw.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 | |
80 | ||
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 | |
89 | ||
90 | # Set BF_ENC to bf_enc.o if you want to use the C version | |
91 | #There are 4 x86 assember options. | |
92 | BF_ENC= bf_enc.o | |
93 | #BF_ENC= bf_enc.o # C | |
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 | |
98 | ||
99 | DIRS= crypto ssl rsaref apps test tools | |
100 | # dirs in crypto to build | |
101 | SDIRS= \ | |
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 | |
105 | ||
106 | # If you change the INSTALLTOP, make sure to also change the values | |
107 | # in crypto/location.h | |
108 | INSTALLTOP=/usr/local/ssl | |
109 | ||
110 | MAKEFILE= Makefile.ssl | |
111 | MAKE= make -f Makefile.ssl | |
112 | ||
113 | MAN1=1 | |
114 | MAN3=3 | |
115 | SHELL=/bin/sh | |
116 | ||
117 | TOP= . | |
118 | ONEDIRS=out tmp | |
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 | |
124 | WDIRS= windows | |
125 | LIBS= libcrypto.a libssl.a | |
126 | ||
127 | GENERAL= Makefile | |
128 | BASENAME= SSLeay | |
129 | NAME= $(BASENAME)-$(VERSION) | |
130 | TARFILE= $(NAME).tar | |
131 | WTARFILE= $(NAME)-win.tar | |
132 | EX_HEADER= | |
133 | HEADER= e_os.h | |
134 | ||
135 | all: | |
136 | @for i in $(DIRS) ;\ | |
137 | do \ | |
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 ); \ | |
140 | done; | |
141 | ||
142 | sub_all: | |
143 | @for i in $(DIRS) ;\ | |
144 | do \ | |
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 ); \ | |
147 | done; | |
148 | ||
149 | clean: | |
150 | /bin/rm -f *.o core a.out fluff *.map | |
151 | @for i in $(DIRS) ;\ | |
152 | do \ | |
153 | (cd $$i; echo "cleaning $$i..."; \ | |
154 | $(MAKE) SDIRS='${SDIRS}' clean ); \ | |
155 | /bin/rm -f $(LIBS); \ | |
156 | done; | |
157 | /bin/rm -f *.a *.o speed.* *.map *.so .pure core | |
158 | /bin/rm -f $(TARFILE) | |
159 | @for i in $(ONEDIRS) ;\ | |
160 | do \ | |
161 | /bin/rm -f $$i/*; \ | |
162 | done | |
163 | ||
164 | makefile.one: files | |
165 | perl util/mk1mf.pl >makefile.one; \ | |
166 | sh util/do_ms.sh | |
167 | ||
168 | files: MINFO | |
169 | perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO | |
170 | @for i in $(DIRS) ;\ | |
171 | do \ | |
172 | (cd $$i; echo "making 'files' in $$i..."; \ | |
173 | $(MAKE) SDIRS='${SDIRS}' files ); \ | |
174 | done; | |
175 | ||
176 | links: | |
177 | /bin/rm -f Makefile; | |
178 | ./util/point.sh Makefile.ssl Makefile; | |
179 | @for i in $(DIRS) ;\ | |
180 | do \ | |
181 | (cd $$i; echo "making links in $$i..."; \ | |
182 | $(MAKE) SDIRS='${SDIRS}' links ); \ | |
183 | done; | |
184 | # @(cd apps; sh ./mklinks) | |
185 | sh tools/c_rehash certs | |
186 | ||
187 | dclean: | |
188 | /bin/rm -f *.bak | |
189 | @for i in $(DIRS) ;\ | |
190 | do \ | |
191 | (cd $$i; echo "undoing makedepend in $$i..."; \ | |
192 | $(MAKE) SDIRS='${SDIRS}' dclean ); \ | |
193 | done; | |
194 | ||
195 | rehash: | |
196 | @(PATH="`pwd`/apps:${PATH}"; sh tools/c_rehash certs) | |
197 | ||
198 | test: tests | |
199 | ||
200 | tests: | |
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 | |
204 | ||
205 | depend: | |
206 | @for i in $(DIRS) ;\ | |
207 | do \ | |
208 | (cd $$i; echo "making dependancies $$i..."; \ | |
209 | $(MAKE) SDIRS='${SDIRS}' depend ); \ | |
210 | done; | |
211 | ||
212 | lint: | |
213 | @for i in $(DIRS) ;\ | |
214 | do \ | |
215 | (cd $$i; echo "making lint $$i..."; \ | |
216 | $(MAKE) SDIRS='${SDIRS}' lint ); \ | |
217 | done; | |
218 | ||
219 | tags: | |
220 | @for i in $(DIRS) ;\ | |
221 | do \ | |
222 | (cd $$i; echo "making tags $$i..."; \ | |
223 | $(MAKE) SDIRS='${SDIRS}' tags ); \ | |
224 | done; | |
225 | ||
226 | errors: | |
227 | @for i in $(DIRS) ;\ | |
228 | do \ | |
229 | (cd $$i; echo "making errors in $$i..."; \ | |
230 | $(MAKE) SDIRS='${SDIRS}' errors ); \ | |
231 | done; | |
232 | ||
233 | tar: | |
234 | @(cd ..;\ | |
235 | mv $(BASENAME) $(NAME); \ | |
236 | export STUFF; \ | |
237 | for i in $(MISC) $(DIRS) $(EDIRS) $(ONEDIRS) ;\ | |
238 | do \ | |
239 | STUFF="$$STUFF $(NAME)/$$i"; \ | |
240 | done; \ | |
241 | tar cf $(NAME)/$(TARFILE) $$STUFF; \ | |
242 | mv $(NAME) $(BASENAME) ) | |
243 | gzip -f $(TARFILE) | |
244 | ||
245 | dist: | |
246 | perl Configure dist | |
247 | @$(MAKE) dist_pem_h | |
248 | @$(MAKE) SDIRS='${SDIRS}' clean | |
249 | @$(MAKE) SDIRS='${SDIRS}' dclean | |
250 | @(cd apps; sh ./rmlinks) | |
251 | @$(MAKE) makefile.one | |
252 | @$(MAKE) tar | |
253 | ||
254 | dist_pem_h: | |
255 | (cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) | |
256 | ||
257 | install: all | |
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 | |
263 | @for i in $(DIRS) ;\ | |
264 | do \ | |
265 | (cd $$i; echo "installing $$i..."; \ | |
266 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \ | |
267 | done | |
268 | @for i in $(LIBS) ;\ | |
269 | do \ | |
270 | ( echo installing $$i; \ | |
271 | cp $$i $(INSTALLTOP)/lib; \ | |
272 | sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \ | |
273 | chmod 644 $(INSTALLTOP)/lib/$$i ); \ | |
274 | done | |
275 | ||
276 | # DO NOT DELETE THIS LINE -- make depend depends on it. |