a3ef81ca5be50a5305b8f78ca0fec748a196e612
[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 SHLIB_EXT=
13 PLATFORM=dist
14 OPTIONS=
15 CONFIGURE_ARGS=
16 SHLIB_TARGET=
17
18 # HERE indicates where this Makefile lives.  This can be used to indicate
19 # where sub-Makefiles are expected to be.  Currently has very limited usage,
20 # and should probably not be bothered with at all.
21 HERE=.
22
23 # INSTALL_PREFIX is for package builders so that they can configure
24 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
25 # Normally it is left empty.
26 INSTALL_PREFIX=
27 INSTALLTOP=/usr/local/ssl
28
29 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
30 OPENSSLDIR=/usr/local/ssl
31
32 # NO_IDEA - Define to build without the IDEA algorithm
33 # NO_RC4  - Define to build without the RC4 algorithm
34 # NO_RC2  - Define to build without the RC2 algorithm
35 # THREADS - Define when building with threads, you will probably also need any
36 #           system defines as well, i.e. _REENTERANT for Solaris 2.[34]
37 # TERMIO  - Define the termio terminal subsystem, needed if sgtty is missing.
38 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
39 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
40 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
41 #           one.  32 bytes will be read from this when the random
42 #           number generator is initalised.
43 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
44 #           NULL encryption ciphers.
45 #
46 # LOCK_DEBUG - turns on lots of lock debug output :-)
47 # REF_CHECK - turn on some xyz_free() assertions.
48 # REF_PRINT - prints some stuff on structure free.
49 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
50 # MFUNC - Make all Malloc/Free/Realloc calls call
51 #       CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
52 #       call application defined callbacks via CRYPTO_set_mem_functions()
53 # MD5_ASM needs to be defined to use the x86 assembler for MD5
54 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
55 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
56 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8.  It must
57 # equal 4.
58 # PKCS1_CHECK - pkcs1 tests.
59
60 CC= cc
61 CFLAG= -O
62 DEPFLAG= 
63 PEX_LIBS= 
64 EX_LIBS= 
65 EXE_EXT= 
66 ARFLAGS=
67 AR=ar $(ARFLAGS) r
68 RANLIB= ranlib
69 PERL= perl
70 TAR= tar
71 TARFLAGS= --no-recursion
72 MAKEDEPPROG=makedepend
73
74 # We let the C compiler driver to take care of .s files. This is done in
75 # order to be excused from maintaining a separate set of architecture
76 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
77 # gcc, then the driver will automatically translate it to -xarch=v8plus
78 # and pass it down to assembler.
79 AS=$(CC) -c
80 ASFLAG=$(CFLAG)
81
82 # For x86 assembler: Set PROCESSOR to 386 if you want to support
83 # the 80386.
84 PROCESSOR=
85
86 # CPUID module collects small commonly used assembler snippets
87 CPUID_OBJ= 
88 BN_ASM= bn_asm.o
89 DES_ENC= des_enc.o fcrypt_b.o
90 AES_ASM_OBJ=aes_core.o aes_cbc.o
91 BF_ENC= bf_enc.o
92 CAST_ENC= c_enc.o
93 RC4_ENC= rc4_enc.o
94 RC5_ENC= rc5_enc.o
95 MD5_ASM_OBJ= 
96 SHA1_ASM_OBJ= 
97 RMD160_ASM_OBJ= 
98
99 # KRB5 stuff
100 KRB5_INCLUDES=
101 LIBKRB5=
102
103 DIRS=   crypto ssl engines apps test tools
104 SHLIBDIRS= crypto ssl
105
106 # dirs in crypto to build
107 SDIRS=  \
108         objects \
109         md2 md4 md5 sha mdc2 hmac ripemd \
110         des aes rc2 rc4 rc5 idea bf cast \
111         bn ec rsa dsa ecdsa dh ecdh dso engine \
112         buffer bio stack lhash rand err \
113         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
114         store pqueue
115
116 # tests to perform.  "alltests" is a special word indicating that all tests
117 # should be performed.
118 TESTS = alltests
119
120 MAKEFILE= Makefile
121
122 MANDIR=$(OPENSSLDIR)/man
123 MAN1=1
124 MAN3=3
125 MANSUFFIX=
126 SHELL=/bin/sh
127
128 TOP=    .
129 ONEDIRS=out tmp
130 EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
131 WDIRS=  windows
132 LIBS=   libcrypto.a libssl.a
133 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
134 SHARED_SSL=libssl$(SHLIB_EXT)
135 SHARED_LIBS=
136 SHARED_LIBS_LINK_EXTS=
137 SHARED_LDFLAGS=
138
139 GENERAL=        Makefile
140 BASENAME=       openssl
141 NAME=           $(BASENAME)-$(VERSION)
142 TARFILE=        $(NAME).tar
143 WTARFILE=       $(NAME)-win.tar
144 EXHEADER=       e_os2.h
145 HEADER=         e_os.h
146
147 all: Makefile build_all openssl.pc
148
149 BUILDENV=       PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
150                 SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}'     \
151                 LIBRPATH='$(INSTALLTOP)/lib'                    \
152                 CC='${CC}' CFLAG='${CFLAG}'                     \
153                 AS='${CC}' ASFLAG='${CFLAG} -c'                 \
154                 AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
155                 LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
156                 KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}'   \
157                 EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}'       \
158                 SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
159                 PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}'     \
160                 CPUID_OBJ='${CPUID_OBJ}'                        \
161                 BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}'         \
162                 AES_ASM_OBJ='${AES_ASM_OBJ}'                    \
163                 BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}'       \
164                 RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}'       \
165                 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'                  \
166                 MD5_ASM_OBJ='${MD5_ASM_OBJ}'                    \
167                 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}'
168
169 BUILD_CMD=if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
170         if [ -d "$$dir" ]; then \
171                 (cd $$dir && echo "making $$target in $$dir..." && \
172                 $(MAKE) $(BUILDENV) $$target ) || exit 1; \
173         else \
174                 $(MAKE) $$dir; \
175         fi; fi
176
177 reflect:
178         [ -n "$(THIS)" ] && $(MAKE) $(THIS) $(BIULDENV)
179
180 sub_all: build_all
181 build_all: build_libs build_apps build_tests build_tools
182
183 build_libs: build_crypto build_ssl build_engines
184
185 build_crypto:
186         @dir=crypto; target=all; $(BUILD_CMD)
187 build_ssl:
188         @dir=ssl; target=all; $(BUILD_CMD)
189 build_engines:
190         @dir=engines; target=all; $(BUILD_CMD)
191 build_apps:
192         @dir=apps; target=all; $(BUILD_CMD)
193 build_tests:
194         @dir=test; target=all; $(BUILD_CMD)
195 build_tools:
196         @dir=tools; target=all; $(BUILD_CMD)
197
198 all_testapps: build_libs build_testapps
199 build_testapps:
200         @dir=crypto; target=testapps; $(BUILD_CMD)
201
202 libcrypto$(SHLIB_EXT): libcrypto.a
203         @if [ "$(SHLIB_TARGET)" != "" ]; then \
204                 $(MAKE) SHLIBDIRS=crypto build-shared; \
205         else \
206                 echo "There's no support for shared libraries on this platform" >&2; \
207                 exit 1; \
208         fi
209
210 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
211         @if [ "$(SHLIB_TARGET)" != "" ]; then \
212                 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
213         else \
214                 echo "There's no support for shared libraries on this platform" >&2; \
215                 exit 1; \
216         fi
217
218 clean-shared:
219         @set -e; for i in $(SHLIBDIRS); do \
220                 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
221                         tmp="$(SHARED_LIBS_LINK_EXTS)"; \
222                         for j in $${tmp:-x}; do \
223                                 ( set -x; rm -f lib$$i$$j ); \
224                         done; \
225                 fi; \
226                 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
227                 if [ "$(PLATFORM)" = "Cygwin" ]; then \
228                         ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
229                 fi; \
230         done
231
232 link-shared:
233         @ set -e; for i in ${SHLIBDIRS}; do \
234                 $(MAKE) -f $(HERE)/Makefile.shared \
235                         LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
236                         LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
237                         symlink.$(SHLIB_TARGET); \
238                 libs="$$libs -l$$i"; \
239         done
240
241 build-shared: do_$(SHLIB_TARGET) link-shared
242
243 do_$(SHLIB_TARGET):
244         @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
245                 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
246                         libs="$(LIBKRB5) $$libs"; \
247                 fi; \
248                 $(MAKE) -f Makefile.shared \
249                         $(BUILDENV) \
250                         LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
251                         LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
252                         LIBDEPS="$$libs $(EX_LIBS)" \
253                         LIBRPATH="$(INSTALLTOP)/lib" \
254                         link_a.$(SHLIB_TARGET); \
255                 libs="-l$$i $$libs"; \
256         done
257
258 openssl.pc: Makefile
259         @ ( echo 'prefix=$(INSTALLTOP)'; \
260             echo 'exec_prefix=$${prefix}'; \
261             echo 'libdir=$${exec_prefix}/lib'; \
262             echo 'includedir=$${prefix}/include'; \
263             echo ''; \
264             echo 'Name: OpenSSL'; \
265             echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
266             echo 'Version: '$(VERSION); \
267             echo 'Requires: '; \
268             echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
269             echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
270
271 Makefile: Makefile.org Configure config
272         @echo "Makefile is older than Makefile.org, Configure or config."
273         @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
274         @false
275
276 libclean:
277         rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
278
279 clean:  libclean
280         rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
281         @set -e; for i in $(DIRS) ;\
282         do \
283         if [ -d "$$i" ]; then \
284                 (cd $$i && echo "making clean in $$i..." && \
285                 $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
286                 rm -f $(LIBS); \
287         fi; \
288         done;
289         rm -f openssl.pc
290         rm -f speed.* .pure
291         rm -f $(TARFILE)
292         @set -e; for i in $(ONEDIRS) ;\
293         do \
294         rm -fr $$i/*; \
295         done
296
297 makefile.one: files
298         $(PERL) util/mk1mf.pl >makefile.one; \
299         sh util/do_ms.sh
300
301 files:
302         $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
303         @set -e; for i in $(DIRS) ;\
304         do \
305         if [ -d "$$i" ]; then \
306                 (cd $$i && echo "making 'files' in $$i..." && \
307                 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
308         fi; \
309         done;
310
311 links:
312         @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
313         @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
314         @set -e; target=links; for dir in $(DIRS); do $(BUILD_CMD); done
315
316 gentests:
317         @(cd test && echo "generating dummy tests (if needed)..." && \
318         $(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
319
320 dclean:
321         rm -f *.bak
322         @set -e; for i in $(DIRS) ;\
323         do \
324         if [ -d "$$i" ]; then \
325                 (cd $$i && echo "making dclean in $$i..." && \
326                 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
327         fi; \
328         done;
329
330 rehash: rehash.time
331 rehash.time: certs
332         @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
333           OPENSSL_DEBUG_MEMORY=on; \
334           export OPENSSL OPENSSL_DEBUG_MEMORY; \
335           $(PERL) tools/c_rehash certs)
336         touch rehash.time
337
338 test:   tests
339
340 tests: rehash
341         @(cd test && echo "testing..." && \
342         $(MAKE) $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
343         util/opensslwrap.sh version -a
344
345 report:
346         @$(PERL) util/selftest.pl
347
348 depend:
349         @set -e; for i in $(DIRS) ;\
350         do \
351         if [ -d "$$i" ]; then \
352                 (cd $$i && echo "making dependencies $$i..." && \
353                 $(MAKE) SDIRS='${SDIRS}' CFLAG='-DOPENSSL_NO_DEPRECATED ${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ) || exit 1; \
354         fi; \
355         done;
356
357 lint:
358         @set -e; for i in $(DIRS) ;\
359         do \
360         if [ -d "$$i" ]; then \
361                 (cd $$i && echo "making lint $$i..." && \
362                 $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
363         fi; \
364         done;
365
366 tags:
367         rm -f TAGS
368         find . -name '[^.]*.[ch]' | xargs etags -a
369
370 errors:
371         $(PERL) util/mkerr.pl -recurse -write
372         (cd engines; $(MAKE) PERL=$(PERL) errors)
373         $(PERL) util/ck_errf.pl */*.c */*/*.c
374
375 stacks:
376         $(PERL) util/mkstack.pl -write
377
378 util/libeay.num::
379         $(PERL) util/mkdef.pl crypto update
380
381 util/ssleay.num::
382         $(PERL) util/mkdef.pl ssl update
383
384 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
385         $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
386 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
387         $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
388
389 apps/openssl-vms.cnf: apps/openssl.cnf
390         $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
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 apps/openssl-vms.cnf TABLE
397
398 # Build distribution tar-file. As the list of files returned by "find" is
399 # pretty long, on several platforms a "too many arguments" error or similar
400 # would occur. Therefore the list of files is temporarily stored into a file
401 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
402 # tar does not support the --files-from option.
403 tar:
404         find . -type d -print | xargs chmod 755
405         find . -type f -print | xargs chmod a+r
406         find . -type f -perm -0100 -print | xargs chmod a+x
407         find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
408         $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
409         tardy --user_number=0  --user_name=openssl \
410               --group_number=0 --group_name=openssl \
411               --prefix=openssl-$(VERSION) - |\
412         gzip --best >../$(TARFILE).gz; \
413         rm -f ../$(TARFILE).list; \
414         ls -l ../$(TARFILE).gz
415
416 tar-snap:
417         @$(TAR) $(TARFLAGS) -cvf - \
418                 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*'  \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
419         tardy --user_number=0  --user_name=openssl \
420               --group_number=0 --group_name=openssl \
421               --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
422         ls -l ../$(TARFILE)
423
424 dist:   
425         $(PERL) Configure dist
426         @$(MAKE) dist_pem_h
427         @$(MAKE) SDIRS='${SDIRS}' clean
428         @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
429
430 dist_pem_h:
431         (cd crypto/pem; $(MAKE) $(BUILDENV) pem.h; $(MAKE) clean)
432
433 install: all install_docs install_sw
434
435 install_sw:
436         @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
437                 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
438                 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
439                 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
440                 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
441                 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
442                 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
443                 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
444         @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
445         do \
446         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
447         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
448         done;
449         @set -e; for i in $(DIRS) ;\
450         do \
451         if [ -d "$$i" ]; then \
452                 (cd $$i; echo "installing $$i..."; \
453                 $(MAKE) $(BUILDENV) INSTALL_PREFIX='${INSTALL_PREFIX}' OPENSSLDIR='${OPENSSLDIR}' install ); \
454         fi; \
455         done
456         @set -e; for i in $(LIBS) ;\
457         do \
458                 if [ -f "$$i" ]; then \
459                 (       echo installing $$i; \
460                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
461                         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
462                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
463                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
464                 fi; \
465         done;
466         @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
467                 tmp="$(SHARED_LIBS)"; \
468                 for i in $${tmp:-x}; \
469                 do \
470                         if [ -f "$$i" -o -f "$$i.a" ]; then \
471                         (       echo installing $$i; \
472                                 if [ "$(PLATFORM)" != "Cygwin" ]; then \
473                                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
474                                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
475                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
476                                 else \
477                                         c=`echo $$i | sed 's/^lib/cyg/'`; \
478                                         cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
479                                         chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
480                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
481                                         cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
482                                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
483                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
484                                 fi ); \
485                         fi; \
486                 done; \
487                 (       here="`pwd`"; \
488                         cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
489                         $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
490                 if [ "$(INSTALLTOP)" != "/usr" ]; then \
491                         echo 'OpenSSL shared libraries have been installed in:'; \
492                         echo '  $(INSTALLTOP)'; \
493                         echo ''; \
494                         sed -e '1,/^$$/d' doc/openssl-shared.txt; \
495                 fi; \
496         fi
497         cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
498         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
499
500 install_docs:
501         @$(PERL) $(TOP)/util/mkdir-p.pl \
502                 $(INSTALL_PREFIX)$(MANDIR)/man1 \
503                 $(INSTALL_PREFIX)$(MANDIR)/man3 \
504                 $(INSTALL_PREFIX)$(MANDIR)/man5 \
505                 $(INSTALL_PREFIX)$(MANDIR)/man7
506         @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
507         here="`pwd`"; \
508         filecase=; \
509         if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
510                 filecase=-i; \
511         fi; \
512         set -e; for i in doc/apps/*.pod; do \
513                 fn=`basename $$i .pod`; \
514                 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
515                 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
516                 (cd `$(PERL) util/dirname.pl $$i`; \
517                 sh -c "$$pod2man \
518                         --section=$$sec --center=OpenSSL \
519                         --release=$(VERSION) `basename $$i`") \
520                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
521                 $(PERL) util/extract-names.pl < $$i | \
522                         grep -v $$filecase "^$$fn\$$" | \
523                         grep -v "[      ]" | \
524                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
525                          while read n; do \
526                                 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
527                          done); \
528         done; \
529         set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
530                 fn=`basename $$i .pod`; \
531                 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
532                 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
533                 (cd `$(PERL) util/dirname.pl $$i`; \
534                 sh -c "$$pod2man \
535                         --section=$$sec --center=OpenSSL \
536                         --release=$(VERSION) `basename $$i`") \
537                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
538                 $(PERL) util/extract-names.pl < $$i | \
539                         grep -v $$filecase "^$$fn\$$" | \
540                         grep -v "[      ]" | \
541                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
542                          while read n; do \
543                                 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
544                          done); \
545         done
546
547 # DO NOT DELETE THIS LINE -- make depend depends on it.