2 ## Makefile for OpenSSL
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.
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.
27 INSTALLTOP=/usr/local/ssl
29 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
30 OPENSSLDIR=/usr/local/ssl
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.
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
58 # PKCS1_CHECK - pkcs1 tests.
74 TARFLAGS= --no-recursion
75 MAKEDEPPROG=makedepend
78 # We let the C compiler driver to take care of .s files. This is done in
79 # order to be excused from maintaining a separate set of architecture
80 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
81 # gcc, then the driver will automatically translate it to -xarch=v8plus
82 # and pass it down to assembler.
86 # For x86 assembler: Set PROCESSOR to 386 if you want to support
90 # CPUID module collects small commonly used assembler snippets
94 DES_ENC= des_enc.o fcrypt_b.o
95 AES_ENC= aes_core.o aes_cbc.o
117 # This is the location of fipscanister.o and friends.
118 # The FIPS module build will place it $(INSTALLTOP)/lib
119 # but since $(INSTALLTOP) can only take the default value
120 # when the module is built it will be in /usr/local/ssl/lib
121 # $(INSTALLTOP) for this build may be different so hard
124 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
126 # The location of the library which contains fipscanister.o
127 # normally it will be libcrypto. If not compiling in FIPS mode
128 # at all this is empty making it a useful test for a FIPS compile.
132 # Shared library base address. Currently only used on Windows.
137 DIRS= crypto ssl engines apps test tools
139 SHLIBDIRS= crypto ssl
141 # dirs in crypto to build
144 md2 md4 md5 sha mdc2 hmac ripemd whrlpool \
145 des aes rc2 rc4 rc5 idea bf cast camellia seed modes \
146 bn ec rsa dsa ecdsa dh ecdh dso engine \
147 buffer bio stack lhash rand err \
148 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
149 cms pqueue ts jpake srp store cmac
150 # keep in mind that the above list is adjusted by ./Configure
151 # according to no-xxx arguments...
153 # tests to perform. "alltests" is a special word indicating that all tests
154 # should be performed.
159 MANDIR=$(OPENSSLDIR)/man
164 HTMLDIR=$(OPENSSLDIR)/html
169 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
171 LIBS= libcrypto.a libssl.a
172 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
173 SHARED_SSL=libssl$(SHLIB_EXT)
175 SHARED_LIBS_LINK_EXTS=
180 NAME= $(BASENAME)-$(VERSION)
182 WTARFILE= $(NAME)-win.tar
186 # Directories created on install if they don't exist.
188 $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
189 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
190 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
191 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
192 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
193 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
194 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
195 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
197 all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
199 # as we stick to -e, CLEARENV ensures that local variables in lower
200 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
201 # shell, which [annoyingly enough] terminates unset with error if VAR
202 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
203 # which terminates unset with error if no variable was present:-(
204 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
205 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
206 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
207 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
208 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
209 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
210 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
211 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
212 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
213 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
215 BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
216 CC='$(CC)' CFLAG='$(CFLAG)' \
217 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
218 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
219 CROSS_COMPILE='$(CROSS_COMPILE)' \
220 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
221 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
222 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
223 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
225 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
226 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
227 MAKEDEPPROG='$(MAKEDEPPROG)' \
228 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
229 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
230 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
231 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
232 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
233 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
234 CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
235 EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \
236 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
237 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
238 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
239 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
240 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
241 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
242 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
243 MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
244 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
245 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
246 FIPSLIBDIR='${FIPSLIBDIR}' \
247 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
248 FIPS_EX_OBJ='${FIPS_EX_OBJ}' \
249 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
250 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
251 # which in turn eliminates ambiguities in variable treatment with -e.
253 # BUILD_CMD is a generic macro to build a given target in a given
254 # subdirectory. The target must be given through the shell variable
255 # `target' and the subdirectory to build in must be given through `dir'.
256 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
257 # BUILD_ONE_CMD instead.
259 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
260 # subdirectories defined in $(DIRS). It requires that the target
261 # is given through the shell variable `target'.
263 # BUILD_ONE_CMD is a macro to build a given target in a given
264 # subdirectory if that subdirectory is part of $(DIRS). It requires
265 # exactly the same shell variables as BUILD_CMD.
266 BUILD_CMD= if [ -d "$$dir" ]; then \
267 ( cd $$dir && echo "making $$target in $$dir..." && \
268 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
271 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
273 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
278 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
280 FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
281 ../crypto/aes/aes_ecb.o \
282 ../crypto/aes/aes_ofb.o \
283 ../crypto/bn/bn_add.o \
284 ../crypto/bn/bn_blind.o \
285 ../crypto/bn/bn_ctx.o \
286 ../crypto/bn/bn_div.o \
287 ../crypto/bn/bn_exp2.o \
288 ../crypto/bn/bn_exp.o \
289 ../crypto/bn/bn_gcd.o \
290 ../crypto/bn/bn_gf2m.o \
291 ../crypto/bn/bn_lib.o \
292 ../crypto/bn/bn_mod.o \
293 ../crypto/bn/bn_mont.o \
294 ../crypto/bn/bn_mul.o \
295 ../crypto/bn/bn_nist.o \
296 ../crypto/bn/bn_prime.o \
297 ../crypto/bn/bn_rand.o \
298 ../crypto/bn/bn_recp.o \
299 ../crypto/bn/bn_shift.o \
300 ../crypto/bn/bn_sqr.o \
301 ../crypto/bn/bn_word.o \
302 ../crypto/bn/bn_x931p.o \
303 ../crypto/buffer/buf_str.o \
304 ../crypto/cmac/cmac.o \
305 ../crypto/cryptlib.o \
306 ../crypto/des/cfb64ede.o \
307 ../crypto/des/cfb64enc.o \
308 ../crypto/des/cfb_enc.o \
309 ../crypto/des/ecb3_enc.o \
310 ../crypto/des/ofb64ede.o \
311 ../crypto/des/fcrypt.o \
312 ../crypto/des/set_key.o \
313 ../crypto/dh/dh_check.o \
314 ../crypto/dh/dh_gen.o \
315 ../crypto/dh/dh_key.o \
316 ../crypto/dsa/dsa_gen.o \
317 ../crypto/dsa/dsa_key.o \
318 ../crypto/dsa/dsa_ossl.o \
319 ../crypto/ec/ec_curve.o \
320 ../crypto/ec/ec_cvt.o \
321 ../crypto/ec/ec_key.o \
322 ../crypto/ec/ec_lib.o \
323 ../crypto/ec/ecp_mont.o \
324 ../crypto/ec/ec_mult.o \
325 ../crypto/ec/ecp_nist.o \
326 ../crypto/ec/ecp_smpl.o \
327 ../crypto/ec/ec2_mult.o \
328 ../crypto/ec/ec2_smpl.o \
329 ../crypto/ecdh/ech_key.o \
330 ../crypto/ecdh/ech_ossl.o \
331 ../crypto/ecdsa/ecs_ossl.o \
332 ../crypto/evp/e_aes.o \
333 ../crypto/evp/e_des3.o \
334 ../crypto/evp/e_null.o \
335 ../crypto/evp/m_sha1.o \
336 ../crypto/evp/m_dss1.o \
337 ../crypto/evp/m_dss.o \
338 ../crypto/evp/m_ecdsa.o \
339 ../crypto/hmac/hmac.o \
340 ../crypto/modes/cbc128.o \
341 ../crypto/modes/ccm128.o \
342 ../crypto/modes/cfb128.o \
343 ../crypto/modes/ctr128.o \
344 ../crypto/modes/gcm128.o \
345 ../crypto/modes/ofb128.o \
346 ../crypto/modes/xts128.o \
347 ../crypto/rsa/rsa_eay.o \
348 ../crypto/rsa/rsa_gen.o \
349 ../crypto/rsa/rsa_crpt.o \
350 ../crypto/rsa/rsa_none.o \
351 ../crypto/rsa/rsa_oaep.o \
352 ../crypto/rsa/rsa_pk1.o \
353 ../crypto/rsa/rsa_pss.o \
354 ../crypto/rsa/rsa_ssl.o \
355 ../crypto/rsa/rsa_x931.o \
356 ../crypto/rsa/rsa_x931g.o \
357 ../crypto/sha/sha1dgst.o \
358 ../crypto/sha/sha256.o \
359 ../crypto/sha/sha512.o \
365 build_all: build_libs build_apps build_tests build_tools
367 build_libs: build_crypto build_ssl build_engines
370 @dir=crypto; target=all; $(BUILD_ONE_CMD)
371 build_ssl: build_crypto
372 @dir=ssl; target=all; $(BUILD_ONE_CMD)
373 build_engines: build_crypto
374 @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
376 build_apps: build_libs
377 @dir=apps; target=all; $(BUILD_ONE_CMD)
378 build_tests: build_libs
379 @dir=test; target=all; $(BUILD_ONE_CMD)
380 build_tools: build_libs
381 @dir=tools; target=all; $(BUILD_ONE_CMD)
383 all_testapps: build_libs build_testapps
385 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
387 libcrypto$(SHLIB_EXT): libcrypto.a
388 @if [ "$(SHLIB_TARGET)" != "" ]; then \
389 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
390 FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
391 export CC FIPSLD_CC; \
393 $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
395 echo "There's no support for shared libraries on this platform" >&2; \
399 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
400 @if [ "$(SHLIB_TARGET)" != "" ]; then \
401 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
403 echo "There's no support for shared libraries on this platform" >&2; \
408 @set -e; for i in $(SHLIBDIRS); do \
409 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
410 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
411 for j in $${tmp:-x}; do \
412 ( set -x; rm -f lib$$i$$j ); \
415 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
416 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
417 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
422 @ set -e; for i in $(SHLIBDIRS); do \
423 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
424 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
425 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
426 symlink.$(SHLIB_TARGET); \
427 libs="$$libs -l$$i"; \
430 build-shared: do_$(SHLIB_TARGET) link-shared
433 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
434 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
435 libs="$(LIBKRB5) $$libs"; \
437 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
438 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
439 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
440 LIBDEPS="$$libs $(EX_LIBS)" \
441 link_a.$(SHLIB_TARGET); \
442 libs="-l$$i $$libs"; \
445 libcrypto.pc: Makefile
446 @ ( echo 'prefix=$(INSTALLTOP)'; \
447 echo 'exec_prefix=$${prefix}'; \
448 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
449 echo 'includedir=$${prefix}/include'; \
451 echo 'Name: OpenSSL-libcrypto'; \
452 echo 'Description: OpenSSL cryptography library'; \
453 echo 'Version: '$(VERSION); \
455 echo 'Libs: -L$${libdir} -lcrypto'; \
456 echo 'Libs.private: $(EX_LIBS)'; \
457 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
460 @ ( echo 'prefix=$(INSTALLTOP)'; \
461 echo 'exec_prefix=$${prefix}'; \
462 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
463 echo 'includedir=$${prefix}/include'; \
465 echo 'Name: OpenSSL-libssl'; \
466 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
467 echo 'Version: '$(VERSION); \
468 echo 'Requires.private: libcrypto'; \
469 echo 'Libs: -L$${libdir} -lssl'; \
470 echo 'Libs.private: $(EX_LIBS)'; \
471 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
474 @ ( echo 'prefix=$(INSTALLTOP)'; \
475 echo 'exec_prefix=$${prefix}'; \
476 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
477 echo 'includedir=$${prefix}/include'; \
479 echo 'Name: OpenSSL'; \
480 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
481 echo 'Version: '$(VERSION); \
482 echo 'Requires: libssl libcrypto' ) > openssl.pc
484 Makefile: Makefile.org Configure config
485 @echo "Makefile is older than Makefile.org, Configure or config."
486 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
490 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
493 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
494 rm -rf *.bak certs/.0
495 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
496 rm -f $(LIBS) tags TAGS
497 rm -f openssl.pc libssl.pc libcrypto.pc
500 @set -e; for i in $(ONEDIRS) ;\
506 $(PERL) util/mk1mf.pl >makefile.one; \
510 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
511 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
514 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
515 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
516 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
519 @(cd test && echo "generating dummy tests (if needed)..." && \
520 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
523 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
526 rehash.time: certs apps
527 @if [ -z "$(CROSS_COMPILE)" ]; then \
528 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
529 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
530 OPENSSL_DEBUG_MEMORY=on; \
531 export OPENSSL OPENSSL_DEBUG_MEMORY; \
532 $(PERL) tools/c_rehash certs/demo) && \
539 @(cd test && echo "testing..." && \
540 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
541 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
544 @$(PERL) util/selftest.pl
547 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
550 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
560 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
561 $(PERL) util/mkerr.pl -recurse -write
562 (cd engines; $(MAKE) PERL=$(PERL) errors)
565 $(PERL) util/mkstack.pl -write
568 $(PERL) util/mkdef.pl crypto update
571 $(PERL) util/mkdef.pl ssl update
573 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
574 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
575 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
576 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
577 crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
578 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
580 apps/openssl-vms.cnf: apps/openssl.cnf
581 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
583 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
584 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
588 (echo 'Output of `Configure TABLE'"':"; \
589 $(PERL) Configure TABLE) > TABLE
591 update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
593 # Build distribution tar-file. As the list of files returned by "find" is
594 # pretty long, on several platforms a "too many arguments" error or similar
595 # would occur. Therefore the list of files is temporarily stored into a file
596 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
597 # tar does not support the --files-from option.
599 find . -type d -print | xargs chmod 755
600 find . -type f -print | xargs chmod a+r
601 find . -type f -perm -0100 -print | xargs chmod a+x
602 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
603 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
604 tardy --user_number=0 --user_name=openssl \
605 --group_number=0 --group_name=openssl \
606 --prefix=openssl-$(VERSION) - |\
607 gzip --best >../$(TARFILE).gz; \
608 rm -f ../$(TARFILE).list; \
609 ls -l ../$(TARFILE).gz
612 @$(TAR) $(TARFLAGS) -cvf - \
613 `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` |\
614 tardy --user_number=0 --user_name=openssl \
615 --group_number=0 --group_name=openssl \
616 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
620 $(PERL) Configure dist
622 @$(MAKE) SDIRS='$(SDIRS)' clean
623 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
626 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
628 install: all install_docs install_sw
630 uninstall: uninstall_sw uninstall_docs
633 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS)
634 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
636 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
637 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
639 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
640 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
642 if [ -f "$$i" ]; then \
643 ( echo installing $$i; \
644 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
645 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
646 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
647 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
650 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
651 tmp="$(SHARED_LIBS)"; \
652 for i in $${tmp:-x}; \
654 if [ -f "$$i" -o -f "$$i.a" ]; then \
655 ( echo installing $$i; \
656 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
657 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
658 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
659 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
660 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
661 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
662 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
663 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
665 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
666 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
667 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
669 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
671 *crypto*) i=libeay32.dll;; \
672 *ssl*) i=ssleay32.dll;; \
674 echo installing $$i; \
675 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
676 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
677 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
682 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
683 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
684 if [ "$(INSTALLTOP)" != "/usr" ]; then \
685 echo 'OpenSSL shared libraries have been installed in:'; \
686 echo ' $(INSTALLTOP)'; \
688 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
691 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
692 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
693 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
694 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
695 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
696 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
699 cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files
703 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \
704 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
706 @if [ -n "$(SHARED_LIBS)" ]; then \
707 tmp="$(SHARED_LIBS)"; \
708 for i in $${tmp:-x}; \
710 if [ -f "$$i" -o -f "$$i.a" ]; then \
711 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
712 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
713 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
714 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
715 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
716 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
718 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
719 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
721 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
723 *crypto*) i=libeay32.dll;; \
724 *ssl*) i=ssleay32.dll;; \
726 echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
727 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
732 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
733 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
734 $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
735 @target=uninstall; $(RECURSIVE_BUILD_CMD)
740 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
743 for subdir in apps crypto ssl; do \
744 $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
745 for i in doc/$$subdir/*.pod; do \
746 fn=`basename $$i .pod`; \
747 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
749 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
750 | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
751 | sed -r 's/<!DOCTYPE.*//g' \
752 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
753 $(PERL) util/extract-names.pl < $$i | \
754 grep -v $$filecase "^$$fn\$$" | \
755 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
757 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
765 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
768 for subdir in apps crypto ssl; do \
769 for i in doc/$$subdir/*.pod; do \
770 fn=`basename $$i .pod`; \
771 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
772 $(PERL) util/extract-names.pl < $$i | \
773 grep -v $$filecase "^$$fn\$$" | \
775 $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \
781 @$(PERL) $(TOP)/util/mkdir-p.pl \
782 $(INSTALL_PREFIX)$(MANDIR)/man1 \
783 $(INSTALL_PREFIX)$(MANDIR)/man3 \
784 $(INSTALL_PREFIX)$(MANDIR)/man5 \
785 $(INSTALL_PREFIX)$(MANDIR)/man7
788 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
791 set -e; for i in doc/apps/*.pod; do \
792 fn=`basename $$i .pod`; \
793 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
794 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
795 (cd `$(PERL) util/dirname.pl $$i`; \
797 --section=$$sec --center=OpenSSL \
798 --release=$(VERSION) `basename $$i`) \
799 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
800 $(PERL) util/extract-names.pl < $$i | \
801 (grep -v $$filecase "^$$fn\$$"; true) | \
802 (grep -v "[ ]"; true) | \
803 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
805 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
808 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
809 fn=`basename $$i .pod`; \
810 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
811 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
812 (cd `$(PERL) util/dirname.pl $$i`; \
814 --section=$$sec --center=OpenSSL \
815 --release=$(VERSION) `basename $$i`) \
816 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
817 $(PERL) util/extract-names.pl < $$i | \
818 (grep -v $$filecase "^$$fn\$$"; true) | \
819 (grep -v "[ ]"; true) | \
820 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
822 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
829 case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
832 for i in doc/apps/*.pod; do \
833 fn=`basename $$i .pod`; \
834 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
835 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
836 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
837 $(PERL) util/extract-names.pl < $$i | \
838 (grep -v $$filecase "^$$fn\$$"; true) | \
839 (grep -v "[ ]"; true) | \
841 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
842 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
845 for i in doc/crypto/*.pod doc/ssl/*.pod; do \
846 fn=`basename $$i .pod`; \
847 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
848 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
849 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
850 $(PERL) util/extract-names.pl < $$i | \
851 (grep -v $$filecase "^$$fn\$$"; true) | \
852 (grep -v "[ ]"; true) | \
854 echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
855 $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \
859 # DO NOT DELETE THIS LINE -- make depend depends on it.