Redo and enhance the support for building shared libraries. Currently
[openssl.git] / Makefile.org
1 ##
2 ## Makefile for OpenSSL
3 ##
4
5 VERSION=
6 MAJOR=
7 MINOR=
8 SHLIB_VERSION_NUMBER=
9 SHLIB_VERSION_HISTORY=
10 SHLIB_MAJOR=
11 SHLIB_MINOR=
12 PLATFORM=dist
13 OPTIONS=
14 SHLIB_TARGET=
15
16 # INSTALL_PREFIX is for package builders so that they can configure
17 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
18 # Normally it is left empty.
19 INSTALL_PREFIX=
20 INSTALLTOP=/usr/local/ssl
21
22 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
23 OPENSSLDIR=/usr/local/ssl
24
25 # RSAref  - Define if we are to link with RSAref.
26 # NO_IDEA - Define to build without the IDEA algorithm
27 # NO_RC4  - Define to build without the RC4 algorithm
28 # NO_RC2  - Define to build without the RC2 algorithm
29 # THREADS - Define when building with threads, you will probably also need any
30 #           system defines as well, i.e. _REENTERANT for Solaris 2.[34]
31 # TERMIO  - Define the termio terminal subsystem, needed if sgtty is missing.
32 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
33 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
34 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
35 #           one.  32 bytes will be read from this when the random
36 #           number generator is initalised.
37 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
38 #           NULL encryption ciphers.
39 #
40 # LOCK_DEBUG - turns on lots of lock debug output :-)
41 # REF_CHECK - turn on some xyz_free() assertions.
42 # REF_PRINT - prints some stuff on structure free.
43 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
44 # MFUNC - Make all Malloc/Free/Realloc calls call
45 #       CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
46 #       call application defined callbacks via CRYPTO_set_mem_functions()
47 # MD5_ASM needs to be defined to use the x86 assembler for MD5
48 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
49 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
50 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8.  It must
51 # equal 4.
52 # PKCS1_CHECK - pkcs1 tests.
53
54 CC= gcc
55 #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
56 CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
57 DEPFLAG= 
58 PEX_LIBS= -L. -L.. -L../.. -L../../..
59 EX_LIBS= 
60 AR=ar r
61 RANLIB= ranlib
62 PERL= perl
63 TAR= tar
64 TARFLAGS= --norecurse
65
66 # Set BN_ASM to bn_asm.o if you want to use the C version
67 BN_ASM= bn_asm.o
68 #BN_ASM= bn_asm.o
69 #BN_ASM= asm/bn86-elf.o # elf, linux-elf
70 #BN_ASM= asm/bn86-sol.o # solaris
71 #BN_ASM= asm/bn86-out.o # a.out, FreeBSD
72 #BN_ASM= asm/bn86bsdi.o # bsdi
73 #BN_ASM= asm/alpha.o    # DEC Alpha
74 #BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC
75 #BN_ASM= asm/r3000.o    # SGI MIPS cpu
76 #BN_ASM= asm/sparc.o    # Sun solaris/SunOS
77 #BN_ASM= asm/bn-win32.o # Windows 95/NT
78 #BN_ASM= asm/x86w16.o   # 16 bit code for Windows 3.1/DOS
79 #BN_ASM= asm/x86w32.o   # 32 bit code for Windows 3.1
80
81 # For x86 assembler: Set PROCESSOR to 386 if you want to support
82 # the 80386.
83 PROCESSOR=
84
85 # Set DES_ENC to des_enc.o if you want to use the C version
86 #There are 4 x86 assember options.
87 DES_ENC= asm/dx86-out.o asm/yx86-out.o
88 #DES_ENC= des_enc.o fcrypt_b.o          # C
89 #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
90 #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
91 #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
92 #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
93
94 # Set BF_ENC to bf_enc.o if you want to use the C version
95 #There are 4 x86 assember options.
96 BF_ENC= asm/bx86-out.o
97 #BF_ENC= bf_enc.o
98 #BF_ENC= asm/bx86-elf.o # elf
99 #BF_ENC= asm/bx86-sol.o # solaris
100 #BF_ENC= asm/bx86-out.o # a.out, FreeBSD
101 #BF_ENC= asm/bx86bsdi.o # bsdi
102
103 # Set CAST_ENC to c_enc.o if you want to use the C version
104 #There are 4 x86 assember options.
105 CAST_ENC= asm/cx86-out.o
106 #CAST_ENC= c_enc.o
107 #CAST_ENC= asm/cx86-elf.o # elf
108 #CAST_ENC= asm/cx86-sol.o # solaris
109 #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
110 #CAST_ENC= asm/cx86bsdi.o # bsdi
111
112 # Set RC4_ENC to rc4_enc.o if you want to use the C version
113 #There are 4 x86 assember options.
114 RC4_ENC= asm/rx86-out.o
115 #RC4_ENC= rc4_enc.o
116 #RC4_ENC= asm/rx86-elf.o # elf
117 #RC4_ENC= asm/rx86-sol.o # solaris
118 #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
119 #RC4_ENC= asm/rx86bsdi.o # bsdi
120
121 # Set RC5_ENC to rc5_enc.o if you want to use the C version
122 #There are 4 x86 assember options.
123 RC5_ENC= asm/r586-out.o
124 #RC5_ENC= rc5_enc.o
125 #RC5_ENC= asm/r586-elf.o # elf
126 #RC5_ENC= asm/r586-sol.o # solaris
127 #RC5_ENC= asm/r586-out.o # a.out, FreeBSD
128 #RC5_ENC= asm/r586bsdi.o # bsdi
129
130 # Also need MD5_ASM defined
131 MD5_ASM_OBJ= asm/mx86-out.o
132 #MD5_ASM_OBJ= asm/mx86-elf.o        # elf
133 #MD5_ASM_OBJ= asm/mx86-sol.o        # solaris
134 #MD5_ASM_OBJ= asm/mx86-out.o        # a.out, FreeBSD
135 #MD5_ASM_OBJ= asm/mx86bsdi.o        # bsdi
136
137 # Also need SHA1_ASM defined
138 SHA1_ASM_OBJ= asm/sx86-out.o
139 #SHA1_ASM_OBJ= asm/sx86-elf.o       # elf
140 #SHA1_ASM_OBJ= asm/sx86-sol.o       # solaris
141 #SHA1_ASM_OBJ= asm/sx86-out.o       # a.out, FreeBSD
142 #SHA1_ASM_OBJ= asm/sx86bsdi.o       # bsdi
143
144 # Also need RMD160_ASM defined
145 RMD160_ASM_OBJ= asm/rm86-out.o
146 #RMD160_ASM_OBJ= asm/rm86-elf.o       # elf
147 #RMD160_ASM_OBJ= asm/rm86-sol.o       # solaris
148 #RMD160_ASM_OBJ= asm/rm86-out.o       # a.out, FreeBSD
149 #RMD160_ASM_OBJ= asm/rm86bsdi.o       # bsdi
150
151 # To do special treatment, use "directory names" starting with a period.
152 # When we're prepared to use shared libraries in the programs we link here
153 # we might have SHLIB_MARK1 get the value ".shlib." and SHLIB_MARK2 be empty,
154 # or have that configurable.
155 SHLIB_MARK1=.shlib-clean.
156 SHLIB_MARK2=.shlib.
157
158 DIRS=   crypto ssl rsaref $(SHLIB_MARK1) apps test tools $(SHLIB_MARK2)
159 SHLIBDIRS= crypto ssl
160
161 # dirs in crypto to build
162 SDIRS=  \
163         md2 md5 sha mdc2 hmac ripemd \
164         des rc2 rc4 rc5 idea bf cast \
165         bn rsa dsa dh dso \
166         buffer bio stack lhash rand err objects \
167         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
168
169 MAKEFILE= Makefile.ssl
170 MAKE=     make -f Makefile.ssl
171
172 MANDIR=$(OPENSSLDIR)/man
173 MAN1=1
174 MAN3=3
175 SHELL=/bin/sh
176
177 TOP=    .
178 ONEDIRS=out tmp
179 EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
180 WDIRS=  windows
181 LIBS=   libcrypto.a libssl.a
182 SHARED_LIBS=libcrypto.so libssl.so
183
184 GENERAL=        Makefile
185 BASENAME=       openssl
186 NAME=           $(BASENAME)-$(VERSION)
187 TARFILE=        $(NAME).tar
188 WTARFILE=       $(NAME)-win.tar
189 EXHEADER=       e_os.h e_os2.h
190 HEADER=         e_os.h
191
192 all: Makefile.ssl
193         @need_shlib=true; \
194         for i in $(DIRS) ;\
195         do \
196         if [ "$$i" = ".shlib-clean." ]; then \
197                 if [ "$(SHLIB_TARGET)" != "" ]; then \
198                         $(MAKE) clean-shared; \
199                 fi; \
200         elif [ "$$i" = ".shlib." ]; then \
201                 if [ "$(SHLIB_TARGET)" != "" ]; then \
202                         $(MAKE) $(SHARED_LIBS); \
203                 fi; \
204                 need_shlib=false; \
205         else \
206                 (cd $$i && echo "making all in $$i..." && \
207                 $(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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
208         fi; \
209         done; \
210         if $$need_shlib && [ "$(SHLIB_TARGET)" != "" ]; then :; else \
211                 $(MAKE) $(SHARED_LIBS); \
212         fi
213
214 sub_all:
215         @need_shlib=true; \
216         for i in $(DIRS) ;\
217         do \
218         if [ "$$i" = ".shlib-clean." ]; then \
219                 if [ "$(SHLIB_TARGET)" != "" ]; then \
220                         $(MAKE) clean-shared; \
221                 fi; \
222         elif [ "$$i" = ".shlib." ]; then \
223                 if [ "$(SHLIB_TARGET)" != "" ]; then \
224                         $(MAKE) $(SHARED_LIBS); \
225                 fi; \
226                 need_shlib=false; \
227         else \
228                 (cd $$i && echo "making all in $$i..." && \
229                 $(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}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
230         fi; \
231         done; \
232         if $$need_shlib && [ "$(SHLIB_TARGET)" != "" ]; then :; else \
233                 $(MAKE) $(SHARED_LIBS); \
234         fi
235
236 libcrypto.so: libcrypto.a
237         $(MAKE) $(SHLIB_TARGET)
238 libssl.so: libcrypto.so libssl.a
239         $(MAKE) $(SHLIB_TARGET)
240
241 clean-shared:
242         for i in ${SHLIBDIRS}; do \
243         rm -f lib$$i.so \
244                 lib$$i.so.${SHLIB_MAJOR} \
245                 lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
246         done
247
248 linux-shared:
249         libs=; for i in ${SHLIBDIRS}; do \
250         rm -f lib$$i.so \
251                 lib$$i.so.${SHLIB_MAJOR} \
252                 lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
253         ( set -x; ${CC}  -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
254                 -Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
255                 -Wl,--whole-archive lib$$i.a \
256                 -Wl,--no-whole-archive -lc $$libs ) || exit 1; \
257         libs="$$libs -L. -l$$i"; \
258         ( set -x; \
259                 ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
260                         lib$$i.so.${SHLIB_MAJOR}; \
261                 ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
262         done;
263
264 # This assumes that GNU utilities are *not* used
265 true64-shared:
266         libs=; for i in ${SHLIBDIRS}; do \
267         ( set -x; ${CC}  -shared -no_archive -o lib$$i.so \
268                 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
269                 -all lib$$i.a -none -lc $$libs ) || exit 1; \
270         libs="$$libs -L. -l$$i"; \
271         done;
272
273 Makefile.ssl: Makefile.org
274         @echo "Makefile.ssl is older than Makefile.org."
275         @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
276         @false
277
278 libclean:
279         rm -f *.a */lib */*/lib
280
281 clean:
282         rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
283         @for i in $(DIRS) ;\
284         do \
285         if echo "$$i" | grep -v '^\.'; then \
286                 (cd $$i && echo "making clean in $$i..." && \
287                 $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
288                 rm -f $(LIBS); \
289         fi; \
290         done;
291         rm -f *.a *.o speed.* *.map *.so .pure core
292         rm -f $(TARFILE)
293         @for i in $(ONEDIRS) ;\
294         do \
295         rm -fr $$i/*; \
296         done
297
298 makefile.one: files
299         $(PERL) util/mk1mf.pl >makefile.one; \
300         sh util/do_ms.sh
301
302 files:
303         $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
304         @for i in $(DIRS) ;\
305         do \
306         if echo "$$i" | grep -v '^\.'; then \
307                 (cd $$i && echo "making 'files' in $$i..." && \
308                 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
309         fi; \
310         done;
311
312 links:
313         @$(TOP)/util/point.sh Makefile.ssl Makefile
314         @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
315         @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
316         @for i in $(DIRS); do \
317         if echo "$$i" | grep -v '^\.'; then \
318                 (cd $$i && echo "making links in $$i..." && \
319                 $(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}' PERL='${PERL}' links ) || exit 1; \
320         fi; \
321         done;
322
323 dclean:
324         rm -f *.bak
325         @for i in $(DIRS) ;\
326         do \
327         if echo "$$i" | grep -v '^\.'; then \
328                 (cd $$i && echo "making dclean in $$i..." && \
329                 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
330         fi; \
331         done;
332
333 rehash: rehash.time
334 rehash.time: certs
335         @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs)
336         touch rehash.time
337
338 test:   tests
339
340 tests: rehash
341         @(cd test && echo "testing..." && \
342         $(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 );
343         @apps/openssl version -a
344
345 report:
346         @$(PERL) util/selftest.pl
347
348 depend:
349         @for i in $(DIRS) ;\
350         do \
351         if echo "$$i" | grep -v '^\.'; then \
352                 (cd $$i && echo "making dependencies $$i..." && \
353                 $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
354         fi; \
355         done;
356
357 lint:
358         @for i in $(DIRS) ;\
359         do \
360         if echo "$$i" | grep -v '^\.'; then \
361                 (cd $$i && echo "making lint $$i..." && \
362                 $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
363         fi; \
364         done;
365
366 tags:
367         @for i in $(DIRS) ;\
368         do \
369         if echo "$$i" | grep -v '^\.'; then \
370                 (cd $$i && echo "making tags $$i..." && \
371                 $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
372         fi; \
373         done;
374
375 errors:
376         perl util/mkerr.pl -recurse -write
377
378 stacks:
379         perl util/mkstack.pl -write
380
381 util/libeay.num::
382         perl util/mkdef.pl crypto update
383
384 util/ssleay.num::
385         perl util/mkdef.pl ssl update
386
387 crypto/objects/obj_dat.h: crypto/objects/obj_mac.h crypto/objects/obj_dat.pl
388         perl crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
389 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt 
390         perl crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
391
392 TABLE: Configure
393         (echo 'Output of `Configure TABLE'"':"; \
394         perl Configure TABLE) > TABLE
395
396 update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
397
398 tar:
399         @$(TAR) $(TARFLAGS) -cvf - \
400                 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
401         tardy --user_number=0  --user_name=openssl \
402               --group_number=0 --group_name=openssl \
403               --prefix=openssl-$(VERSION) - |\
404         gzip --best >../$(TARFILE).gz; \
405         ls -l ../$(TARFILE).gz
406
407 dist:   
408         $(PERL) Configure dist
409         @$(MAKE) dist_pem_h
410         @$(MAKE) SDIRS='${SDIRS}' clean
411         @$(MAKE) tar
412
413 dist_pem_h:
414         (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
415
416 install: all install_docs
417         @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
418                 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
419                 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
420                 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
421                 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
422                 $(INSTALL_PREFIX)$(OPENSSLDIR)/private \
423                 $(INSTALL_PREFIX)$(OPENSSLDIR)/lib
424         @for i in $(EXHEADER) ;\
425         do \
426         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
427         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
428         done;
429         @for i in $(DIRS) ;\
430         do \
431         if echo "$$i" | grep -v '^\.'; then \
432                 (cd $$i; echo "installing $$i..."; \
433                 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
434         fi; \
435         done
436         @for i in $(LIBS) ;\
437         do \
438                 if [ -f "$$i" ]; then \
439                 (       echo installing $$i; \
440                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
441                         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
442                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
443                 fi \
444         done
445
446 install_docs:
447         @$(PERL) $(TOP)/util/mkdir-p.pl \
448                 $(INSTALL_PREFIX)$(MANDIR)/man1 \
449                 $(INSTALL_PREFIX)$(MANDIR)/man3 \
450                 $(INSTALL_PREFIX)$(MANDIR)/man5 \
451                 $(INSTALL_PREFIX)$(MANDIR)/man7
452         @echo installing man 1 and man 5
453         @for i in doc/apps/*.pod; do \
454                 fn=`basename $$i .pod`; \
455                 sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; \
456                 (cd `dirname $$i`; \
457                 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
458                          --release=$(VERSION) `basename $$i`) \
459                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
460         done
461         @echo installing man 3 and man 7
462         @for i in doc/crypto/*.pod doc/ssl/*.pod; do \
463                 fn=`basename $$i .pod`; \
464                 sec=`[ "$$fn" = "des_modes" ] && echo 7 || echo 3`; \
465                 (cd `dirname $$i`; \
466                 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
467                         --release=$(VERSION) `basename $$i`) \
468                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
469         done
470
471 shlib: all
472         if [ ! -d shlib_dir ] ; then mkdir shlib_dir ; else rm -f shlib_dir/* ; fi
473         cd shlib_dir ; ar -x ../libcrypto.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libcrypto.so.0.9 \
474             -o ./libcrypto.so.0.9.4 && rm *.o
475         cd shlib_dir ; ar -x ../libssl.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libssl.so.0.9 \
476             -o ./libssl.so.0.9.4 && rm *.o
477
478 # DO NOT DELETE THIS LINE -- make depend depends on it.