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