Makefile 24 KB

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