Back to home page

openssl Cross Reference

 
 

    


0001 ### Generated automatically from Makefile.org by Configure.
0002 
0003 ##
0004 ## Makefile for OpenSSL
0005 ##
0006 
0007 VERSION=1.0.1h
0008 MAJOR=1
0009 MINOR=0.1
0010 SHLIB_VERSION_NUMBER=1.0.0
0011 SHLIB_VERSION_HISTORY=
0012 SHLIB_MAJOR=1
0013 SHLIB_MINOR=0.0
0014 SHLIB_EXT=
0015 PLATFORM=dist
0016 OPTIONS= no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-shared no-store no-zlib no-zlib-dynamic static-engine
0017 CONFIGURE_ARGS=dist
0018 SHLIB_TARGET=
0019 
0020 # HERE indicates where this Makefile lives.  This can be used to indicate
0021 # where sub-Makefiles are expected to be.  Currently has very limited usage,
0022 # and should probably not be bothered with at all.
0023 HERE=.
0024 
0025 # INSTALL_PREFIX is for package builders so that they can configure
0026 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
0027 # Normally it is left empty.
0028 INSTALL_PREFIX=
0029 INSTALLTOP=/usr/local/ssl
0030 
0031 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
0032 OPENSSLDIR=/usr/local/ssl
0033 
0034 # NO_IDEA - Define to build without the IDEA algorithm
0035 # NO_RC4  - Define to build without the RC4 algorithm
0036 # NO_RC2  - Define to build without the RC2 algorithm
0037 # THREADS - Define when building with threads, you will probably also need any
0038 #           system defines as well, i.e. _REENTERANT for Solaris 2.[34]
0039 # TERMIO  - Define the termio terminal subsystem, needed if sgtty is missing.
0040 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
0041 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
0042 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
0043 #           one.  32 bytes will be read from this when the random
0044 #           number generator is initalised.
0045 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
0046 #           NULL encryption ciphers.
0047 #
0048 # LOCK_DEBUG - turns on lots of lock debug output :-)
0049 # REF_CHECK - turn on some xyz_free() assertions.
0050 # REF_PRINT - prints some stuff on structure free.
0051 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
0052 # MFUNC - Make all Malloc/Free/Realloc calls call
0053 #       CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
0054 #       call application defined callbacks via CRYPTO_set_mem_functions()
0055 # MD5_ASM needs to be defined to use the x86 assembler for MD5
0056 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
0057 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
0058 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8.  It must
0059 # equal 4.
0060 # PKCS1_CHECK - pkcs1 tests.
0061 
0062 CC= cc
0063 CFLAG= -O
0064 DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
0065 PEX_LIBS= 
0066 EX_LIBS= 
0067 EXE_EXT= 
0068 ARFLAGS= 
0069 AR= ar $(ARFLAGS) r
0070 RANLIB= /usr/bin/ranlib
0071 NM= nm
0072 PERL= /usr/bin/perl
0073 TAR= tar
0074 TARFLAGS= --no-recursion --record-size=10240
0075 MAKEDEPPROG=makedepend
0076 LIBDIR=lib
0077 
0078 # We let the C compiler driver to take care of .s files. This is done in
0079 # order to be excused from maintaining a separate set of architecture
0080 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
0081 # gcc, then the driver will automatically translate it to -xarch=v8plus
0082 # and pass it down to assembler.
0083 AS=$(CC) -c
0084 ASFLAG=$(CFLAG)
0085 
0086 # For x86 assembler: Set PROCESSOR to 386 if you want to support
0087 # the 80386.
0088 PROCESSOR= 
0089 
0090 # CPUID module collects small commonly used assembler snippets
0091 CPUID_OBJ= mem_clr.o
0092 BN_ASM= bn_asm.o
0093 DES_ENC= des_enc.o fcrypt_b.o
0094 AES_ENC= aes_core.o aes_cbc.o
0095 BF_ENC= bf_enc.o
0096 CAST_ENC= c_enc.o
0097 RC4_ENC= rc4_enc.o rc4_skey.o
0098 RC5_ENC= rc5_enc.o
0099 MD5_ASM_OBJ= 
0100 SHA1_ASM_OBJ= 
0101 RMD160_ASM_OBJ= 
0102 WP_ASM_OBJ= wp_block.o
0103 CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
0104 MODES_ASM_OBJ= 
0105 ENGINES_ASM_OBJ= 
0106 PERLASM_SCHEME= 
0107 
0108 # KRB5 stuff
0109 KRB5_INCLUDES=
0110 LIBKRB5=
0111 
0112 # Zlib stuff
0113 ZLIB_INCLUDE=
0114 LIBZLIB=
0115 
0116 # TOP level FIPS install directory.
0117 FIPSDIR=/usr/local/ssl/fips-2.0
0118 
0119 # This is the location of fipscanister.o and friends.
0120 # The FIPS module build will place it $(INSTALLTOP)/lib
0121 # but since $(INSTALLTOP) can only take the default value
0122 # when the module is built it will be in /usr/local/ssl/lib
0123 # $(INSTALLTOP) for this build may be different so hard
0124 # code the path.
0125 
0126 FIPSLIBDIR=
0127 
0128 # The location of the library which contains fipscanister.o
0129 # normally it will be libcrypto unless fipsdso is set in which
0130 # case it will be libfips. If not compiling in FIPS mode at all
0131 # this is empty making it a useful test for a FIPS compile.
0132 
0133 FIPSCANLIB=
0134 
0135 # Shared library base address. Currently only used on Windows.
0136 #
0137 
0138 BASEADDR=0xFB00000
0139 
0140 DIRS=   crypto ssl engines apps test tools
0141 ENGDIRS= ccgost
0142 SHLIBDIRS= crypto ssl
0143 
0144 # dirs in crypto to build
0145 SDIRS=  \
0146         objects \
0147         md4 md5 sha mdc2 hmac ripemd whrlpool \
0148         des aes rc2 rc4 idea bf cast camellia seed modes \
0149         bn ec rsa dsa ecdsa dh ecdh dso engine \
0150         buffer bio stack lhash rand err \
0151         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
0152         cms pqueue ts srp cmac
0153 # keep in mind that the above list is adjusted by ./Configure
0154 # according to no-xxx arguments...
0155 
0156 # tests to perform.  "alltests" is a special word indicating that all tests
0157 # should be performed.
0158 TESTS = alltests
0159 
0160 MAKEFILE= Makefile
0161 
0162 MANDIR=$(OPENSSLDIR)/man
0163 MAN1=1
0164 MAN3=3
0165 MANSUFFIX=
0166 HTMLSUFFIX=html
0167 HTMLDIR=$(OPENSSLDIR)/html
0168 SHELL=/bin/sh
0169 
0170 TOP=    .
0171 ONEDIRS=out tmp
0172 EDIRS=  times doc bugs util 
0173 (SHLIB_EXT)
0174 SHARED_SSL=libssl$(SHLIB_EXT)
0175 SHARED_LIBS=
0176 SHARED_LIBS_LINK_EXTS=
0177 SHARED_LDFLAGS=
0178 
0179 GENERAL=        Makefile
0180 BASENAME=       openssl
0181 NAME=           $(BASENAME)-$(VERSION)
0182 TARFILE=        $(NAME).tar
0183 WTARFILE=       $(NAME)-win.tar
0184 EXHEADER=       e_os2.h
0185 HEADER=         e_os.h
0186 
0187 all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
0188 
0189 # as we stick to -e, CLEARENV ensures that local variables in lower
0190 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
0191 # shell, which [annoyingly enough] terminates unset with error if VAR
0192 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
0193 # which terminates unset with error if no variable was present:-(
0194 CLEARENV=       TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}     \
0195                 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES}       \
0196                 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC}           \
0197                 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
0198                 $${EXHEADER+EXHEADER} $${HEADER+HEADER}         \
0199                 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS}           \
0200                 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS}           \
0201                 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
0202                 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS}     \
0203                 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
0204 
0205 BUILDENV=       PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
0206                 CC='$(CC)' CFLAG='$(CFLAG)'                     \
0207                 AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
0208                 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
0209                 CROSS_COMPILE='$(CROSS_COMPILE)'        \
0210                 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
0211                 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'     \
0212                 INSTALL_PREFIX='$(INSTALL_PREFIX)'              \
0213                 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)'   \
0214                 LIBDIR='$(LIBDIR)'                              \
0215                 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
0216                 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)'    \
0217                 MAKEDEPPROG='$(MAKEDEPPROG)'                    \
0218                 SHARED_LDFLAGS='$(SHARED_LDFLAGS)'              \
0219                 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)'   \
0220                 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)'     \
0221                 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'       \
0222                 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
0223                 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)'     \
0224                 CPUID_OBJ='$(CPUID_OBJ)'                        \
0225                 BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)'         \
0226                 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)'     \
0227                 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)'       \
0228                 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)'       \
0229                 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)'                  \
0230                 MD5_ASM_OBJ='$(MD5_ASM_OBJ)'                    \
0231                 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)'              \
0232                 WP_ASM_OBJ='$(WP_ASM_OBJ)'                      \
0233                 MODES_ASM_OBJ='$(MODES_ASM_OBJ)'                \
0234                 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)'            \
0235                 PERLASM_SCHEME='$(PERLASM_SCHEME)'              \
0236                 FIPSLIBDIR='${FIPSLIBDIR}'                      \
0237                 FIPSDIR='${FIPSDIR}'                            \
0238                 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}"      \
0239                 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
0240 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
0241 # which in turn eliminates ambiguities in variable treatment with -e.
0242 
0243 # BUILD_CMD is a generic macro to build a given target in a given
0244 # subdirectory.  The target must be given through the shell variable
0245 # `target' and the subdirectory to build in must be given through `dir'.
0246 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
0247 # BUILD_ONE_CMD instead.
0248 #
0249 # BUILD_ONE_CMD is a macro to build a given target in a given
0250 # subdirectory if that subdirectory is part of $(DIRS).  It requires
0251 # exactly the same shell variables as BUILD_CMD.
0252 #
0253 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
0254 # subdirectories defined in $(DIRS).  It requires that the target
0255 # is given through the shell variable `target'.
0256 BUILD_CMD=  if [ -d "$$dir" ]; then \
0257             (   cd $$dir && echo "making $$target in $$dir..." && \
0258                 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
0259             ) || exit 1; \
0260             fi
0261 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
0262 BUILD_ONE_CMD=\
0263         if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
0264                 $(BUILD_CMD); \
0265         fi
0266 
0267 reflect:
0268         @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
0269 
0270 sub_all: build_all
0271 build_all: build_libs build_apps build_tests build_tools
0272 
0273 build_libs: build_crypto build_ssl build_engines
0274 
0275 build_crypto:
0276         @dir=crypto; target=all; $(BUILD_ONE_CMD)
0277 build_ssl:
0278         @dir=ssl; target=all; $(BUILD_ONE_CMD)
0279 build_engines:
0280         @dir=engines; target=all; $(BUILD_ONE_CMD)
0281 build_apps:
0282         @dir=apps; target=all; $(BUILD_ONE_CMD)
0283 build_tests:
0284         @dir=test; target=all; $(BUILD_ONE_CMD)
0285 build_tools:
0286         @dir=tools; target=all; $(BUILD_ONE_CMD)
0287 
0288 all_testapps: build_libs build_testapps
0289 build_testapps:
0290         @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
0291 
0292 fips_premain_dso$(EXE_EXT): libcrypto.a
0293         [ -z "$(FIPSCANLIB)" ] || $(CC) $(CFLAG) -I @  \
0294                 $(FIPSLIBDIR)fips_premain.c $(FIPSLIBDIR)fipscanister.o \
0295                 libcrypto.a $(EX_LIBS)
0296 
0297 libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
0298         @if [ "$(SHLIB_TARGET)" != "" ]; then \
0299                 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
0300                         FIPSLD_LIBCRYPTO=libcrypto.a ; \
0301                         FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \
0302                         export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \
0303                 fi; \
0304                 $(MAKE) -e SHLIBDIRS=crypto  CC="$${CC:-$(CC)}" build-shared && \
0305                 (touch -c fips_premain_dso$(EXE_EXT) || :); \
0306         else \
0307                 echo "There's no support for shared libraries on this platform" >&2; \
0308                 exit 1; \
0309         fi
0310 
0311 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
0312         @if [ "$(SHLIB_TARGET)" != "" ]; then \
0313                 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
0314         else \
0315                 echo "There's no support for shared libraries on this platform" >&2; \
0316                 exit 1; \
0317         fi
0318 
0319 clean-shared:
0320         @set -e; for i in $(SHLIBDIRS); do \
0321                 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
0322                         tmp="$(SHARED_LIBS_LINK_EXTS)"; \
0323                         for j in $${tmp:-x}; do \
0324                                 ( set -x; rm -f lib$$i$$j ); \
0325                         done; \
0326                 fi; \
0327                 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
0328                 if [ "$(PLATFORM)" = "Cygwin" ]; then \
0329                         ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
0330                 fi; \
0331         done
0332 
0333 link-shared:
0334         @ set -e; for i in $(SHLIBDIRS); do \
0335                 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
0336                         LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
0337                         LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
0338                         symlink.$(SHLIB_TARGET); \
0339                 libs="$$libs -l$$i"; \
0340         done
0341 
0342 build-shared: do_$(SHLIB_TARGET) link-shared
0343 
0344 do_$(SHLIB_TARGET):
0345         @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
0346                 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
0347                         libs="$(LIBKRB5) $$libs"; \
0348                 fi; \
0349                 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
0350                         LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
0351                         LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
0352                         LIBDEPS="$$libs $(EX_LIBS)" \
0353                         link_a.$(SHLIB_TARGET); \
0354                 libs="-l$$i $$libs"; \
0355         done
0356 
0357 libcrypto.pc: Makefile
0358         @ ( echo 'prefix=$(INSTALLTOP)'; \
0359             echo 'exec_prefix=$${prefix}'; \
0360             echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
0361             echo 'includedir=$${prefix}/include'; \
0362             echo ''; \
0363             echo 'Name: OpenSSL-libcrypto'; \
0364             echo 'Description: OpenSSL cryptography library'; \
0365             echo 'Version: '$(VERSION); \
0366             echo 'Requires: '; \
0367             echo 'Libs: -L$${libdir} -lcrypto'; \
0368             echo 'Libs.private: $(EX_LIBS)'; \
0369             echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
0370 
0371 libssl.pc: Makefile
0372         @ ( echo 'prefix=$(INSTALLTOP)'; \
0373             echo 'exec_prefix=$${prefix}'; \
0374             echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
0375             echo 'includedir=$${prefix}/include'; \
0376             echo ''; \
0377             echo 'Name: OpenSSL'; \
0378             echo 'Description: Secure Sockets Layer and cryptography libraries'; \
0379             echo 'Version: '$(VERSION); \
0380             echo 'Requires: '; \
0381             echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
0382             echo 'Libs.private: $(EX_LIBS)'; \
0383             echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
0384 
0385 openssl.pc: Makefile
0386         @ ( echo 'prefix=$(INSTALLTOP)'; \
0387             echo 'exec_prefix=$${prefix}'; \
0388             echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
0389             echo 'includedir=$${prefix}/include'; \
0390             echo ''; \
0391             echo 'Name: OpenSSL'; \
0392             echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
0393             echo 'Version: '$(VERSION); \
0394             echo 'Requires: '; \
0395             echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
0396             echo 'Libs.private: $(EX_LIBS)'; \
0397             echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
0398 
0399 Makefile: Makefile.org Configure config
0400         @echo "Makefile is older than Makefile.org, Configure or config."
0401         @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
0402         @false
0403 
0404 libclean:
0405         rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
0406 
0407 clean:  libclean
0408         rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
0409         @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
0410         rm -f $(LIBS)
0411         rm -f openssl.pc libssl.pc libcrypto.pc
0412         rm -f speed.* .pure
0413         rm -f $(TARFILE)
0414         @set -e; for i in $(ONEDIRS) ;\
0415         do \
0416         rm -fr $$i/*; \
0417         done
0418 
0419 makefile.one: files
0420         $(PERL) util/mk1mf.pl >makefile.one; \
0421         sh util/do_ms.sh
0422 
0423 files:
0424         $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
0425         @set -e; target=files; $(RECURSIVE_BUILD_CMD)
0426 
0427 links:
0428         @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
0429         @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
0430         @set -e; target=links; $(RECURSIVE_BUILD_CMD)
0431 
0432 gentests:
0433         @(cd test && echo "generating dummy tests (if needed)..." && \
0434         $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
0435 
0436 dclean:
0437         rm -rf *.bak include/openssl certs/.0
0438         @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
0439 
0440 rehash: rehash.time
0441 rehash.time: certs apps
0442         @if [ -z "$(CROSS_COMPILE)" ]; then \
0443                 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
0444                 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
0445                 OPENSSL_DEBUG_MEMORY=on; \
0446                 export OPENSSL OPENSSL_DEBUG_MEMORY; \
0447                 $(PERL) tools/c_rehash certs/demo) && \
0448                 touch rehash.time; \
0449         else :; fi
0450 
0451 test:   tests
0452 
0453 tests: rehash
0454         @(cd test && echo "testing..." && \
0455         $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
0456         OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
0457 
0458 report:
0459         @$(PERL) util/selftest.pl
0460 
0461 depend:
0462         @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
0463 
0464 lint:
0465         @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
0466 
0467 tags:
0468         rm -f TAGS
0469         find . -name '[^.]*.[ch]' | xargs etags -a
0470 
0471 errors:
0472         $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
0473         $(PERL) util/mkerr.pl -recurse -write
0474         (cd engines; $(MAKE) PERL=$(PERL) errors)
0475 
0476 stacks:
0477         $(PERL) util/mkstack.pl -write
0478 
0479 util/libeay.num::
0480         $(PERL) util/mkdef.pl crypto update
0481 
0482 util/ssleay.num::
0483         $(PERL) util/mkdef.pl ssl update
0484 
0485 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
0486         $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
0487 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
0488         $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
0489 crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
0490         $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
0491 
0492 apps/openssl-vms.cnf: apps/openssl.cnf
0493         $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
0494 
0495 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
0496         $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
0497 
0498 
0499 TABLE: Configure
0500         (echo 'Output of `Configure TABLE'"':"; \
0501         $(PERL) Configure TABLE) > TABLE
0502 
0503 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
0504 
0505 # Build distribution tar-file. As the list of files returned by "find" is
0506 # pretty long, on several platforms a "too many arguments" error or similar
0507 # would occur. Therefore the list of files is temporarily stored into a file
0508 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
0509 # tar does not support the --files-from option.
0510 tar:
0511         find . -type d -print | xargs chmod 755
0512         find . -type f -print | xargs chmod a+r
0513         find . -type f -perm -0100 -print | xargs chmod a+x
0514         find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
0515         $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
0516         tardy --user_number=0  --user_name=openssl \
0517               --group_number=0 --group_name=openssl \
0518               --prefix=openssl-$(VERSION) - |\
0519         gzip --best >../$(TARFILE).gz; \
0520         rm -f ../$(TARFILE).list; \
0521         ls -l ../$(TARFILE).gz
0522 
0523 tar-snap:
0524         @$(TAR) $(TARFLAGS) -cvf - \
0525                 `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` |\
0526         tardy --user_number=0  --user_name=openssl \
0527               --group_number=0 --group_name=openssl \
0528               --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
0529         ls -l ../$(TARFILE)
0530 
0531 dist:   
0532         $(PERL) Configure dist
0533         @$(MAKE) dist_pem_h
0534         @$(MAKE) SDIRS='$(SDIRS)' clean
0535         @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
0536 
0537 dist_pem_h:
0538         (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
0539 
0540 install: all install_docs install_sw
0541 
0542 install_sw:
0543         @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
0544                 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
0545                 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
0546                 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
0547                 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
0548                 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
0549                 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
0550                 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
0551         @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
0552         do \
0553         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
0554         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
0555         done;
0556         @set -e; target=install; $(RECURSIVE_BUILD_CMD)
0557         @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
0558         do \
0559                 if [ -f "$$i" ]; then \
0560                 (       echo installing $$i; \
0561                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0562                         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0563                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0564                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
0565                 fi; \
0566         done;
0567         @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
0568                 tmp="$(SHARED_LIBS)"; \
0569                 for i in $${tmp:-x}; \
0570                 do \
0571                         if [ -f "$$i" -o -f "$$i.a" ]; then \
0572                         (       echo installing $$i; \
0573                                 if [ "$(PLATFORM)" != "Cygwin" ]; then \
0574                                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0575                                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0576                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
0577                                 else \
0578                                         c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
0579                                         cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
0580                                         chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
0581                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
0582                                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0583                                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
0584                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
0585                                 fi ); \
0586                                 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
0587                                 (       case $$i in \
0588                                                 *crypto*) i=libeay32.dll;; \
0589                                                 *ssl*)    i=ssleay32.dll;; \
0590                                         esac; \
0591                                         echo installing $$i; \
0592                                         cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
0593                                         chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
0594                                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
0595                                 fi; \
0596                         fi; \
0597                 done; \
0598                 (       here="`pwd`"; \
0599                         cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
0600                         $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
0601                 if [ "$(INSTALLTOP)" != "/usr" ]; then \
0602                         echo 'OpenSSL shared libraries have been installed in:'; \
0603                         echo '  $(INSTALLTOP)'; \
0604                         echo ''; \
0605                         sed -e '1,/^$$/d' doc/openssl-shared.txt; \
0606                 fi; \
0607         fi
0608         cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
0609         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
0610         cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
0611         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
0612         cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
0613         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
0614 
0615 install_html_docs:
0616         here="`pwd`"; \
0617         for subdir in apps crypto ssl; do \
0618                 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
0619                 for i in doc/$$subdir/*.pod; do \
0620                         fn=`basename $$i .pod`; \
0621                         echo "installing html/$$fn.$(HTMLSUFFIX)"; \
0622                         cat $$i \
0623                         | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
0624                         | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
0625                         | sed -r 's/<!DOCTYPE.*//g' \
0626                         > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
0627                         $(PERL) util/extract-names.pl < $$i | \
0628                                 grep -v $$filecase "^$$fn\$$" | \
0629                                 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
0630                                  while read n; do \
0631                                         PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
0632                                  done); \
0633                 done; \
0634         done
0635 
0636 install_docs:
0637         @$(PERL) $(TOP)/util/mkdir-p.pl \
0638                 $(INSTALL_PREFIX)$(MANDIR)/man1 \
0639                 $(INSTALL_PREFIX)$(MANDIR)/man3 \
0640                 $(INSTALL_PREFIX)$(MANDIR)/man5 \
0641                 $(INSTALL_PREFIX)$(MANDIR)/man7
0642         @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
0643         here="`pwd`"; \
0644         filecase=; \
0645         if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
0646                 filecase=-i; \
0647         fi; \
0648         set -e; for i in doc/apps/*.pod; do \
0649                 fn=`basename $$i .pod`; \
0650                 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
0651                 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
0652                 (cd `$(PERL) util/dirname.pl $$i`; \
0653                 sh -c "$$pod2man \
0654                         --section=$$sec --center=OpenSSL \
0655                         --release=$(VERSION) `basename $$i`") \
0656                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
0657                 $(PERL) util/extract-names.pl < $$i | \
0658                         (grep -v $$filecase "^$$fn\$$"; true) | \
0659                         (grep -v "[     ]"; true) | \
0660                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
0661                          while read n; do \
0662                                 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
0663                          done); \
0664         done; \
0665         set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
0666                 fn=`basename $$i .pod`; \
0667                 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
0668                 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
0669                 (cd `$(PERL) util/dirname.pl $$i`; \
0670                 sh -c "$$pod2man \
0671                         --section=$$sec --center=OpenSSL \
0672                         --release=$(VERSION) `basename $$i`") \
0673                         >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
0674                 $(PERL) util/extract-names.pl < $$i | \
0675                         (grep -v $$filecase "^$$fn\$$"; true) | \
0676                         (grep -v "[     ]"; true) | \
0677                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
0678                          while read n; do \
0679                                 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
0680                          done); \
0681         done
0682 
0683 # DO NOT DELETE THIS LINE -- make depend depends on it.