2 ## Makefile for OpenSSL
4 ## {- join("\n## ", @autowarntext) -}
6 VERSION
={- $config{version
} -}
7 MAJOR
={- $config{major
} -}
8 MINOR
={- $config{minor
} -}
9 SHLIB_VERSION_NUMBER
={- $config{shlib_version_number
} -}
10 SHLIB_VERSION_HISTORY
={- $config{shlib_version_history
} -}
11 SHLIB_MAJOR
={- $config{shlib_major
} -}
12 SHLIB_MINOR
={- $config{shlib_minor
} -}
13 SHLIB_EXT
={- $target{shared_extension
} -}
14 PLATFORM
={- $config{target
} -}
15 OPTIONS
={- $config{options
} -}
16 CONFIGURE_ARGS
=({- join(", ",quotify_l
(@
{$config{perlargv
}})) -})
17 SHLIB_TARGET
={- $target{shared_target
} -}
19 # HERE indicates where this Makefile lives. This can be used to indicate
20 # where sub-Makefiles are expected to be. Currently has very limited usage,
21 # and should probably not be bothered with at all.
24 # INSTALL_PREFIX is for package builders so that they can configure
25 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
26 # Normally it is left empty.
27 INSTALL_PREFIX
={- $config{install_prefix
} -}
29 # Do not edit these manually. Use Configure with --prefix or --openssldir
30 # to change this! Short explanation in the top comment in Configure
31 INSTALLTOP
={- $config{prefix} -}
32 OPENSSLDIR
={- $config{openssldir
} -}
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. _REENTRANT 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.
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 # MFUNC - Make all Malloc/Free/Realloc calls call
52 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
53 # call application defined callbacks via CRYPTO_set_mem_functions()
54 # MD5_ASM needs to be defined to use the x86 assembler for MD5
55 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
56 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
57 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
59 # PKCS1_CHECK - pkcs1 tests.
61 CROSS_COMPILE
= {- $config{cross_compile_prefix
} -}
62 CC
= $(CROSS_COMPILE
){- $target{cc} -}
63 CFLAG
= {- $config{cflags} -}
64 DEPFLAG
= {- $config{depflags
} -}
65 LDFLAGS
= {- $config{lflags} -}
66 EX_LIBS
= {- $config{ex_libs
} -}
67 EXE_EXT
= {- $target{exe_extension
} -}
68 ARFLAGS
= {- $target{arflags} -}
69 AR
=$(CROSS_COMPILE
){- $target{ar} -} $(ARFLAGS
) r
70 RANLIB
= {- $target{ranlib
} -}
71 NM
= $(CROSS_COMPILE
){- $target{nm
} -}
72 PERL
= {- $config{perl
} -}
76 TARFLAGS
= --no-recursion
77 LIBDIR
={- $config{libdir} -}
79 # We let the C compiler driver to take care of .s files. This is done in
80 # order to be excused from maintaining a separate set of architecture
81 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
82 # gcc, then the driver will automatically translate it to -xarch=v8plus
83 # and pass it down to assembler.
87 # For x86 assembler: Set PROCESSOR to 386 if you want to support
89 PROCESSOR
= {- $config{processor
} -}
91 # CPUID module collects small commonly used assembler snippets
92 CPUID_OBJ
= {- $target{cpuid_obj
} -}
93 BN_ASM
= {- $target{bn_obj
} -}
94 EC_ASM
= {- $target{ec_obj
} -}
95 DES_ENC
= {- $target{des_obj
} -}
96 AES_ENC
= {- $target{aes_obj
} -}
97 BF_ENC
= {- $target{bf_obj
} -}
98 CAST_ENC
= {- $target{cast_obj
} -}
99 RC4_ENC
= {- $target{rc4_obj
} -}
100 RC5_ENC
= {- $target{rc5_obj
} -}
101 MD5_ASM_OBJ
= {- $target{md5_obj
} -}
102 SHA1_ASM_OBJ
= {- $target{sha1_obj
} -}
103 RMD160_ASM_OBJ
= {- $target{rmd160_obj
} -}
104 WP_ASM_OBJ
= {- $target{wp_obj
} -}
105 CMLL_ENC
= {- $target{cmll_obj
} -}
106 MODES_ASM_OBJ
= {- $target{modes_obj
} -}
107 PADLOCK_ASM_OBJ
= {- $target{padlock_obj
} -}
108 CHACHA_ENC
= {- $target{chacha_obj
} -}
109 POLY1305_ASM_OBJ
= {- $target{poly1305_obj
} -}
110 PERLASM_SCHEME
= {- $target{perlasm_scheme
} -}
113 ZLIB_INCLUDE
={- $withargs{zlib-include
} -}
114 LIBZLIB
={- $withargs{zlib-lib
} -}
116 # This is the location of fipscanister.o and friends.
117 # The FIPS module build will place it $(INSTALLTOP)/lib
118 # but since $(INSTALLTOP) can only take the default value
119 # when the module is built it will be in /usr/local/ssl/lib
120 # $(INSTALLTOP) for this build may be different so hard
123 FIPSLIBDIR
={- $config{fipslibdir
} -}
125 # The location of the library which contains fipscanister.o
126 # normally it will be libcrypto. If not compiling in FIPS mode
127 # at all this is empty making it a useful test for a FIPS compile.
129 FIPSCANLIB
={- $config{fips
} ?
"libcrypto" : "" -}
131 # Shared library base address. Currently only used on Windows.
134 BASEADDR
={- $config{baseaddr
} -}
136 DIRS
= {- join(" ", @
{$config{dirs
}}) -}
137 SHLIBDIRS
= crypto ssl
138 INSTALL_SUBS
= engines apps tools
140 # dirs in crypto to build
141 SDIRS
= {- join(" ", @
{$config{sdirs
}}) -}
143 # tests to perform. "alltests" is a special word indicating that all tests
144 # should be performed.
149 MANDIR
=$(INSTALLTOP
)/share
/man
154 HTMLDIR
=$(INSTALLTOP
)/share
/doc
/$(BASENAME
)/html
158 LIBS
= libcrypto.a libssl.a
159 SHARED_CRYPTO
=libcrypto
$(SHLIB_EXT
)
160 SHARED_SSL
=libssl
$(SHLIB_EXT
)
161 SHARED_LIBS
={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if
(!$config{no_shared
}) -}
162 SHARED_LDFLAGS
={- $target{shared_ldflag
} -}
166 NAME
= $(BASENAME
)-$(VERSION
)
167 TARFILE
= ..
/$(NAME
).
tar
170 # Directories created on install if they don't exist.
172 $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin \
173 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
) \
174 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/engines \
175 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig \
176 $(INSTALL_PREFIX
)$(INSTALLTOP
)/include/openssl \
177 $(INSTALL_PREFIX
)$(OPENSSLDIR
)/misc \
178 $(INSTALL_PREFIX
)$(OPENSSLDIR
)/certs \
179 $(INSTALL_PREFIX
)$(OPENSSLDIR
)/private
181 all: Makefile build_all
183 # as we stick to -e, CLEARENV ensures that local variables in lower
184 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
185 # shell, which [annoyingly enough] terminates unset with error if VAR
186 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
187 # which terminates unset with error if no variable was present:-(
188 CLEARENV
= TOP
= && unset TOP
$${LIB
+LIB
} $${LIBS
+LIBS
} \
189 $${INCLUDE
+INCLUDE
} $${INCLUDES
+INCLUDES
} \
190 $${DIR
+DIR
} $${DIRS
+DIRS
} $${SRC
+SRC
} \
191 $${LIBSRC
+LIBSRC
} $${LIBOBJ
+LIBOBJ
} $${ALL
+ALL
} \
193 $${GENERAL
+GENERAL
} $${CFLAGS
+CFLAGS
} \
194 $${ASFLAGS
+ASFLAGS
} $${AFLAGS
+AFLAGS
} \
195 $${LDCMD
+LDCMD
} $${LDFLAGS
+LDFLAGS
} $${SCRIPTS
+SCRIPTS
} \
196 $${SHAREDCMD
+SHAREDCMD
} $${SHAREDFLAGS
+SHAREDFLAGS
} \
197 $${SHARED_LIB
+SHARED_LIB
} $${LIBEXTRAS
+LIBEXTRAS
}
199 # LC_ALL=C ensures that error [and other] messages are delivered in
200 # same language for uniform treatment.
201 BUILDENV
= LC_ALL
=C PLATFORM
='$(PLATFORM)' PROCESSOR
='$(PROCESSOR)'\
202 CC
='$(CC)' CFLAG
='$(CFLAG)' \
203 AS
='$(CC)' ASFLAG
='$(CFLAG) -c' \
204 AR
='$(AR)' NM
='$(NM)' RANLIB
='$(RANLIB)' \
205 CROSS_COMPILE
='$(CROSS_COMPILE)' \
207 SDIRS
='$(SDIRS)' LIBRPATH
='$(INSTALLTOP)/$(LIBDIR)' \
208 INSTALL_PREFIX
='$(INSTALL_PREFIX)' \
209 INSTALLTOP
='$(INSTALLTOP)' OPENSSLDIR
='$(OPENSSLDIR)' \
211 DEPFLAG
='$(DEPFLAG)' \
212 SHARED_LDFLAGS
='$(SHARED_LDFLAGS)' \
213 ZLIB_INCLUDE
='$(ZLIB_INCLUDE)' LIBZLIB
='$(LIBZLIB)' \
214 EXE_EXT
='$(EXE_EXT)' SHARED_LIBS
='$(SHARED_LIBS)' \
215 SHLIB_EXT
='$(SHLIB_EXT)' SHLIB_TARGET
='$(SHLIB_TARGET)' \
216 LDFLAGS
='$(LDFLAGS)' EX_LIBS
='$(EX_LIBS)' \
217 CPUID_OBJ
='$(CPUID_OBJ)' BN_ASM
='$(BN_ASM)' \
218 EC_ASM
='$(EC_ASM)' DES_ENC
='$(DES_ENC)' \
219 AES_ENC
='$(AES_ENC)' CMLL_ENC
='$(CMLL_ENC)' \
220 BF_ENC
='$(BF_ENC)' CAST_ENC
='$(CAST_ENC)' \
221 RC4_ENC
='$(RC4_ENC)' RC5_ENC
='$(RC5_ENC)' \
222 SHA1_ASM_OBJ
='$(SHA1_ASM_OBJ)' \
223 MD5_ASM_OBJ
='$(MD5_ASM_OBJ)' \
224 RMD160_ASM_OBJ
='$(RMD160_ASM_OBJ)' \
225 WP_ASM_OBJ
='$(WP_ASM_OBJ)' \
226 MODES_ASM_OBJ
='$(MODES_ASM_OBJ)' \
227 PADLOCK_ASM_OBJ
='$(PADLOCK_ASM_OBJ)' \
228 CHACHA_ENC
='$(CHACHA_ENC)' \
229 POLY1305_ASM_OBJ
='$(POLY1305_ASM_OBJ)' \
230 PERLASM_SCHEME
='$(PERLASM_SCHEME)' \
231 FIPSLIBDIR
='${FIPSLIBDIR}' \
232 FIPSCANLIB
="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
233 THIS
=$${THIS
:-$@
} MAKEFILE
=Makefile MAKEOVERRIDES
=
234 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
235 # which in turn eliminates ambiguities in variable treatment with -e.
237 # BUILD_CMD is a generic macro to build a given target in a given
238 # subdirectory. The target must be given through the shell variable
239 # `target' and the subdirectory to build in must be given through `dir'.
240 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
241 # BUILD_ONE_CMD instead.
243 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
244 # subdirectories defined in $(DIRS). It requires that the target
245 # is given through the shell variable `target'.
247 # BUILD_ONE_CMD is a macro to build a given target in a given
248 # subdirectory if that subdirectory is part of $(DIRS). It requires
249 # exactly the same shell variables as BUILD_CMD.
250 BUILD_CMD
= if
[ -d
"$$dir" ]; then \
251 ( cd
$$dir && echo
"making $$target in $$dir..." && \
252 $(CLEARENV
) && $(MAKE
) -e
$(BUILDENV
) TOP
=.. DIR
=$$dir $$target \
255 RECURSIVE_BUILD_CMD
=for
dir in
$(DIRS
); do
$(BUILD_CMD
); done
257 if expr
" $(DIRS) " : ".* $$dir " >/dev
/null
2>&1; then \
262 @
[ -n
"$(THIS)" ] && $(CLEARENV
) && $(MAKE
) $(THIS
) -e
$(BUILDENV
)
266 build_all
: build_libs build_apps build_tests build_tools
268 build_libs
: build_libcrypto build_libssl openssl.
pc
270 build_libcrypto
: build_crypto build_engines libcrypto.
pc
271 build_libssl
: build_ssl libssl.
pc
274 @
dir=crypto
; target
=all; $(BUILD_ONE_CMD
)
275 build_ssl
: build_crypto
276 @
dir=ssl
; target
=all; $(BUILD_ONE_CMD
)
277 build_engines
: build_crypto
278 @
dir=engines
; target
=all; AS
='$(CC) -c'; export AS
; $(BUILD_ONE_CMD
)
280 build_apps
: build_libs
281 @
dir=apps
; target
=all; $(BUILD_ONE_CMD
)
282 build_tests
: build_libs
283 @
dir=test; target
=all; $(BUILD_ONE_CMD
)
284 build_tools
: build_libs
285 @
dir=tools
; target
=all; $(BUILD_ONE_CMD
)
287 all_testapps
: build_libs build_testapps
289 @
dir=crypto
; target
=testapps
; $(BUILD_ONE_CMD
)
291 libcrypto
$(SHLIB_EXT
): libcrypto.a
292 @if
[ "$(SHLIB_TARGET)" != "" ]; then \
293 if
[ "$(FIPSCANLIB)" = "libcrypto" ]; then \
294 FIPSLD_CC
="$(CC)"; CC
=fips
/fipsld
; \
295 export CC FIPSLD_CC
; \
297 $(MAKE
) -e SHLIBDIRS
=crypto CC
="$${CC:-$(CC)}" build-shared
; \
299 echo
"There's no support for shared libraries on this platform" >&2; \
303 libssl
$(SHLIB_EXT
): libcrypto
$(SHLIB_EXT
) libssl.a
304 @if
[ "$(SHLIB_TARGET)" != "" ]; then \
305 $(MAKE
) SHLIBDIRS
=ssl SHLIBDEPS
='-lcrypto' build-shared
; \
307 echo
"There's no support for shared libraries on this platform" >&2; \
312 @ set
-e
; for i in
$(SHLIBDIRS
); do \
313 $(MAKE
) -f
$(HERE
)/Makefile.shared
-e
$(BUILDENV
) \
314 LIBNAME
=$$i LIBVERSION
=$(SHLIB_MAJOR
).
$(SHLIB_MINOR
) \
315 LIBCOMPATVERSIONS
=";$(SHLIB_VERSION_HISTORY)" \
316 symlink.
$(SHLIB_TARGET
); \
317 libs
="$$libs -l$$i"; \
320 build-shared
: do_
$(SHLIB_TARGET
) link-shared
323 @ set
-e
; libs
='-L. $(SHLIBDEPS)'; for i in
$(SHLIBDIRS
); do \
324 $(CLEARENV
) && $(MAKE
) -f Makefile.shared
-e
$(BUILDENV
) \
325 LIBNAME
=$$i LIBVERSION
=$(SHLIB_MAJOR
).
$(SHLIB_MINOR
) \
326 LIBCOMPATVERSIONS
=";$(SHLIB_VERSION_HISTORY)" \
327 LIBDEPS
="$$libs $(EX_LIBS)" \
328 link_a.
$(SHLIB_TARGET
); \
329 libs
="-l$$i $$libs"; \
332 libcrypto.
pc: Makefile
333 @
( echo
'prefix=$(INSTALLTOP)'; \
334 echo
'exec_prefix=$${prefix}'; \
335 echo
'libdir=$${exec_prefix}/$(LIBDIR)'; \
336 echo
'includedir=$${prefix}/include'; \
338 echo
'Name: OpenSSL-libcrypto'; \
339 echo
'Description: OpenSSL cryptography library'; \
340 echo
'Version: '$(VERSION
); \
342 echo
'Libs: -L$${libdir} -lcrypto'; \
343 echo
'Libs.private: $(EX_LIBS)'; \
344 echo
'Cflags: -I$${includedir}' ) > libcrypto.
pc
347 @
( echo
'prefix=$(INSTALLTOP)'; \
348 echo
'exec_prefix=$${prefix}'; \
349 echo
'libdir=$${exec_prefix}/$(LIBDIR)'; \
350 echo
'includedir=$${prefix}/include'; \
352 echo
'Name: OpenSSL-libssl'; \
353 echo
'Description: Secure Sockets Layer and cryptography libraries'; \
354 echo
'Version: '$(VERSION
); \
355 echo
'Requires.private: libcrypto'; \
356 echo
'Libs: -L$${libdir} -lssl'; \
357 echo
'Libs.private: $(EX_LIBS)'; \
358 echo
'Cflags: -I$${includedir}' ) > libssl.
pc
361 @
( echo
'prefix=$(INSTALLTOP)'; \
362 echo
'exec_prefix=$${prefix}'; \
363 echo
'libdir=$${exec_prefix}/$(LIBDIR)'; \
364 echo
'includedir=$${prefix}/include'; \
366 echo
'Name: OpenSSL'; \
367 echo
'Description: Secure Sockets Layer and cryptography libraries and tools'; \
368 echo
'Version: '$(VERSION
); \
369 echo
'Requires: libssl libcrypto' ) > openssl.
pc
371 Makefile
: Makefile.in Configure config
372 @echo
"Makefile is older than Makefile.in, Configure or config."
373 @echo
"Reconfigure the source tree (via './config' or 'perl Configure'), please."
377 rm -f
*.map
*.so
*.so.
* *.dylib
*.dll engines
/*.so engines
/*.dll engines
/*.dylib
*.a engines
/*.a
*/lib
*/*/lib
380 rm -f
*/*/*.o
*/*.o
*.o core a.out fluff rehash.time testlog make.log cctest cctest.c
381 rm -rf
*.bak certs
/.0
382 @set
-e
; target
=clean; $(RECURSIVE_BUILD_CMD
)
383 rm -f
$(LIBS
) tags TAGS
384 rm -f openssl.
pc libssl.
pc libcrypto.
pc
389 $(PERL
) util
/mk1mf.pl
>makefile.one
; \
393 $(PERL
) $(TOP
)/util
/files.pl Makefile
> $(TOP
)/MINFO
394 @set
-e
; target
=files
; $(RECURSIVE_BUILD_CMD
)
397 @
(cd
test && echo
"generating dummy tests (if needed)..." && \
398 $(CLEARENV
) && $(MAKE
) -e
$(BUILDENV
) TESTS
='$(TESTS)' OPENSSL_DEBUG_MEMORY
=on generate
);
401 rehash.time
: certs build_apps build_tools
402 @if
[ -z
"$(CROSS_COMPILE)" ]; then \
403 (OPENSSL
="`pwd`/util/opensslwrap.sh"; \
404 [ -x
"apps/openssl.exe" ] && OPENSSL
="apps/openssl.exe" ||
:; \
405 OPENSSL_DEBUG_MEMORY
=on
; OPENSSL_CONF
=/dev
/null
; \
406 export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF
; \
407 $$OPENSSL rehash certs
/demo \
408 ||
$(PERL
) tools
/c_rehash certs
/demo
) && \
416 @
(cd
test && echo
"testing..." && \
417 $(CLEARENV
) && $(MAKE
) -e
$(BUILDENV
) TOP
=.. TESTS
='$(TESTS)' OPENSSL_DEBUG_MEMORY
=on OPENSSL_CONF
=..
/apps
/openssl.cnf tests
);
418 @if
[ -z
"$(CROSS_COMPILE)" ]; then \
419 OPENSSL_CONF
=apps
/openssl.cnf util
/opensslwrap.sh version
-a
; \
424 $(CLEARENV
) && $(MAKE
) -e
$(BUILDENV
) TOP
=.. list-tests
)
427 @
$(PERL
) util
/selftest.pl
432 -etags
`find . -name '*.[ch]' -o -name '*.pm'`
437 @set
-e
; target
=depend
; $(RECURSIVE_BUILD_CMD
)
439 update
: generate errors ordinals depend
442 (cd apps
&& PERL
='${PERL}' $(MAKE
) generate
)
443 (cd crypto
/bn
&& PERL
='${PERL}' $(MAKE
) generate
)
444 (cd crypto
/objects
&& PERL
='${PERL}' $(MAKE
) generate
)
447 $(PERL
) util
/ck_errf.pl
-strict
*/*.c
*/*/*.c
448 $(PERL
) util
/mkerr.pl
-recurse
-write
449 (cd engines
; $(MAKE
) PERL
=$(PERL
) errors
)
450 (cd crypto
/ct
; $(MAKE
) PERL
=$(PERL
) errors
)
452 ordinals
: util
/libeay.num util
/ssleay.num test_ordinals TABLE
454 $(PERL
) util
/mkdef.pl crypto update
456 $(PERL
) util
/mkdef.pl ssl update
458 TOP
=$(TOP
) PERL
=$(PERL
) $(PERL
) test/run_tests.pl test_ordinals
460 TABLE
: Configure Configurations
/*.conf
461 (echo
'Output of `Configure TABLE'"':"; \
462 $(PERL
) Configure TABLE
) > TABLE
464 # Build distribution tar-file. As the list of files returned by "find" is
465 # pretty long, on several platforms a "too many arguments" error or similar
466 # would occur. Therefore the list of files is temporarily stored into a file
467 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
468 # tar does not support the --files-from option.
469 TAR_COMMAND
=$(TAR
) $(TARFLAGS
) --files-from
$(TARFILE
).list \
470 --owner
0 --group
0 \
471 --transform
's|^|$(NAME)/|' \
475 git diff
--quiet HEAD
476 git ls-files |
sort > $(TARFILE
).list
479 find .
-type d
-print | xargs chmod
755
480 find .
-type f
-print | xargs chmod a
+r
481 find .
-type f
-perm
-0100 -print | xargs chmod a
+x
482 $(TAR_COMMAND
) | gzip
--best
> $(TARFILE
).gz
483 rm -f
$(TARFILE
).list
486 tar-snap
: $(TARFILE
).list
487 $(TAR_COMMAND
) > $(TARFILE
)
488 rm -f
$(TARFILE
).list
492 $(PERL
) Configure
dist
493 @
$(MAKE
) SDIRS
='$(SDIRS)' clean
494 @
$(MAKE
) TAR
='$(TAR)' TARFLAGS
='$(TARFLAGS)' $(DISTTARVARS
) tar
496 install: all install_docs install_sw
498 uninstall: uninstall_sw uninstall_docs
501 @
$(PERL
) $(TOP
)/util
/mkdir-p.pl
$(INSTALLDIRS
)
502 @set
-e
; for i in
include/openssl
/*.h
; do \
503 (cp
$$i $(INSTALL_PREFIX
)$(INSTALLTOP
)/$$i; \
504 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$$i ); \
506 @set
-e
; target
=install; for
dir in
$(INSTALL_SUBS
); do
$(BUILD_CMD
); done
507 @set
-e
; liblist
="$(LIBS)"; for i in
$$liblist ;\
509 if
[ -f
"$$i" ]; then \
510 ( echo installing
$$i; \
511 cp
$$i $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
512 $(RANLIB
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
513 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
514 mv
-f
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i ); \
517 @set
-e
; if
[ -n
"$(SHARED_LIBS)" ]; then \
518 tmp
="$(SHARED_LIBS)"; \
519 for i in
$${tmp
:-x
}; \
521 if
[ -f
"$$i" -o
-f
"$$i.a" ]; then \
522 ( echo installing
$$i; \
523 if expr
"$(PLATFORM)" : "Cygwin" >/dev
/null
; then \
524 c
=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
525 cp
$$c $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c.new
; \
526 chmod
755 $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c.new
; \
527 mv
-f
$(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c.new
$(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c; \
528 cp
$$i $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
529 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
530 mv
-f
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
532 cp
$$i $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
533 chmod
555 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
; \
534 mv
-f
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i.new
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
536 if expr
$(PLATFORM
) : 'mingw' > /dev
/null
; then \
538 *crypto
*) i
=libeay32.dll
;; \
539 *ssl
*) i
=ssleay32.dll
;; \
541 echo installing
$$i; \
542 cp
$$i $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i.new
; \
543 chmod
755 $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i.new
; \
544 mv
-f
$(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i.new
$(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i ); \
549 cd
$(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
); \
550 $(MAKE
) -f
$$here/Makefile HERE
="$$here" link-shared
); \
551 if
[ "$(INSTALLTOP)" != "/usr" ]; then \
552 echo
'OpenSSL shared libraries have been installed in:'; \
553 echo
' $(INSTALLTOP)'; \
556 cp libcrypto.
pc $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
557 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/libcrypto.
pc
558 cp libssl.
pc $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
559 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/libssl.
pc
560 cp openssl.
pc $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
561 chmod
644 $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/openssl.
pc
564 cd
include/openssl
&& files
=* && cd
$(INSTALL_PREFIX
)$(INSTALLTOP
)/include/openssl
&& $(RM
) $$files
568 echo
$(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i && \
569 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
571 @if
[ -n
"$(SHARED_LIBS)" ]; then \
572 tmp
="$(SHARED_LIBS)"; \
573 for i in
$${tmp
:-x
}; \
575 if
[ -f
"$$i" -o
-f
"$$i.a" ]; then \
576 if expr
"$(PLATFORM)" : "Cygwin" >/dev
/null
; then \
577 c
=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
578 echo
$(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c; \
579 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$c; \
580 echo
$(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
581 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
583 echo
$(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
584 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/$$i; \
586 if expr
$(PLATFORM
) : 'mingw' > /dev
/null
; then \
588 *crypto
*) i
=libeay32.dll
;; \
589 *ssl
*) i
=ssleay32.dll
;; \
591 echo
$(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i; \
592 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/bin
/$$i; \
597 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/libcrypto.
pc
598 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/libssl.
pc
599 $(RM
) $(INSTALL_PREFIX
)$(INSTALLTOP
)/$(LIBDIR
)/pkgconfig
/openssl.
pc
600 @target
=uninstall; $(RECURSIVE_BUILD_CMD
)
605 case
"$(PLATFORM)" in DJGPP|Cygwin
*|mingw
*|darwin
*-*-cc) \
608 for subdir in apps crypto ssl
; do \
609 $(PERL
) $(TOP
)/util
/mkdir-p
$(INSTALL_PREFIX
)$(HTMLDIR
)/$$subdir; \
610 for i in doc
/$$subdir/*.pod
; do \
611 fn
=`basename $$i .pod`; \
612 echo
"installing html/$$fn.$(HTMLSUFFIX)"; \
614 | sed
-r
's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
615 | pod2html
--podroot
=doc
--htmlroot
=..
--podpath
=$$subdir:apps
:crypto
:ssl \
616 | sed
-r
's/<!DOCTYPE.*//g' \
617 > $(INSTALL_PREFIX
)$(HTMLDIR
)/$$subdir/$$fn.
$(HTMLSUFFIX
); \
618 $(PERL
) util
/extract-names.pl
< $$i | \
619 grep
-v
$$filecase "^$$fn\$$" | \
620 (cd
$(INSTALL_PREFIX
)$(HTMLDIR
)/$$subdir; \
622 PLATFORM
=$(PLATFORM
) $$here/util
/point.sh
$$fn.
$(HTMLSUFFIX
) "$$n".
$(HTMLSUFFIX
); \
630 case
"$(PLATFORM)" in DJGPP|Cygwin
*|mingw
*|darwin
*-*-cc) \
633 for subdir in apps crypto ssl
; do \
634 for i in doc
/$$subdir/*.pod
; do \
635 fn
=`basename $$i .pod`; \
636 $(RM
) $(INSTALL_PREFIX
)$(HTMLDIR
)/$$subdir/$$fn.
$(HTMLSUFFIX
); \
637 $(PERL
) util
/extract-names.pl
< $$i | \
638 grep
-v
$$filecase "^$$fn\$$" | \
640 $(RM
) $(INSTALL_PREFIX
)$(HTMLDIR
)/$$subdir/"$$n".
$(HTMLSUFFIX
); \
646 @
$(PERL
) $(TOP
)/util
/mkdir-p.pl \
647 $(INSTALL_PREFIX
)$(MANDIR
)/man1 \
648 $(INSTALL_PREFIX
)$(MANDIR
)/man3 \
649 $(INSTALL_PREFIX
)$(MANDIR
)/man5 \
650 $(INSTALL_PREFIX
)$(MANDIR
)/man7
653 case
"$(PLATFORM)" in DJGPP|Cygwin
*|mingw
*|darwin
*-*-cc) \
656 set
-e
; for i in doc
/apps
/*.pod
; do \
657 fn
=`basename $$i .pod`; \
658 sec
=`$(PERL) util/extract-section.pl 1 < $$i`; \
659 echo
"installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
660 (cd
`$(PERL) util/dirname.pl $$i`; \
662 --section
=$$sec --center
=OpenSSL \
663 --release
=$(VERSION
) `basename $$i`) \
664 > $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
665 $(PERL
) util
/extract-names.pl
< $$i | \
666 (grep
-v
$$filecase "^$$fn\$$"; true
) | \
667 (grep
-v
"[ ]"; true
) | \
668 (cd
$(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/; \
670 PLATFORM
=$(PLATFORM
) $$here/util
/point.sh
$$fn.
$${sec}$(MANSUFFIX
) "$$n".
$${sec}$(MANSUFFIX
); \
673 set
-e
; for i in doc
/crypto
/*.pod doc
/ssl
/*.pod
; do \
674 fn
=`basename $$i .pod`; \
675 sec
=`$(PERL) util/extract-section.pl 3 < $$i`; \
676 echo
"installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
677 (cd
`$(PERL) util/dirname.pl $$i`; \
679 --section
=$$sec --center
=OpenSSL \
680 --release
=$(VERSION
) `basename $$i`) \
681 > $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
682 $(PERL
) util
/extract-names.pl
< $$i | \
683 (grep
-v
$$filecase "^$$fn\$$"; true
) | \
684 (grep
-v
"[ ]"; true
) | \
685 (cd
$(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/; \
687 PLATFORM
=$(PLATFORM
) $$here/util
/point.sh
$$fn.
$${sec}$(MANSUFFIX
) "$$n".
$${sec}$(MANSUFFIX
); \
694 case
"$(PLATFORM)" in DJGPP|Cygwin
*|mingw
*) \
697 for i in doc
/apps
/*.pod
; do \
698 fn
=`basename $$i .pod`; \
699 sec
=`$(PERL) util/extract-section.pl 1 < $$i`; \
700 echo
$(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
701 $(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
702 $(PERL
) util
/extract-names.pl
< $$i | \
703 (grep
-v
$$filecase "^$$fn\$$"; true
) | \
704 (grep
-v
"[ ]"; true
) | \
706 echo
$(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/"$$n".
$${sec}$(MANSUFFIX
); \
707 $(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/"$$n".
$${sec}$(MANSUFFIX
); \
710 for i in doc
/crypto
/*.pod doc
/ssl
/*.pod
; do \
711 fn
=`basename $$i .pod`; \
712 sec
=`$(PERL) util/extract-section.pl 3 < $$i`; \
713 echo
$(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
714 $(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/$$fn.
$${sec}$(MANSUFFIX
); \
715 $(PERL
) util
/extract-names.pl
< $$i | \
716 (grep
-v
$$filecase "^$$fn\$$"; true
) | \
717 (grep
-v
"[ ]"; true
) | \
719 echo
$(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/"$$n".
$${sec}$(MANSUFFIX
); \
720 $(RM
) $(INSTALL_PREFIX
)$(MANDIR
)/man
$$sec/"$$n".
$${sec}$(MANSUFFIX
); \
724 # DO NOT DELETE THIS LINE -- make depend depends on it.