]>
Commit | Line | Data |
---|---|---|
d02b48c6 RE |
1 | # |
2 | # Makefile for all the SSL related library routines and utilities | |
651d0aff | 3 | VERSION = 0.9.1c |
8d7ed6ff | 4 | PLATFORM=FreeBSD |
d02b48c6 RE |
5 | # |
6 | # make install will install: | |
7 | # libraries into $INSTALLTOP/lib | |
8 | # headers into $INSTALLTOP/include | |
9 | # utilities into $INSTALLTOP/bin | |
10 | # | |
11 | # By default INSTALLTOP is set to /usr/local/ssl | |
12 | # If you want things install elsewere, consider running | |
13 | # perl util/ssldir.pl /new/path | |
14 | # | |
15 | # Interesting Mailing Lists: | |
16 | # ssl-bugs@mincom.oz.au | |
17 | # ssl-users@mincom.oz.au | |
18 | # | |
19 | # To join the Mailing Lists: | |
20 | # ssl-bugs-request@mincom.oz.au | |
21 | # ssl-users-request@mincom.oz.au | |
22 | # | |
23 | # If you must get hold of people directly (we much prefer the above | |
24 | # lists to be used if the question is of general interest!): | |
58964a49 RE |
25 | # Eric Young <eay@cryptsoft.com> |
26 | # Tim Hudson <tjh@cryptsoft.com> | |
27 | # or both <ssleay@cryptsoft.com> | |
d02b48c6 RE |
28 | # |
29 | # The primary distribution of SSLeay is from | |
30 | # ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL | |
31 | # | |
32 | # NOCONST - Define for C compilers that don't like the const key word. | |
33 | # NOPROTO - Define in if your compiler does not support prototypes. | |
34 | # RSAref - Define if we are to link with RSAref. | |
35 | # NO_IDEA - Define to build without the IDEA algorithm | |
36 | # NO_RC4 - Define to build without the RC4 algorithm | |
37 | # NO_RC2 - Define to build without the RC2 algorithm | |
38 | # THREADS - Define when building with threads, you will probably also need any | |
58964a49 | 39 | # system defines as well, i.e. _REENTERANT for Solaris 2.[34] |
d02b48c6 RE |
40 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. |
41 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. | |
42 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). | |
43 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports | |
58964a49 RE |
44 | # one. 32 bytes will be read from this when the random |
45 | # number generator is initalised. | |
d02b48c6 | 46 | # SSL_ALLOW_ADH - define if you want the server to be able to use the |
58964a49 | 47 | # SSLv3 anon-DH ciphers. |
d02b48c6 | 48 | # SSL_ALLOW_ENULL - define if you want the server to be able to use the |
58964a49 | 49 | # NULL encryption ciphers. |
d02b48c6 RE |
50 | # |
51 | # LOCK_DEBUG - turns on lots of lock debug output :-) | |
52 | # REF_CHECK - turn on some xyz_free() assertions. | |
58964a49 | 53 | # REF_PRINT - prints some stuff on structure free. |
d02b48c6 RE |
54 | # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff |
55 | # MFUNC - Make all Malloc/Free/Realloc calls call | |
58964a49 RE |
56 | # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to |
57 | # call application defined callbacks via CRYPTO_set_mem_functions() | |
58 | # MD5_ASM needs to be defined to use the x86 assembler for MD5 | |
59 | # SHA1_ASM needs to be defined to use the x86 assembler for SHA1 | |
60 | # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 | |
dfeab068 RE |
61 | # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must |
62 | # equal 4. | |
63 | # PKCS1_CHECK - pkcs1 tests. | |
d02b48c6 | 64 | |
8d7ed6ff | 65 | CC= gcc |
dfeab068 | 66 | #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM |
8d7ed6ff | 67 | CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM |
d02b48c6 | 68 | PEX_LIBS= -L. -L.. -L../.. -L../../.. |
651d0aff | 69 | EX_LIBS= |
d02b48c6 RE |
70 | AR=ar r |
71 | ||
dfeab068 RE |
72 | # Set BN_ASM to bn_asm.o if you want to use the C version |
73 | BN_ASM= bn_asm.o | |
74 | #BN_ASM= bn_asm.o | |
75 | #BN_ASM= asm/bn86-elf.o # elf, linux-elf | |
76 | #BN_ASM= asm/bn86-sol.o # solaris | |
77 | #BN_ASM= asm/bn86-out.o # a.out, FreeBSD | |
78 | #BN_ASM= asm/bn86bsdi.o # bsdi | |
79 | #BN_ASM= asm/alpha.o # DEC Alpha | |
80 | #BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC | |
81 | #BN_ASM= asm/r3000.o # SGI MIPS cpu | |
82 | #BN_ASM= asm/sparc.o # Sun solaris/SunOS | |
83 | #BN_ASM= asm/bn-win32.o # Windows 95/NT | |
84 | #BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS | |
85 | #BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1 | |
d02b48c6 RE |
86 | |
87 | # Set DES_ENC to des_enc.o if you want to use the C version | |
88 | #There are 4 x86 assember options. | |
8d7ed6ff | 89 | DES_ENC= asm/dx86-out.o asm/yx86-out.o |
58964a49 RE |
90 | #DES_ENC= des_enc.o fcrypt_b.o # C |
91 | #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf | |
92 | #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris | |
93 | #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD | |
94 | #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi | |
d02b48c6 RE |
95 | |
96 | # Set BF_ENC to bf_enc.o if you want to use the C version | |
97 | #There are 4 x86 assember options. | |
8d7ed6ff | 98 | BF_ENC= asm/bx86-out.o |
58964a49 | 99 | #BF_ENC= bf_enc.o |
d02b48c6 | 100 | #BF_ENC= asm/bx86-elf.o # elf |
58964a49 RE |
101 | #BF_ENC= asm/bx86-sol.o # solaris |
102 | #BF_ENC= asm/bx86-out.o # a.out, FreeBSD | |
103 | #BF_ENC= asm/bx86bsdi.o # bsdi | |
d02b48c6 | 104 | |
58964a49 RE |
105 | # Set CAST_ENC to c_enc.o if you want to use the C version |
106 | #There are 4 x86 assember options. | |
8d7ed6ff | 107 | CAST_ENC= asm/cx86-out.o |
58964a49 RE |
108 | #CAST_ENC= c_enc.o |
109 | #CAST_ENC= asm/cx86-elf.o # elf | |
110 | #CAST_ENC= asm/cx86-sol.o # solaris | |
111 | #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD | |
112 | #CAST_ENC= asm/cx86bsdi.o # bsdi | |
113 | ||
114 | # Set RC4_ENC to rc4_enc.o if you want to use the C version | |
115 | #There are 4 x86 assember options. | |
8d7ed6ff | 116 | RC4_ENC= asm/rx86-out.o |
58964a49 RE |
117 | #RC4_ENC= rc4_enc.o |
118 | #RC4_ENC= asm/rx86-elf.o # elf | |
119 | #RC4_ENC= asm/rx86-sol.o # solaris | |
120 | #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD | |
121 | #RC4_ENC= asm/rx86bsdi.o # bsdi | |
122 | ||
123 | # Set RC5_ENC to rc5_enc.o if you want to use the C version | |
124 | #There are 4 x86 assember options. | |
8d7ed6ff | 125 | RC5_ENC= asm/r586-out.o |
58964a49 RE |
126 | #RC5_ENC= rc5_enc.o |
127 | #RC5_ENC= asm/r586-elf.o # elf | |
128 | #RC5_ENC= asm/r586-sol.o # solaris | |
129 | #RC5_ENC= asm/r586-out.o # a.out, FreeBSD | |
130 | #RC5_ENC= asm/r586bsdi.o # bsdi | |
131 | ||
132 | # Also need MD5_ASM defined | |
8d7ed6ff | 133 | MD5_ASM_OBJ= asm/mx86-out.o |
58964a49 RE |
134 | #MD5_ASM_OBJ= asm/mx86-elf.o # elf |
135 | #MD5_ASM_OBJ= asm/mx86-sol.o # solaris | |
136 | #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD | |
137 | #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi | |
138 | ||
139 | # Also need SHA1_ASM defined | |
8d7ed6ff | 140 | SHA1_ASM_OBJ= asm/sx86-out.o |
58964a49 RE |
141 | #SHA1_ASM_OBJ= asm/sx86-elf.o # elf |
142 | #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris | |
143 | #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD | |
144 | #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi | |
145 | ||
146 | # Also need RMD160_ASM defined | |
8d7ed6ff | 147 | RMD160_ASM_OBJ= asm/rm86-out.o |
58964a49 RE |
148 | #RMD160_ASM_OBJ= asm/rm86-elf.o # elf |
149 | #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris | |
150 | #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD | |
151 | #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi | |
152 | ||
153 | DIRS= crypto ssl rsaref apps test tools | |
d02b48c6 RE |
154 | # dirs in crypto to build |
155 | SDIRS= \ | |
58964a49 RE |
156 | md2 md5 sha mdc2 hmac ripemd \ |
157 | des rc2 rc4 rc5 idea bf cast \ | |
158 | bn rsa dsa dh \ | |
c54b4ee1 BL |
159 | buffer bio stack lhash rand pem err objects \ |
160 | evp asn1 x509 conf txt_db pkcs7 comp | |
d02b48c6 RE |
161 | |
162 | # If you change the INSTALLTOP, make sure to also change the values | |
163 | # in crypto/location.h | |
164 | INSTALLTOP=/usr/local/ssl | |
165 | ||
166 | MAKEFILE= Makefile.ssl | |
58964a49 | 167 | MAKE= make -f Makefile.ssl |
d02b48c6 RE |
168 | |
169 | MAN1=1 | |
170 | MAN3=3 | |
171 | SHELL=/bin/sh | |
172 | ||
58964a49 | 173 | TOP= . |
d02b48c6 | 174 | ONEDIRS=out tmp |
dfeab068 | 175 | EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep |
58964a49 RE |
176 | WDIRS= windows |
177 | LIBS= libcrypto.a libssl.a | |
178 | ||
179 | GENERAL= Makefile | |
9ce5db45 | 180 | BASENAME= openssl |
58964a49 RE |
181 | NAME= $(BASENAME)-$(VERSION) |
182 | TARFILE= $(NAME).tar | |
183 | WTARFILE= $(NAME)-win.tar | |
184 | EXHEADER= e_os.h | |
185 | HEADER= e_os.h | |
d02b48c6 RE |
186 | |
187 | all: | |
188 | @for i in $(DIRS) ;\ | |
189 | do \ | |
56ee3117 PS |
190 | (cd $$i && echo "making $$i..." && \ |
191 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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 ) || exit 1; \ | |
d02b48c6 RE |
192 | done; |
193 | ||
194 | sub_all: | |
195 | @for i in $(DIRS) ;\ | |
196 | do \ | |
56ee3117 PS |
197 | (cd $$i && echo "making $$i..." && \ |
198 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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 ) || exit 1; \ | |
d02b48c6 RE |
199 | done; |
200 | ||
dfeab068 RE |
201 | libclean: |
202 | /bin/rm *.a */lib */*/lib | |
203 | ||
d02b48c6 | 204 | clean: |
58964a49 | 205 | /bin/rm -f shlib/*.o *.o core a.out fluff *.map |
d02b48c6 RE |
206 | @for i in $(DIRS) ;\ |
207 | do \ | |
56ee3117 PS |
208 | (cd $$i && echo "cleaning $$i..." && \ |
209 | $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \ | |
d02b48c6 RE |
210 | /bin/rm -f $(LIBS); \ |
211 | done; | |
212 | /bin/rm -f *.a *.o speed.* *.map *.so .pure core | |
213 | /bin/rm -f $(TARFILE) | |
214 | @for i in $(ONEDIRS) ;\ | |
215 | do \ | |
58964a49 | 216 | /bin/rm -fr $$i/*; \ |
d02b48c6 RE |
217 | done |
218 | ||
219 | makefile.one: files | |
220 | perl util/mk1mf.pl >makefile.one; \ | |
221 | sh util/do_ms.sh | |
222 | ||
58964a49 | 223 | files: MINFO |
d02b48c6 RE |
224 | perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO |
225 | @for i in $(DIRS) ;\ | |
226 | do \ | |
56ee3117 PS |
227 | (cd $$i && echo "making 'files' in $$i..." && \ |
228 | $(MAKE) SDIRS='${SDIRS}' files ) || exit 1; \ | |
d02b48c6 RE |
229 | done; |
230 | ||
231 | links: | |
13e91dd3 RE |
232 | /bin/rm -f Makefile |
233 | ./util/point.sh Makefile.ssl Makefile | |
234 | $(TOP)/util/mklink.sh include $(EXHEADER) | |
d02b48c6 RE |
235 | @for i in $(DIRS) ;\ |
236 | do \ | |
56ee3117 PS |
237 | (cd $$i && echo "making links in $$i..." && \ |
238 | $(MAKE) SDIRS='${SDIRS}' links ) || exit 1; \ | |
d02b48c6 | 239 | done; |
13e91dd3 | 240 | @(SSLEAY="`pwd`/apps/ssleay"; export SSLEAY; sh tools/c_rehash certs) |
d02b48c6 RE |
241 | |
242 | dclean: | |
243 | /bin/rm -f *.bak | |
244 | @for i in $(DIRS) ;\ | |
245 | do \ | |
56ee3117 PS |
246 | (cd $$i && echo "undoing makedepend in $$i..." && \ |
247 | $(MAKE) SDIRS='${SDIRS}' dclean ) || exit 1; \ | |
d02b48c6 RE |
248 | done; |
249 | ||
250 | rehash: | |
251 | @(PATH="`pwd`/apps:${PATH}"; sh tools/c_rehash certs) | |
252 | ||
58964a49 | 253 | test: tests |
d02b48c6 RE |
254 | |
255 | tests: | |
56ee3117 | 256 | (cd test && echo "testing $$i..." && \ |
dfeab068 | 257 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 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 ); |
d02b48c6 RE |
258 | @apps/ssleay version -a |
259 | ||
260 | depend: | |
261 | @for i in $(DIRS) ;\ | |
262 | do \ | |
56ee3117 PS |
263 | (cd $$i && echo "making dependancies $$i..." && \ |
264 | $(MAKE) SDIRS='${SDIRS}' depend ) || exit 1; \ | |
d02b48c6 RE |
265 | done; |
266 | ||
267 | lint: | |
268 | @for i in $(DIRS) ;\ | |
269 | do \ | |
56ee3117 PS |
270 | (cd $$i && echo "making lint $$i..." && \ |
271 | $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \ | |
d02b48c6 RE |
272 | done; |
273 | ||
274 | tags: | |
275 | @for i in $(DIRS) ;\ | |
276 | do \ | |
56ee3117 PS |
277 | (cd $$i && echo "making tags $$i..." && \ |
278 | $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \ | |
d02b48c6 RE |
279 | done; |
280 | ||
281 | errors: | |
282 | @for i in $(DIRS) ;\ | |
283 | do \ | |
56ee3117 PS |
284 | (cd $$i && echo "making errors in $$i..." && \ |
285 | $(MAKE) SDIRS='${SDIRS}' errors ) || exit 1; \ | |
d02b48c6 RE |
286 | done; |
287 | ||
288 | tar: | |
651d0aff RE |
289 | @gtar --no-recursion -cvf - \ |
290 | `find * -depth -print | grep -v CVS | grep -v .cvsignore | sort` |\ | |
291 | tardy --user_number=0 --user_name=rse \ | |
9ce5db45 RE |
292 | --group_number=0 --group_name=openssl \ |
293 | --prefix=openssl-$(VERSION) - |\ | |
651d0aff RE |
294 | gzip --best >../$(TARFILE).gz; \ |
295 | ls -l ../$(TARFILE).gz | |
d02b48c6 | 296 | |
58964a49 | 297 | dist: |
d02b48c6 | 298 | perl Configure dist |
58964a49 | 299 | perl util/up_ver.pl ${VERSION} |
d02b48c6 RE |
300 | @$(MAKE) dist_pem_h |
301 | @$(MAKE) SDIRS='${SDIRS}' clean | |
302 | @$(MAKE) SDIRS='${SDIRS}' dclean | |
303 | @(cd apps; sh ./rmlinks) | |
304 | @$(MAKE) makefile.one | |
305 | @$(MAKE) tar | |
306 | ||
307 | dist_pem_h: | |
308 | (cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) | |
309 | ||
310 | install: all | |
311 | @-mkdir -p $(INSTALLTOP)/bin 2>/dev/null | |
312 | @-mkdir -p $(INSTALLTOP)/lib 2>/dev/null | |
313 | @-mkdir -p $(INSTALLTOP)/include 2>/dev/null | |
314 | @-mkdir -p $(INSTALLTOP)/certs 2>/dev/null | |
315 | @-mkdir -p $(INSTALLTOP)/private 2>/dev/null | |
316 | @for i in $(DIRS) ;\ | |
317 | do \ | |
318 | (cd $$i; echo "installing $$i..."; \ | |
319 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \ | |
320 | done | |
321 | @for i in $(LIBS) ;\ | |
322 | do \ | |
58964a49 | 323 | ( echo installing $$i; \ |
d02b48c6 RE |
324 | cp $$i $(INSTALLTOP)/lib; \ |
325 | sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \ | |
326 | chmod 644 $(INSTALLTOP)/lib/$$i ); \ | |
327 | done | |
328 | ||
329 | # DO NOT DELETE THIS LINE -- make depend depends on it. |