Back to home page

openssl Cross Reference

 
 

    


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