Advertisement
svenhoefer

Untitled

Aug 27th, 2019
1,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 26.35 KB | None | 0 0
  1. ### Generated automatically from Makefile.org by Configure.
  2.  
  3. ##
  4. ## Makefile for OpenSSL
  5. ##
  6.  
  7. VERSION=1.0.2s
  8. MAJOR=1
  9. MINOR=0.2
  10. SHLIB_VERSION_NUMBER=1.0.0
  11. SHLIB_VERSION_HISTORY=
  12. SHLIB_MAJOR=1
  13. SHLIB_MINOR=0.0
  14. SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
  15. PLATFORM=linux-armv4
  16. OPTIONS=enable-shared enable-threads -pipe -O2 -g -march=armv7ve -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -I/home/vanhofen/ni/buildsystem/root/include -DTERMIOS -fomit-frame-pointer -DOPENSSL_SMALL_FOOTPRINT -lcortex-strings -Wl,-O1 -Wl,-rpath,/home/vanhofen/ni/buildsystem/root/lib -Wl,-rpath-link,/home/vanhofen/ni/buildsystem/root/lib -L/home/vanhofen/ni/buildsystem/root/lib --cross-compile-prefix=arm-cortex-linux-gnueabihf- --prefix=/ --openssldir=/etc/ssl no-ec_nistp_64_gcc_128 no-engine no-fuzz-afl no-fuzz-libfuzzer no-gmp no-hw no-jpake no-krb5 no-libunbound no-md2 no-perlasm no-rc5 no-rfc3779 no-sctp no-sse2 no-ssl-trace no-ssl2 no-store no-tests no-unit-test no-weak-ssl-ciphers no-zlib no-zlib-dynamic no-static-engine
  17. CONFIGURE_ARGS=linux-armv4 shared threads no-hw no-engine no-sse2 no-perlasm no-tests no-fuzz-afl no-fuzz-libfuzzer -pipe -O2 -g -march=armv7ve -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -I/home/vanhofen/ni/buildsystem/root/include -DTERMIOS -fomit-frame-pointer -DOPENSSL_SMALL_FOOTPRINT -lcortex-strings -Wl,-O1 -Wl,-rpath,/home/vanhofen/ni/buildsystem/root/lib -Wl,-rpath-link,/home/vanhofen/ni/buildsystem/root/lib -L/home/vanhofen/ni/buildsystem/root/lib --cross-compile-prefix=arm-cortex-linux-gnueabihf- --prefix=/ --openssldir=/etc/ssl
  18. SHLIB_TARGET=linux-shared
  19.  
  20. # HERE indicates where this Makefile lives.  This can be used to indicate
  21. # where sub-Makefiles are expected to be.  Currently has very limited usage,
  22. # and should probably not be bothered with at all.
  23. HERE=.
  24.  
  25. # INSTALL_PREFIX is for package builders so that they can configure
  26. # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
  27. # Normally it is left empty.
  28. INSTALL_PREFIX=
  29. INSTALLTOP=/
  30.  
  31. # Do not edit this manually. Use Configure --openssldir=DIR do change this!
  32. OPENSSLDIR=/etc/ssl
  33.  
  34. # NO_IDEA - Define to build without the IDEA algorithm
  35. # NO_RC4  - Define to build without the RC4 algorithm
  36. # NO_RC2  - Define to build without the RC2 algorithm
  37. # THREADS - Define when building with threads, you will probably also need any
  38. #           system defines as well, i.e. _REENTERANT for Solaris 2.[34]
  39. # TERMIO  - Define the termio terminal subsystem, needed if sgtty is missing.
  40. # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
  41. # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
  42. # DEVRANDOM - Give this the value of the 'random device' if your OS supports
  43. #           one.  32 bytes will be read from this when the random
  44. #           number generator is initalised.
  45. # SSL_FORBID_ENULL - define if you want the server to be not able to use the
  46. #           NULL encryption ciphers.
  47. #
  48. # LOCK_DEBUG - turns on lots of lock debug output :-)
  49. # REF_CHECK - turn on some xyz_free() assertions.
  50. # REF_PRINT - prints some stuff on structure free.
  51. # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
  52. # MFUNC - Make all Malloc/Free/Realloc calls call
  53. #       CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
  54. #       call application defined callbacks via CRYPTO_set_mem_functions()
  55. # MD5_ASM needs to be defined to use the x86 assembler for MD5
  56. # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
  57. # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
  58. # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8.  It must
  59. # equal 4.
  60. # PKCS1_CHECK - pkcs1 tests.
  61.  
  62. CROSS_COMPILE= arm-cortex-linux-gnueabihf-
  63. CC= $(CROSS_COMPILE)gcc
  64. CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -pipe -O2 -g -march=armv7ve -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -I/home/vanhofen/ni/buildsystem/root/include -DTERMIOS -fomit-frame-pointer -DOPENSSL_SMALL_FOOTPRINT -O2 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM
  65. DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_ENGINE -DOPENSSL_NO_FUZZ_AFL -DOPENSSL_NO_FUZZ_LIBFUZZER -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_PERLASM -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPENSSL_NO_STORE -DOPENSSL_NO_TESTS -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS
  66. PEX_LIBS=
  67. EX_LIBS= -lcortex-strings -Wl,-O1 -Wl,-rpath,/home/vanhofen/ni/buildsystem/root/lib -Wl,-rpath-link,/home/vanhofen/ni/buildsystem/root/lib -L/home/vanhofen/ni/buildsystem/root/lib -ldl
  68. EXE_EXT=
  69. ARFLAGS=
  70. AR= $(CROSS_COMPILE)ar $(ARFLAGS) r
  71. RANLIB= $(CROSS_COMPILE)ranlib
  72. RC= $(CROSS_COMPILE)windres
  73. NM= $(CROSS_COMPILE)nm
  74. PERL= /usr/bin/perl
  75. TAR= tar
  76. TARFLAGS= --no-recursion
  77. MAKEDEPPROG= $(CROSS_COMPILE)gcc
  78. LIBDIR=lib
  79.  
  80. # We let the C compiler driver to take care of .s files. This is done in
  81. # order to be excused from maintaining a separate set of architecture
  82. # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
  83. # gcc, then the driver will automatically translate it to -xarch=v8plus
  84. # and pass it down to assembler.
  85. AS=$(CC) -c
  86. ASFLAG=$(CFLAG)
  87.  
  88. # For x86 assembler: Set PROCESSOR to 386 if you want to support
  89. # the 80386.
  90. PROCESSOR=
  91.  
  92. # CPUID module collects small commonly used assembler snippets
  93. CPUID_OBJ= armcap.o armv4cpuid.o
  94. BN_ASM= bn_asm.o armv4-mont.o armv4-gf2m.o
  95. EC_ASM=
  96. DES_ENC= des_enc.o fcrypt_b.o
  97. AES_ENC= aes_cbc.o aes-armv4.o bsaes-armv7.o aesv8-armx.o
  98. BF_ENC= bf_enc.o
  99. CAST_ENC= c_enc.o
  100. RC4_ENC= rc4_enc.o rc4_skey.o
  101. RC5_ENC= rc5_enc.o
  102. MD5_ASM_OBJ=
  103. SHA1_ASM_OBJ= sha1-armv4-large.o sha256-armv4.o sha512-armv4.o
  104. RMD160_ASM_OBJ=
  105. WP_ASM_OBJ= wp_block.o
  106. CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
  107. MODES_ASM_OBJ= ghash-armv4.o ghashv8-armx.o
  108. ENGINES_ASM_OBJ=
  109. PERLASM_SCHEME= void
  110.  
  111. # KRB5 stuff
  112. KRB5_INCLUDES=
  113. LIBKRB5=
  114.  
  115. # Zlib stuff
  116. ZLIB_INCLUDE=
  117. LIBZLIB=
  118.  
  119. # TOP level FIPS install directory.
  120. FIPSDIR=/usr/local/ssl/fips-2.0
  121.  
  122. # This is the location of fipscanister.o and friends.
  123. # The FIPS module build will place it $(INSTALLTOP)/lib
  124. # but since $(INSTALLTOP) can only take the default value
  125. # when the module is built it will be in /usr/local/ssl/lib
  126. # $(INSTALLTOP) for this build may be different so hard
  127. # code the path.
  128.  
  129. FIPSLIBDIR=
  130.  
  131. # The location of the library which contains fipscanister.o
  132. # normally it will be libcrypto unless fipsdso is set in which
  133. # case it will be libfips. If not compiling in FIPS mode at all
  134. # this is empty making it a useful test for a FIPS compile.
  135.  
  136. FIPSCANLIB=
  137.  
  138. # Shared library base address. Currently only used on Windows.
  139. #
  140.  
  141. BASEADDR=0xFB00000
  142.  
  143. DIRS=   crypto ssl apps test tools
  144. ENGDIRS= ccgost
  145. SHLIBDIRS= crypto ssl
  146.  
  147. # dirs in crypto to build
  148. SDIRS=  \
  149.     objects \
  150.     md4 md5 sha mdc2 hmac ripemd whrlpool \
  151.     des aes rc2 rc4 idea bf cast camellia seed modes \
  152.     bn ec rsa dsa ecdsa dh ecdh dso \
  153.     buffer bio stack lhash rand err \
  154.     evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
  155.     cms pqueue ts srp cmac
  156. # keep in mind that the above list is adjusted by ./Configure
  157. # according to no-xxx arguments...
  158.  
  159. # tests to perform.  "alltests" is a special word indicating that all tests
  160. # should be performed.
  161. TESTS = alltests
  162.  
  163. MAKEFILE= Makefile
  164.  
  165. MANDIR=/.remove/share/man
  166. MAN1=1
  167. MAN3=3
  168. MANSUFFIX=
  169. HTMLSUFFIX=html
  170. HTMLDIR=/.remove/share/doc
  171. SHELL=/bin/sh
  172.  
  173. TOP=    .
  174. ONEDIRS=out tmp
  175. EDIRS=  times doc bugs util include certs ms shlib mt demos perl sf dep VMS
  176. WDIRS=  windows
  177. LIBS=   libcrypto.a libssl.a
  178. SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
  179. SHARED_SSL=libssl$(SHLIB_EXT)
  180. SHARED_LIBS=$(SHARED_CRYPTO) $(SHARED_SSL)
  181. SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so
  182. SHARED_LDFLAGS=
  183.  
  184. GENERAL=        Makefile
  185. BASENAME=       openssl
  186. NAME=           $(BASENAME)-$(VERSION)
  187. TARFILE=        ../$(NAME).tar
  188. EXHEADER=       e_os2.h
  189. HEADER=         e_os.h
  190.  
  191. all: Makefile build_all
  192.  
  193. # as we stick to -e, CLEARENV ensures that local variables in lower
  194. # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
  195. # shell, which [annoyingly enough] terminates unset with error if VAR
  196. # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
  197. # which terminates unset with error if no variable was present:-(
  198. CLEARENV=   TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
  199.         $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES}   \
  200.         $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC}       \
  201.         $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
  202.         $${EXHEADER+EXHEADER} $${HEADER+HEADER}     \
  203.         $${GENERAL+GENERAL} $${CFLAGS+CFLAGS}       \
  204.         $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS}       \
  205.         $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
  206.         $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
  207.         $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}   \
  208.         $${APPS+APPS}
  209.  
  210. # LC_ALL=C ensures that error [and other] messages are delivered in
  211. # same language for uniform treatment.
  212. BUILDENV=   LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
  213.         CC='$(CC)' CFLAG='$(CFLAG)'             \
  214.         AS='$(CC)' ASFLAG='$(CFLAG) -c'         \
  215.         AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'    \
  216.         RC='$(RC)'                          \
  217.         CROSS_COMPILE='$(CROSS_COMPILE)'    \
  218.         PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'     \
  219.         SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
  220.         INSTALL_PREFIX='$(INSTALL_PREFIX)'      \
  221.         INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)'   \
  222.         LIBDIR='$(LIBDIR)'              \
  223.         MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
  224.         DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)'    \
  225.         MAKEDEPPROG='$(MAKEDEPPROG)'            \
  226.         SHARED_LDFLAGS='$(SHARED_LDFLAGS)'      \
  227.         KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)'   \
  228.         ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
  229.         EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'   \
  230.         SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
  231.         PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
  232.         CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \
  233.         EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)'     \
  234.         AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
  235.         BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)'   \
  236.         RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)'   \
  237.         SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)'          \
  238.         MD5_ASM_OBJ='$(MD5_ASM_OBJ)'            \
  239.         RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)'      \
  240.         WP_ASM_OBJ='$(WP_ASM_OBJ)'          \
  241.         MODES_ASM_OBJ='$(MODES_ASM_OBJ)'        \
  242.         ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)'        \
  243.         PERLASM_SCHEME='$(PERLASM_SCHEME)'      \
  244.         FIPSLIBDIR='${FIPSLIBDIR}'          \
  245.         FIPSDIR='${FIPSDIR}'                \
  246.         FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}"  \
  247.         THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
  248. # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
  249. # which in turn eliminates ambiguities in variable treatment with -e.
  250.  
  251. # BUILD_CMD is a generic macro to build a given target in a given
  252. # subdirectory.  The target must be given through the shell variable
  253. # `target' and the subdirectory to build in must be given through `dir'.
  254. # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
  255. # BUILD_ONE_CMD instead.
  256. #
  257. # BUILD_ONE_CMD is a macro to build a given target in a given
  258. # subdirectory if that subdirectory is part of $(DIRS).  It requires
  259. # exactly the same shell variables as BUILD_CMD.
  260. #
  261. # RECURSIVE_BUILD_CMD is a macro to build a given target in all
  262. # subdirectories defined in $(DIRS).  It requires that the target
  263. # is given through the shell variable `target'.
  264. BUILD_CMD=  if [ -d "$$dir" ]; then \
  265.         (   cd $$dir && echo "making $$target in $$dir..." && \
  266.         $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
  267.         ) || exit 1; \
  268.         fi
  269. RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
  270. BUILD_ONE_CMD=\
  271.     if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
  272.         $(BUILD_CMD); \
  273.     fi
  274.  
  275. reflect:
  276.     @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
  277.  
  278. sub_all: build_all
  279.  
  280. build_all: build_libs build_apps build_tools
  281.  
  282. build_libs: build_libcrypto build_libssl openssl.pc
  283.  
  284. build_libcrypto: build_crypto build_engines libcrypto.pc
  285. build_libssl: build_ssl libssl.pc
  286.  
  287. build_crypto:
  288.     @dir=crypto; target=all; $(BUILD_ONE_CMD)
  289. build_ssl: build_crypto
  290.     @dir=ssl; target=all; $(BUILD_ONE_CMD)
  291. build_engines: build_crypto
  292.     @dir=engines; target=all; $(BUILD_ONE_CMD)
  293. build_apps: build_libs
  294.     @dir=apps; target=all; $(BUILD_ONE_CMD)
  295. build_tests: build_libs
  296.     @dir=test; target=all; $(BUILD_ONE_CMD)
  297. build_tools: build_libs
  298.     @dir=tools; target=all; $(BUILD_ONE_CMD)
  299.  
  300. all_testapps: build_libs build_testapps
  301. build_testapps:
  302.     @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
  303.  
  304. fips_premain_dso$(EXE_EXT): libcrypto.a
  305.     [ -z "$(FIPSCANLIB)" ] || $(CC) $(CFLAG) -Iinclude \
  306.         -DFINGERPRINT_PREMAIN_DSO_LOAD -o $@  \
  307.         $(FIPSLIBDIR)fips_premain.c $(FIPSLIBDIR)fipscanister.o \
  308.         libcrypto.a $(EX_LIBS)
  309.  
  310. libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
  311.     @if [ "$(SHLIB_TARGET)" != "" ]; then \
  312.         if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
  313.             FIPSLD_LIBCRYPTO=libcrypto.a ; \
  314.             FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \
  315.             export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \
  316.         fi; \
  317.         $(MAKE) -e SHLIBDIRS=crypto  CC="$${CC:-$(CC)}" build-shared && \
  318.         (touch -c fips_premain_dso$(EXE_EXT) || :); \
  319.     else \
  320.         echo "There's no support for shared libraries on this platform" >&2; \
  321.         exit 1; \
  322.     fi
  323.  
  324. libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
  325.     @if [ "$(SHLIB_TARGET)" != "" ]; then \
  326.         $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
  327.     else \
  328.         echo "There's no support for shared libraries on this platform" >&2; \
  329.         exit 1; \
  330.     fi
  331.  
  332. clean-shared:
  333.     @set -e; for i in $(SHLIBDIRS); do \
  334.         if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
  335.             tmp="$(SHARED_LIBS_LINK_EXTS)"; \
  336.             for j in $${tmp:-x}; do \
  337.                 ( set -x; rm -f lib$$i$$j ); \
  338.             done; \
  339.         fi; \
  340.         ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
  341.         if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
  342.             ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
  343.         fi; \
  344.     done
  345.  
  346. link-shared:
  347.     @ set -e; for i in $(SHLIBDIRS); do \
  348.         $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
  349.             LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
  350.             LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
  351.             symlink.$(SHLIB_TARGET); \
  352.         libs="$$libs -l$$i"; \
  353.     done
  354.  
  355. build-shared: do_$(SHLIB_TARGET) link-shared
  356.  
  357. do_$(SHLIB_TARGET):
  358.     @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
  359.         if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
  360.             libs="$(LIBKRB5) $$libs"; \
  361.         fi; \
  362.         $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
  363.             LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
  364.             LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
  365.             LIBDEPS="$$libs $(EX_LIBS)" \
  366.             link_a.$(SHLIB_TARGET); \
  367.         libs="-l$$i $$libs"; \
  368.     done
  369.  
  370. libcrypto.pc: Makefile
  371.     @ ( echo 'prefix=$(INSTALLTOP)'; \
  372.         echo 'exec_prefix=$${prefix}'; \
  373.         echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
  374.         echo 'includedir=$${prefix}/include'; \
  375.         echo 'enginesdir=$${libdir}/engines'; \
  376.         echo ''; \
  377.         echo 'Name: OpenSSL-libcrypto'; \
  378.         echo 'Description: OpenSSL cryptography library'; \
  379.         echo 'Version: '$(VERSION); \
  380.         echo 'Requires: '; \
  381.         echo 'Libs: -L$${libdir} -lcrypto'; \
  382.         echo 'Libs.private: $(EX_LIBS)'; \
  383.         echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
  384.  
  385. libssl.pc: Makefile
  386.     @ ( echo 'prefix=$(INSTALLTOP)'; \
  387.         echo 'exec_prefix=$${prefix}'; \
  388.         echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
  389.         echo 'includedir=$${prefix}/include'; \
  390.         echo ''; \
  391.         echo 'Name: OpenSSL-libssl'; \
  392.         echo 'Description: Secure Sockets Layer and cryptography libraries'; \
  393.         echo 'Version: '$(VERSION); \
  394.         echo 'Requires.private: libcrypto'; \
  395.         echo 'Libs: -L$${libdir} -lssl'; \
  396.         echo 'Libs.private: $(EX_LIBS)'; \
  397.         echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
  398.  
  399. openssl.pc: Makefile
  400.     @ ( echo 'prefix=$(INSTALLTOP)'; \
  401.         echo 'exec_prefix=$${prefix}'; \
  402.         echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
  403.         echo 'includedir=$${prefix}/include'; \
  404.         echo ''; \
  405.         echo 'Name: OpenSSL'; \
  406.         echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
  407.         echo 'Version: '$(VERSION); \
  408.         echo 'Requires: libssl libcrypto' ) > openssl.pc
  409.  
  410. Makefile: Makefile.org Configure config
  411.     @echo "Makefile is older than Makefile.org, Configure or config."
  412.     @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
  413.     @false
  414.  
  415. libclean:
  416.     rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
  417.  
  418. clean:  libclean
  419.     rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
  420.     @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
  421.     rm -f $(LIBS)
  422.     rm -f openssl.pc libssl.pc libcrypto.pc
  423.     rm -f speed.* .pure
  424.     rm -f $(TARFILE)
  425.     @set -e; for i in $(ONEDIRS) ;\
  426.     do \
  427.     rm -fr $$i/*; \
  428.     done
  429.  
  430. distclean: clean
  431.     -$(RM) `find . -name .git -prune -o -type l -print`
  432.     $(RM) apps/CA.pl
  433.     $(RM) test/evptests.txt test/newkey.pem test/testkey.pem test/testreq.pem
  434.     $(RM) tools/c_rehash
  435.     $(RM) crypto/opensslconf.h
  436.     $(RM) Makefile Makefile.bak
  437.  
  438. makefile.one: files
  439.     $(PERL) util/mk1mf.pl >makefile.one; \
  440.     sh util/do_ms.sh
  441.  
  442. files:
  443.     $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
  444.     @set -e; target=files; $(RECURSIVE_BUILD_CMD)
  445.  
  446. links:
  447.     @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
  448.     @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
  449.     @set -e; target=links; $(RECURSIVE_BUILD_CMD)
  450.  
  451. gentests:
  452.     @(cd test && echo "generating dummy tests (if needed)..." && \
  453.     $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
  454.  
  455. dclean:
  456.     rm -rf *.bak include/openssl certs/.0
  457.     @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
  458.  
  459. rehash: rehash.time
  460. rehash.time: certs apps
  461.     @if [ -z "$(CROSS_COMPILE)" ]; then \
  462.         (OPENSSL="`pwd`/util/opensslwrap.sh"; \
  463.         [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
  464.         OPENSSL_DEBUG_MEMORY=on; \
  465.         export OPENSSL OPENSSL_DEBUG_MEMORY; \
  466.         $(PERL) tools/c_rehash certs/demo) && \
  467.         touch rehash.time; \
  468.     else :; fi
  469.  
  470. test:   tests
  471.  
  472. tests: rehash
  473.     @(cd test && echo "testing..." && \
  474.     $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
  475.     OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
  476.  
  477. report:
  478.     @$(PERL) util/selftest.pl
  479.  
  480. update: errors stacks util/libeay.num util/ssleay.num TABLE
  481.     @set -e; target=update; $(RECURSIVE_BUILD_CMD)
  482.  
  483. depend:
  484.     @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
  485.  
  486. lint:
  487.     @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
  488.  
  489. tags:
  490.     rm -f TAGS
  491.     find . -name '[^.]*.[ch]' | xargs etags -a
  492.  
  493. errors:
  494.     $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
  495.     $(PERL) util/mkerr.pl -recurse -write
  496.     (cd engines; $(MAKE) PERL=$(PERL) errors)
  497.  
  498. stacks:
  499.     $(PERL) util/mkstack.pl -write
  500.  
  501. util/libeay.num::
  502.     $(PERL) util/mkdef.pl crypto update
  503.  
  504. util/ssleay.num::
  505.     $(PERL) util/mkdef.pl ssl update
  506.  
  507. TABLE: Configure
  508.     (echo 'Output of `Configure TABLE'"':"; \
  509.     $(PERL) Configure TABLE) > TABLE
  510.  
  511. # Build distribution tar-file. As the list of files returned by "find" is
  512. # pretty long, on several platforms a "too many arguments" error or similar
  513. # would occur. Therefore the list of files is temporarily stored into a file
  514. # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
  515. # tar does not support the --files-from option.
  516. TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \
  517.                            --owner 0 --group 0 \
  518.                    --transform 's|^|$(NAME)/|' \
  519.                    -cvf -
  520.  
  521. $(TARFILE).list:
  522.     find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \
  523.            \! -name '*.so' \! -name '*.so.*'  \! -name 'openssl' \
  524.            \( \! -name '*test' -o -name bctest -o -name pod2mantest \) \
  525.            \! -name '.#*' \! -name '*.bak' \! -name '*~' \! -type l \
  526.         | sort > $(TARFILE).list
  527.  
  528. tar: $(TARFILE).list
  529.     find . -type d -print | xargs chmod 755
  530.     find . -type f -print | xargs chmod a+r
  531.     find . -type f -perm -0100 -print | xargs chmod a+x
  532.     $(TAR_COMMAND) | gzip --best > $(TARFILE).gz
  533.     rm -f $(TARFILE).list
  534.     ls -l $(TARFILE).gz
  535.  
  536. tar-snap: $(TARFILE).list
  537.     $(TAR_COMMAND) > $(TARFILE)
  538.     rm -f $(TARFILE).list
  539.     ls -l $(TARFILE)
  540.  
  541. dist:  
  542.     $(PERL) Configure dist
  543.     @$(MAKE) SDIRS='$(SDIRS)' clean
  544.     @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
  545.  
  546. install: all install_docs install_sw
  547.  
  548. install_sw:
  549.     @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
  550.         $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
  551.         $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
  552.         $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
  553.         $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
  554.         $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
  555.         $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
  556.         $(INSTALL_PREFIX)$(OPENSSLDIR)/private
  557.     @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
  558.     do \
  559.     (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
  560.     chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
  561.     done;
  562.     @set -e; target=install; $(RECURSIVE_BUILD_CMD)
  563.     @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
  564.     do \
  565.         if [ -f "$$i" ]; then \
  566.         (       echo installing $$i; \
  567.             cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  568.             $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  569.             chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  570.             mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
  571.         fi; \
  572.     done;
  573.     @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
  574.         tmp="$(SHARED_LIBS)"; \
  575.         for i in $${tmp:-x}; \
  576.         do \
  577.             if [ -f "$$i" -o -f "$$i.a" ]; then \
  578.             (       echo installing $$i; \
  579.                 if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
  580.                     c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
  581.                     cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
  582.                     chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
  583.                     mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
  584.                     cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  585.                     chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  586.                     mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
  587.                 else \
  588.                     cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  589.                     chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
  590.                     mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
  591.                 fi ); \
  592.                 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
  593.                 (   case $$i in \
  594.                         *crypto*) i=libeay32.dll;; \
  595.                         *ssl*)    i=ssleay32.dll;; \
  596.                     esac; \
  597.                     echo installing $$i; \
  598.                     cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
  599.                     chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
  600.                     mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
  601.                 fi; \
  602.             fi; \
  603.         done; \
  604.         (   here="`pwd`"; \
  605.             cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
  606.             $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
  607.         if [ "$(INSTALLTOP)" != "/usr" ]; then \
  608.             echo 'OpenSSL shared libraries have been installed in:'; \
  609.             echo '  $(INSTALLTOP)'; \
  610.             echo ''; \
  611.             sed -e '1,/^$$/d' doc/openssl-shared.txt; \
  612.         fi; \
  613.     fi
  614.     cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
  615.     chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
  616.     cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
  617.     chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
  618.     cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
  619.     chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
  620.  
  621. install_html_docs:
  622.     here="`pwd`"; \
  623.     filecase=; \
  624.     case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
  625.         filecase=-i; \
  626.     esac; \
  627.     for subdir in apps crypto ssl; do \
  628.         mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
  629.         for i in doc/$$subdir/*.pod; do \
  630.             fn=`basename $$i .pod`; \
  631.             echo "installing html/$$fn.$(HTMLSUFFIX)"; \
  632.             cat $$i \
  633.             | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
  634.             | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
  635.             | sed -r 's/<!DOCTYPE.*//g' \
  636.             > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
  637.             $(PERL) util/extract-names.pl < $$i | \
  638.                 grep -v $$filecase "^$$fn\$$" | \
  639.                 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
  640.                  while read n; do \
  641.                     PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
  642.                  done); \
  643.         done; \
  644.     done
  645.  
  646. install_docs:
  647.     @$(PERL) $(TOP)/util/mkdir-p.pl \
  648.         $(INSTALL_PREFIX)$(MANDIR)/man1 \
  649.         $(INSTALL_PREFIX)$(MANDIR)/man3 \
  650.         $(INSTALL_PREFIX)$(MANDIR)/man5 \
  651.         $(INSTALL_PREFIX)$(MANDIR)/man7
  652.     @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
  653.     here="`pwd`"; \
  654.     filecase=; \
  655.     case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
  656.         filecase=-i; \
  657.     esac; \
  658.     set -e; for i in doc/apps/*.pod; do \
  659.         fn=`basename $$i .pod`; \
  660.         sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
  661.         echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
  662.         (cd `$(PERL) util/dirname.pl $$i`; \
  663.         sh -c "$$pod2man \
  664.             --section=$$sec --center=OpenSSL \
  665.             --release=$(VERSION) `basename $$i`") \
  666.             >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
  667.         $(PERL) util/extract-names.pl < $$i | \
  668.             (grep -v $$filecase "^$$fn\$$"; true) | \
  669.             (grep -v "[ ]"; true) | \
  670.             (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
  671.              while read n; do \
  672.                 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
  673.              done); \
  674.     done; \
  675.     set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
  676.         fn=`basename $$i .pod`; \
  677.         sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
  678.         echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
  679.         (cd `$(PERL) util/dirname.pl $$i`; \
  680.         sh -c "$$pod2man \
  681.             --section=$$sec --center=OpenSSL \
  682.             --release=$(VERSION) `basename $$i`") \
  683.             >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
  684.         $(PERL) util/extract-names.pl < $$i | \
  685.             (grep -v $$filecase "^$$fn\$$"; true) | \
  686.             (grep -v "[ ]"; true) | \
  687.             (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
  688.              while read n; do \
  689.                 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
  690.              done); \
  691.     done
  692.  
  693. # DO NOT DELETE THIS LINE -- make depend depends on it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement