2 ## Makefile for OpenSSL
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.
22 INSTALLTOP=/usr/local/ssl
24 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
25 OPENSSLDIR=/usr/local/ssl
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.
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
53 # PKCS1_CHECK - pkcs1 tests.
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
66 TARFLAGS= --no-recursion
67 MAKEDEPPROG=makedepend
69 # Set BN_ASM to bn_asm.o if you want to use the C version
72 #BN_ASM= asm/bn86-elf.o # elf, linux-elf
73 #BN_ASM= asm/bn86-sol.o # solaris
74 #BN_ASM= asm/bn86-out.o # a.out, FreeBSD
75 #BN_ASM= asm/bn86bsdi.o # bsdi
76 #BN_ASM= asm/alpha.o # DEC Alpha
77 #BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC
78 #BN_ASM= asm/r3000.o # SGI MIPS cpu
79 #BN_ASM= asm/sparc.o # Sun solaris/SunOS
80 #BN_ASM= asm/bn-win32.o # Windows 95/NT
81 #BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
82 #BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
84 # For x86 assembler: Set PROCESSOR to 386 if you want to support
88 # Set DES_ENC to des_enc.o if you want to use the C version
89 #There are 4 x86 assember options.
90 DES_ENC= asm/dx86-out.o asm/yx86-out.o
91 #DES_ENC= des_enc.o fcrypt_b.o # C
92 #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
93 #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
94 #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
95 #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
97 # Set BF_ENC to bf_enc.o if you want to use the C version
98 #There are 4 x86 assember options.
99 BF_ENC= asm/bx86-out.o
101 #BF_ENC= asm/bx86-elf.o # elf
102 #BF_ENC= asm/bx86-sol.o # solaris
103 #BF_ENC= asm/bx86-out.o # a.out, FreeBSD
104 #BF_ENC= asm/bx86bsdi.o # bsdi
106 # Set CAST_ENC to c_enc.o if you want to use the C version
107 #There are 4 x86 assember options.
108 CAST_ENC= asm/cx86-out.o
110 #CAST_ENC= asm/cx86-elf.o # elf
111 #CAST_ENC= asm/cx86-sol.o # solaris
112 #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
113 #CAST_ENC= asm/cx86bsdi.o # bsdi
115 # Set RC4_ENC to rc4_enc.o if you want to use the C version
116 #There are 4 x86 assember options.
117 RC4_ENC= asm/rx86-out.o
119 #RC4_ENC= asm/rx86-elf.o # elf
120 #RC4_ENC= asm/rx86-sol.o # solaris
121 #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
122 #RC4_ENC= asm/rx86bsdi.o # bsdi
124 # Set RC5_ENC to rc5_enc.o if you want to use the C version
125 #There are 4 x86 assember options.
126 RC5_ENC= asm/r586-out.o
128 #RC5_ENC= asm/r586-elf.o # elf
129 #RC5_ENC= asm/r586-sol.o # solaris
130 #RC5_ENC= asm/r586-out.o # a.out, FreeBSD
131 #RC5_ENC= asm/r586bsdi.o # bsdi
133 # Also need MD5_ASM defined
134 MD5_ASM_OBJ= asm/mx86-out.o
135 #MD5_ASM_OBJ= asm/mx86-elf.o # elf
136 #MD5_ASM_OBJ= asm/mx86-sol.o # solaris
137 #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
138 #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
140 # Also need SHA1_ASM defined
141 SHA1_ASM_OBJ= asm/sx86-out.o
142 #SHA1_ASM_OBJ= asm/sx86-elf.o # elf
143 #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
144 #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
145 #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
147 # Also need RMD160_ASM defined
148 RMD160_ASM_OBJ= asm/rm86-out.o
149 #RMD160_ASM_OBJ= asm/rm86-elf.o # elf
150 #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
151 #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
152 #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
158 # When we're prepared to use shared libraries in the programs we link here
159 # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
162 DIRS= crypto ssl $(SHLIB_MARK) apps test tools
163 SHLIBDIRS= crypto ssl
165 # dirs in crypto to build
167 md2 md4 md5 sha mdc2 hmac ripemd \
168 des rc2 rc4 rc5 idea bf cast \
169 bn ec rsa dsa ecdsa dh dso engine aes \
170 buffer bio stack lhash rand err objects \
171 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
173 # tests to perform. "alltests" is a special word indicating that all tests
174 # should be performed.
177 MAKEFILE= Makefile.ssl
178 MAKE= make -f Makefile.ssl
180 MANDIR=$(OPENSSLDIR)/man
187 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
189 LIBS= libcrypto.a libssl.a
190 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
191 SHARED_SSL=libssl$(SHLIB_EXT)
193 SHARED_LIBS_LINK_EXTS=
198 NAME= $(BASENAME)-$(VERSION)
200 WTARFILE= $(NAME)-win.tar
204 # When we're prepared to use shared libraries in the programs we link here
205 # we might remove 'clean-shared' from the targets to perform at this stage
207 all: Makefile.ssl sub_all
212 if [ -d "$$i" ]; then \
213 (cd $$i && echo "making all in $$i..." && \
214 $(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}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
220 libcrypto$(SHLIB_EXT): libcrypto.a
221 @if [ "$(SHLIB_TARGET)" != "" ]; then \
222 $(MAKE) SHLIBDIRS=crypto build-shared; \
224 echo "There's no support for shared libraries on this platform" >&2; \
227 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
228 @if [ "$(SHLIB_TARGET)" != "" ]; then \
229 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
231 echo "There's no support for shared libraries on this platform" >&2; \
235 @for i in $(SHLIBDIRS); do \
236 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
237 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
238 for j in $${tmp:-x}; do \
239 ( set -x; rm -f lib$$i$$j ); \
242 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
243 if [ "$(PLATFORM)" = "CygWin32" ]; then \
244 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
249 @if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
250 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
251 for i in $(SHLIBDIRS); do \
252 prev=lib$$i$(SHLIB_EXT); \
253 for j in $${tmp:-x}; do \
254 ( set -x; ln -f -s $$prev lib$$i$$j ); \
260 build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
262 do_bsd-gcc-shared: do_gnu-shared
263 do_linux-shared: do_gnu-shared
265 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
266 ( set -x; ${CC} ${SHARED_LDFLAGS} \
267 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
268 -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
269 -Wl,--whole-archive lib$$i.a \
270 -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
271 libs="$$libs -l$$i"; \
274 DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
275 collect2=`gcc -print-prog-name=collect2 2>&1` && \
276 [ -n "$$collect2" ] && \
277 my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
278 [ -n "$$my_ld" ] && \
279 $$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
281 # For Darwin AKA Mac OS/X (dyld)
283 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
284 ( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
285 lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
286 -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
287 -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
288 libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
293 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
294 ( set -x; ${CC} -shared -o cyg$$i.dll \
295 -Wl,--whole-archive lib$$i.a \
296 -Wl,--out-implib,lib$$i.dll.a \
297 -Wl,--no-whole-archive $$libs ) || exit 1; \
298 libs="$$libs -l$$i"; \
301 # This assumes that GNU utilities are *not* used
302 do_alpha-osf1-shared:
303 if ${DETECT_GNU_LD}; then \
304 $(MAKE) do_gnu-shared; \
306 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
307 ( set -x; ${CC} ${SHARED_LDFLAGS} \
308 -shared -o lib$$i.so \
309 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
310 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
311 libs="$$libs -l$$i"; \
315 # This assumes that GNU utilities are *not* used
316 # The difference between alpha-osf1-shared and tru64-shared is the `-msym'
317 # option passed to the linker.
319 if ${DETECT_GNU_LD}; then \
320 $(MAKE) do_gnu-shared; \
322 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
323 ( set -x; ${CC} ${SHARED_LDFLAGS} \
324 -shared -msym -o lib$$i.so \
325 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
326 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
327 libs="$$libs -l$$i"; \
331 # This assumes that GNU utilities are *not* used
332 # The difference between tru64-shared and tru64-shared-rpath is the
333 # -rpath ${INSTALLTOP}/lib passed to the linker.
334 do_tru64-shared-rpath:
335 if ${DETECT_GNU_LD}; then \
336 $(MAKE) do_gnu-shared; \
338 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
339 ( set -x; ${CC} ${SHARED_LDFLAGS} \
340 -shared -msym -o lib$$i.so \
341 -rpath ${INSTALLTOP}/lib \
342 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
343 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
344 libs="$$libs -l$$i"; \
349 # This assumes that GNU utilities are *not* used
351 if ${DETECT_GNU_LD}; then \
352 $(MAKE) do_gnu-shared; \
354 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
355 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
356 set -x; ${CC} ${SHARED_LDFLAGS} \
357 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
358 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
359 -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
360 libs="$$libs -l$$i"; \
364 # OpenServer 5 native compilers used
366 if ${DETECT_GNU_LD}; then \
367 $(MAKE) do_gnu-shared; \
369 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
370 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
371 find . -name "*.o" -print > allobjs ; \
372 OBJS= ; export OBJS ; \
373 for obj in `ar t lib$$i.a` ; do \
374 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
376 set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
377 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
378 $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
379 libs="$$libs -l$$i"; \
383 # UnixWare 7 and OpenUNIX 8 native compilers used
385 if ${DETECT_GNU_LD}; then \
386 $(MAKE) do_gnu-shared; \
388 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
389 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
390 find . -name "*.o" -print > allobjs ; \
391 OBJS= ; export OBJS ; \
392 for obj in `ar t lib$$i.a` ; do \
393 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
395 set -x; ${CC} ${SHARED_LDFLAGS} \
396 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
397 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
398 $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
399 libs="$$libs -l$$i"; \
403 # This assumes that GNU utilities are *not* used
405 if ${DETECT_GNU_LD}; then \
406 $(MAKE) do_gnu-shared; \
408 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
409 ( set -x; ${CC} ${SHARED_LDFLAGS} \
410 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
411 -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
412 -all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
413 libs="$$libs -l$$i"; \
417 # This assumes that GNU utilities are *not* used
418 # HP-UX includes the full pathname of libs we depend on, so we would get
419 # ./libcrypto (with ./ as path information) compiled into libssl, hence
420 # we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
422 # The object modules are loaded from lib$i.a using the undocumented -Fl
425 # WARNING: Until DSO is fixed to support a search path, we support SHLIB_PATH
426 # by temporarily specifying "+s"!
429 for i in ${SHLIBDIRS}; do \
430 ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
433 -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
434 +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
435 -Fl lib$$i.a -ldld -lc ) || exit 1; \
438 # This assumes that GNU utilities are *not* used
439 # HP-UX includes the full pathname of libs we depend on, so we would get
440 # ./libcrypto (with ./ as path information) compiled into libssl, hence
441 # we omit the SHLIBDEPS. Applications must be linked with -lssl -lcrypto
444 # HP-UX in 64bit mode has "+s" enabled by default; it will search for
445 # shared libraries along LD_LIBRARY_PATH _and_ SHLIB_PATH.
448 for i in ${SHLIBDIRS}; do \
449 ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
451 -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
452 +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
453 +forceload lib$$i.a -ldl -lc ) || exit 1; \
456 # The following method is said to work on all platforms. Tests will
457 # determine if that's how it's gong to be used.
458 # This assumes that for all but GNU systems, GNU utilities are *not* used.
459 # ALLSYMSFLAGS would be:
460 # GNU systems: --whole-archive
462 # Solaris: -z allextract
465 # HP/UX-64bit: +forceload
467 # SHAREDFLAGS would be:
468 # GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
469 # Tru64 Unix: -shared \
470 # -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
471 # Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
472 # Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
473 # HP/UX-32bit: +vnocompatwarnings -b -z +s \
474 # +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
475 # HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
476 # AIX: -G -bE:lib$$i.exp -bM:SRE
477 # SHAREDCMD would be:
482 # HP/UX-32bit: /usr/ccs/bin/ld
483 # HP/UX-64bit: /usr/ccs/bin/ld
486 SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
489 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
491 ld -r -o $$i.o $(ALLSYMSFLAG) lib$$i.a && \
492 ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
493 $(SHAREDCMD) $(SHAREDFLAG) -o lib$$i.so lib$$i.o \
494 $$libs ${EX_LIBS} ) ) \
496 libs="$$libs -l$$i"; \
499 do_reliantunix-shared:
500 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
501 tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
503 ( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
504 cd $$tmpdir || exit 1 ; ar x $$Opwd/lib$$i.a ; \
505 ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} *.o \
507 cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
510 libs="$$libs -l$$i"; \
513 Makefile.ssl: Makefile.org
514 @echo "Makefile.ssl is older than Makefile.org."
515 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
519 rm -f *.a */lib */*/lib
522 rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
525 if [ -d "$$i" ]; then \
526 (cd $$i && echo "making clean in $$i..." && \
527 $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
531 rm -f *.a *.o speed.* *.map *.so .pure core
533 @for i in $(ONEDIRS) ;\
539 $(PERL) util/mk1mf.pl >makefile.one; \
543 $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
546 if [ -d "$$i" ]; then \
547 (cd $$i && echo "making 'files' in $$i..." && \
548 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
553 @$(TOP)/util/point.sh Makefile.ssl Makefile
554 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
555 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
556 @for i in $(DIRS); do \
557 if [ -d "$$i" ]; then \
558 (cd $$i && echo "making links in $$i..." && \
559 $(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}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' links ) || exit 1; \
567 if [ -d "$$i" ]; then \
568 (cd $$i && echo "making dclean in $$i..." && \
569 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
575 @(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
576 export OPENSSL OPENSSL_DEBUG_MEMORY; \
577 LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
578 export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
579 $(PERL) tools/c_rehash certs)
585 @(cd test && echo "testing..." && \
586 $(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}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' OPENSSL_DEBUG_MEMORY=on tests );
587 @LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
588 export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \
589 apps/openssl version -a
592 @$(PERL) util/selftest.pl
597 if [ -d "$$i" ]; then \
598 (cd $$i && echo "making dependencies $$i..." && \
599 $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' depend ) || exit 1; \
606 if [ -d "$$i" ]; then \
607 (cd $$i && echo "making lint $$i..." && \
608 $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
615 if [ -d "$$i" ]; then \
616 (cd $$i && echo "making tags $$i..." && \
617 $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
622 $(PERL) util/mkerr.pl -recurse -write
623 (cd crypto/engine; $(MAKE) PERL=$(PERL) errors)
626 $(PERL) util/mkstack.pl -write
629 $(PERL) util/mkdef.pl crypto update
632 $(PERL) util/mkdef.pl ssl update
634 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
635 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
636 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
637 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
640 (echo 'Output of `Configure TABLE'"':"; \
641 $(PERL) Configure TABLE) > TABLE
643 update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
646 @$(TAR) $(TARFLAGS) -cvf - \
647 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
648 tardy --user_number=0 --user_name=openssl \
649 --group_number=0 --group_name=openssl \
650 --prefix=openssl-$(VERSION) - |\
651 gzip --best >../$(TARFILE).gz; \
652 ls -l ../$(TARFILE).gz
655 @$(TAR) $(TARFLAGS) -cvf - \
656 `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 '.#*' | sort` |\
657 tardy --user_number=0 --user_name=openssl \
658 --group_number=0 --group_name=openssl \
659 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
663 $(PERL) Configure dist
665 @$(MAKE) SDIRS='${SDIRS}' clean
669 (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
671 install: all install_docs
672 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
673 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
674 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
675 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
676 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
677 $(INSTALL_PREFIX)$(OPENSSLDIR)/private \
678 $(INSTALL_PREFIX)$(OPENSSLDIR)/lib
679 @for i in $(EXHEADER) ;\
681 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
682 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
686 if [ -d "$$i" ]; then \
687 (cd $$i; echo "installing $$i..."; \
688 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
693 if [ -f "$$i" ]; then \
694 ( echo installing $$i; \
695 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
696 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
697 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
700 @if [ -n "$(SHARED_LIBS)" ]; then \
701 tmp="$(SHARED_LIBS)"; \
702 for i in $${tmp:-x}; \
704 if [ -f "$$i" -o -f "$$i.a" ]; then \
705 ( echo installing $$i; \
706 if [ "$(PLATFORM)" != "CygWin32" ]; then \
707 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
708 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
710 c=`echo $$i | sed 's/^lib/cyg/'`; \
711 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
712 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
713 cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
714 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
719 cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
720 make -f $$here/Makefile link-shared ); \
724 @$(PERL) $(TOP)/util/mkdir-p.pl \
725 $(INSTALL_PREFIX)$(MANDIR)/man1 \
726 $(INSTALL_PREFIX)$(MANDIR)/man3 \
727 $(INSTALL_PREFIX)$(MANDIR)/man5 \
728 $(INSTALL_PREFIX)$(MANDIR)/man7
729 @for i in doc/apps/*.pod; do \
730 fn=`basename $$i .pod`; \
731 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
732 echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
734 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
735 --release=$(VERSION) `basename $$i`) \
736 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
738 @for i in doc/crypto/*.pod doc/ssl/*.pod; do \
739 fn=`basename $$i .pod`; \
740 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
741 echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
743 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
744 --release=$(VERSION) `basename $$i`) \
745 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
748 # DO NOT DELETE THIS LINE -- make depend depends on it.