]>
Commit | Line | Data |
---|---|---|
d56128f0 RE |
1 | ## |
2 | ## Makefile for OpenSSL | |
3 | ## | |
9ab6fc59 | 4 | ## {- join("\n## ", @autowarntext) -} |
d56128f0 | 5 | |
107b5792 RL |
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} -} | |
e987f9f2 RL |
13 | SHLIB_EXT={- $target{shared_extension} || ".so" -} |
14 | SHLIB_EXT_SIMPLE={- $target{shared_extension_simple} || ".so" -} | |
15 | SHLIB_EXT_IMPORT={- $target{shared_import_extension} || "" -} | |
16 | DSO_EXT={- $target{dso_extension} || ".so" -} | |
107b5792 RL |
17 | PLATFORM={- $config{target} -} |
18 | OPTIONS={- $config{options} -} | |
19 | CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -}) | |
20 | SHLIB_TARGET={- $target{shared_target} -} | |
b436a982 | 21 | |
30c08f2e RL |
22 | # HERE indicates where this Makefile lives. This can be used to indicate |
23 | # where sub-Makefiles are expected to be. Currently has very limited usage, | |
24 | # and should probably not be bothered with at all. | |
25 | HERE=. | |
26 | ||
3c65577f | 27 | # DESTDIR is for package builders so that they can configure |
e5f3045f BM |
28 | # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. |
29 | # Normally it is left empty. | |
3c65577f | 30 | DESTDIR= |
462ba4f6 | 31 | |
d74dfafd RL |
32 | # Do not edit these manually. Use Configure with --prefix or --openssldir |
33 | # to change this! Short explanation in the top comment in Configure | |
5482dac9 RL |
34 | INSTALLTOP={- # $prefix is used in the OPENSSLDIR perl snippet |
35 | # | |
36 | our $prefix = $config{prefix} || "/usr/local"; | |
37 | $prefix -} | |
38 | OPENSSLDIR={- # | |
39 | # The logic here is that if no --openssldir was given, | |
40 | # OPENSSLDIR will get the value from $prefix plus "/ssl". | |
41 | # If --openssldir was given and the value is an absolute | |
42 | # path, OPENSSLDIR will get its value without change. | |
43 | # If the value from --openssldir is a relative path, | |
44 | # OPENSSLDIR will get $prefix with the --openssldir | |
45 | # value appended as a subdirectory. | |
46 | # | |
47 | use File::Spec::Functions; | |
48 | our $openssldir = | |
49 | $config{openssldir} ? | |
50 | (file_name_is_absolute($config{openssldir}) ? | |
51 | $config{openssldir} | |
52 | : catdir($prefix, $config{openssldir})) | |
53 | : catdir($prefix, "ssl"); | |
54 | $openssldir -} | |
55 | LIBDIR={- # | |
56 | # if $prefix/lib$target{multilib} is not an existing | |
57 | # directory, then assume that it's not searched by linker | |
58 | # automatically, in which case adding $target{multilib} suffix | |
59 | # causes more grief than we're ready to tolerate, so don't... | |
60 | our $multilib = | |
61 | -d "$prefix/lib$target{multilib}" ? $target{multilib} : ""; | |
62 | our $libdir = $config{libdir} || "lib$multilib"; | |
63 | $libdir -} | |
64 | ENGINESDIR={- use File::Spec::Functions; | |
65 | catdir($prefix,$libdir,"engines") -} | |
d56128f0 | 66 | |
d02b48c6 RE |
67 | # NO_IDEA - Define to build without the IDEA algorithm |
68 | # NO_RC4 - Define to build without the RC4 algorithm | |
69 | # NO_RC2 - Define to build without the RC2 algorithm | |
70 | # THREADS - Define when building with threads, you will probably also need any | |
c98d63f2 | 71 | # system defines as well, i.e. _REENTRANT for Solaris 2.[34] |
d02b48c6 RE |
72 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. |
73 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. | |
74 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). | |
75 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports | |
58964a49 RE |
76 | # one. 32 bytes will be read from this when the random |
77 | # number generator is initalised. | |
baf748ba | 78 | # SSL_FORBID_ENULL - define if you want the server to be not able to use the |
58964a49 | 79 | # NULL encryption ciphers. |
d02b48c6 RE |
80 | # |
81 | # LOCK_DEBUG - turns on lots of lock debug output :-) | |
f3f1cf84 | 82 | # REF_DEBUG - turn on some xyz_free() assertions. |
58964a49 | 83 | # REF_PRINT - prints some stuff on structure free. |
d02b48c6 | 84 | # MFUNC - Make all Malloc/Free/Realloc calls call |
58964a49 RE |
85 | # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to |
86 | # call application defined callbacks via CRYPTO_set_mem_functions() | |
87 | # MD5_ASM needs to be defined to use the x86 assembler for MD5 | |
88 | # SHA1_ASM needs to be defined to use the x86 assembler for SHA1 | |
89 | # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 | |
dfeab068 RE |
90 | # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must |
91 | # equal 4. | |
92 | # PKCS1_CHECK - pkcs1 tests. | |
d02b48c6 | 93 | |
107b5792 RL |
94 | CROSS_COMPILE= {- $config{cross_compile_prefix} -} |
95 | CC= $(CROSS_COMPILE){- $target{cc} -} | |
2952b9b8 | 96 | CFLAG={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -} |
076e596f | 97 | CFLAG_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -} |
3ed1839d AP |
98 | LDFLAG= {- $target{lflags} -} {- $config{lflags} -} |
99 | PLIB_LDFLAG= {- $target{plib_lflags} -} {- $config{plib_lflags} -} | |
2952b9b8 | 100 | EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -} |
107b5792 RL |
101 | EXE_EXT= {- $target{exe_extension} -} |
102 | ARFLAGS= {- $target{arflags} -} | |
103 | AR=$(CROSS_COMPILE){- $target{ar} -} $(ARFLAGS) r | |
104 | RANLIB= {- $target{ranlib} -} | |
105 | NM= $(CROSS_COMPILE){- $target{nm} -} | |
106 | PERL= {- $config{perl} -} | |
9405a9a2 RS |
107 | #RM= echo -- |
108 | RM= rm -f | |
2dbb3ccd | 109 | TAR= tar |
63977104 | 110 | TARFLAGS= --no-recursion |
5482dac9 | 111 | MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -} |
d02b48c6 | 112 | |
3cc9a89d AP |
113 | # We let the C compiler driver to take care of .s files. This is done in |
114 | # order to be excused from maintaining a separate set of architecture | |
115 | # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC | |
116 | # gcc, then the driver will automatically translate it to -xarch=v8plus | |
117 | # and pass it down to assembler. | |
f072785e | 118 | AS=$(CC) -c |
01fc834b | 119 | ASFLAG=$(CFLAG) |
3cc9a89d | 120 | |
14e21f86 AP |
121 | # For x86 assembler: Set PROCESSOR to 386 if you want to support |
122 | # the 80386. | |
107b5792 | 123 | PROCESSOR= {- $config{processor} -} |
14e21f86 AP |
124 | |
125 | # CPUID module collects small commonly used assembler snippets | |
3a55c92b | 126 | APPS_OBJ={- $target{apps_obj} -} |
107b5792 | 127 | CPUID_OBJ= {- $target{cpuid_obj} -} |
b756967d | 128 | UPLINK_OBJ= {- $target{uplink_obj} -} |
107b5792 RL |
129 | BN_ASM= {- $target{bn_obj} -} |
130 | EC_ASM= {- $target{ec_obj} -} | |
131 | DES_ENC= {- $target{des_obj} -} | |
132 | AES_ENC= {- $target{aes_obj} -} | |
133 | BF_ENC= {- $target{bf_obj} -} | |
134 | CAST_ENC= {- $target{cast_obj} -} | |
135 | RC4_ENC= {- $target{rc4_obj} -} | |
136 | RC5_ENC= {- $target{rc5_obj} -} | |
137 | MD5_ASM_OBJ= {- $target{md5_obj} -} | |
138 | SHA1_ASM_OBJ= {- $target{sha1_obj} -} | |
139 | RMD160_ASM_OBJ= {- $target{rmd160_obj} -} | |
140 | WP_ASM_OBJ= {- $target{wp_obj} -} | |
141 | CMLL_ENC= {- $target{cmll_obj} -} | |
142 | MODES_ASM_OBJ= {- $target{modes_obj} -} | |
05e4e633 | 143 | PADLOCK_ASM_OBJ= {- $target{padlock_obj} -} |
107b5792 RL |
144 | CHACHA_ENC= {- $target{chacha_obj} -} |
145 | POLY1305_ASM_OBJ= {- $target{poly1305_obj} -} | |
146 | PERLASM_SCHEME= {- $target{perlasm_scheme} -} | |
58964a49 | 147 | |
ad2695b1 | 148 | # Zlib stuff |
20a5819f ML |
149 | ZLIB_INCLUDE={- $withargs{zlib_include} -} |
150 | LIBZLIB={- $withargs{zlib_lib} -} | |
ad2695b1 | 151 | |
1ab2f7f1 DSH |
152 | # This is the location of fipscanister.o and friends. |
153 | # The FIPS module build will place it $(INSTALLTOP)/lib | |
154 | # but since $(INSTALLTOP) can only take the default value | |
155 | # when the module is built it will be in /usr/local/ssl/lib | |
5084af28 | 156 | # $(INSTALLTOP) for this build may be different so hard |
1ab2f7f1 DSH |
157 | # code the path. |
158 | ||
107b5792 | 159 | FIPSLIBDIR={- $config{fipslibdir} -} |
1ab2f7f1 | 160 | |
1ab2f7f1 | 161 | # The location of the library which contains fipscanister.o |
f072785e DSH |
162 | # normally it will be libcrypto. If not compiling in FIPS mode |
163 | # at all this is empty making it a useful test for a FIPS compile. | |
1ab2f7f1 | 164 | |
107b5792 | 165 | FIPSCANLIB={- $config{fips} ? "libcrypto" : "" -} |
1ab2f7f1 DSH |
166 | |
167 | # Shared library base address. Currently only used on Windows. | |
168 | # | |
169 | ||
107b5792 | 170 | BASEADDR={- $config{baseaddr} -} |
1ab2f7f1 | 171 | |
107b5792 | 172 | DIRS= {- join(" ", @{$config{dirs}}) -} |
0973910f | 173 | SHLIBDIRS= crypto ssl |
dee502be | 174 | INSTALL_SUBS= engines apps tools |
0973910f | 175 | |
d02b48c6 | 176 | # dirs in crypto to build |
107b5792 | 177 | SDIRS= {- join(" ", @{$config{sdirs}}) -} |
d02b48c6 | 178 | |
f777408f RL |
179 | # tests to perform. "alltests" is a special word indicating that all tests |
180 | # should be performed. | |
181 | TESTS = alltests | |
182 | ||
42ba5d23 | 183 | MAKEFILE= Makefile |
d02b48c6 | 184 | |
d74dfafd | 185 | MANDIR=$(INSTALLTOP)/share/man |
d02b48c6 RE |
186 | MAN1=1 |
187 | MAN3=3 | |
1cc087fe | 188 | MANSUFFIX= |
60cdb821 | 189 | HTMLSUFFIX=html |
d74dfafd | 190 | HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html |
d02b48c6 RE |
191 | SHELL=/bin/sh |
192 | ||
58964a49 | 193 | TOP= . |
b436a982 | 194 | LIBS= libcrypto.a libssl.a |
a22fb399 RL |
195 | SHARED_CRYPTO=libcrypto$(SHLIB_EXT) |
196 | SHARED_SSL=libssl$(SHLIB_EXT) | |
5de75fb4 | 197 | SHARED_LIBS={- $disabled{shared} ? '' : '$(SHARED_CRYPTO) $(SHARED_SSL)' -} |
45502bfe | 198 | SHARED_CFLAG={- $target{shared_cflag} -} |
2952b9b8 | 199 | SHARED_LDFLAG={- $target{shared_ldflag}." ".$config{shared_ldflag} |
5482dac9 RL |
200 | # Unlike other OSes (like Solaris, Linux, Tru64, |
201 | # IRIX) BSD run-time linkers (tested OpenBSD, NetBSD | |
202 | # and FreeBSD) "demand" RPATH set on .so objects. | |
203 | # Apparently application RPATH is not global and | |
204 | # does not apply to .so linked with other .so. | |
205 | # Problem manifests itself when libssl.so fails to | |
206 | # load libcrypto.so. One can argue that we should | |
207 | # engrave this into Makefile.shared rules or into | |
208 | # BSD-* config lines above. Meanwhile let's try to | |
209 | # be cautious and pass -rpath to linker only when | |
210 | # $prefix is not /usr. | |
211 | . ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$| | |
212 | ? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -} | |
64c443e3 | 213 | SHARED_RCFLAG={- $target{shared_rcflag} -} |
343ec2b0 | 214 | DYNAMIC_ENGINES={- $config{dynamic_engines} -} |
58964a49 RE |
215 | |
216 | GENERAL= Makefile | |
9ce5db45 | 217 | BASENAME= openssl |
58964a49 | 218 | NAME= $(BASENAME)-$(VERSION) |
4a544810 | 219 | TARFILE= ../$(NAME).tar |
58964a49 | 220 | HEADER= e_os.h |
d02b48c6 | 221 | |
9405a9a2 RS |
222 | # Directories created on install if they don't exist. |
223 | INSTALLDIRS= \ | |
3c65577f RL |
224 | $(DESTDIR)$(INSTALLTOP)/bin \ |
225 | $(DESTDIR)$(INSTALLTOP)/$(LIBDIR) \ | |
226 | $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines \ | |
227 | $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ | |
228 | $(DESTDIR)$(INSTALLTOP)/include/openssl \ | |
229 | $(DESTDIR)$(OPENSSLDIR)/misc \ | |
230 | $(DESTDIR)$(OPENSSLDIR)/certs \ | |
231 | $(DESTDIR)$(OPENSSLDIR)/private | |
9405a9a2 | 232 | |
7f458a48 | 233 | ENGDIRS={- join(" ", @{$config{engdirs}}) -} |
234 | ||
68a5f1a2 | 235 | all: Makefile build_all_but_tests |
d02b48c6 | 236 | |
02c31fa4 | 237 | # as we stick to -e, CLEARENV ensures that local variables in lower |
a41b0aad AP |
238 | # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn |
239 | # shell, which [annoyingly enough] terminates unset with error if VAR | |
240 | # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh, | |
241 | # which terminates unset with error if no variable was present:-( | |
242 | CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \ | |
02c31fa4 AP |
243 | $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \ |
244 | $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \ | |
245 | $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \ | |
a80e33b9 | 246 | $${HEADER+HEADER} \ |
02c31fa4 AP |
247 | $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \ |
248 | $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \ | |
dce1cc2a | 249 | $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \ |
2f3c39bc | 250 | $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \ |
02c31fa4 AP |
251 | $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} |
252 | ||
193ed2d7 AP |
253 | # LC_ALL=C ensures that error [and other] messages are delivered in |
254 | # same language for uniform treatment. | |
255 | BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\ | |
076e596f | 256 | CC='$(CC)' CFLAG='$(CFLAG)' CFLAG_Q='$(CFLAG_Q)' \ |
45502bfe | 257 | SHARED_CFLAG='$(SHARED_CFLAG)' \ |
f072785e | 258 | AS='$(CC)' ASFLAG='$(CFLAG) -c' \ |
a370537b | 259 | AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ |
45502bfe | 260 | CROSS_COMPILE='$(CROSS_COMPILE)' \ |
343ec2b0 | 261 | PERL='$(PERL)' DYNAMIC_ENGINES='$(DYNAMIC_ENGINES)' \ |
6727565a | 262 | SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ |
3c65577f | 263 | DESTDIR='$(DESTDIR)' \ |
a370537b | 264 | INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \ |
19c5314f | 265 | LIBDIR='$(LIBDIR)' \ |
c86ddbe6 | 266 | SHARED_LDFLAG='$(SHARED_LDFLAG)' \ |
64c443e3 | 267 | SHARED_RCFLAG='$(SHARED_RCFLAG)' \ |
cc7399e7 | 268 | ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \ |
a370537b | 269 | EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \ |
e987f9f2 RL |
270 | SHLIB_EXT='$(SHLIB_EXT)' DSO_EXT='$(DSO_EXT)' \ |
271 | SHLIB_TARGET='$(SHLIB_TARGET)' \ | |
c86ddbe6 RL |
272 | LDFLAG='$(LDFLAG)' \ |
273 | PLIB_LDFLAG='$(PLIB_LDFLAG)' EX_LIBS='$(EX_LIBS)' \ | |
b756967d | 274 | APPS_OBJ='$(APPS_OBJ)' UPLINK_OBJ='$(UPLINK_OBJ)' \ |
6019cdd3 | 275 | CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \ |
9405a9a2 | 276 | EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \ |
a370537b AP |
277 | AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \ |
278 | BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \ | |
279 | RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \ | |
7f458a48 | 280 | ENGDIRS='$(ENGDIRS)' \ |
a370537b AP |
281 | SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \ |
282 | MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \ | |
283 | RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \ | |
284 | WP_ASM_OBJ='$(WP_ASM_OBJ)' \ | |
8a1c92ce | 285 | MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \ |
05e4e633 | 286 | PADLOCK_ASM_OBJ='$(PADLOCK_ASM_OBJ)' \ |
22c2e80f AP |
287 | CHACHA_ENC='$(CHACHA_ENC)' \ |
288 | POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \ | |
a370537b | 289 | PERLASM_SCHEME='$(PERLASM_SCHEME)' \ |
1ab2f7f1 DSH |
290 | FIPSLIBDIR='${FIPSLIBDIR}' \ |
291 | FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \ | |
02c31fa4 AP |
292 | THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= |
293 | # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, | |
294 | # which in turn eliminates ambiguities in variable treatment with -e. | |
d0590fe6 | 295 | |
b480283c RL |
296 | # BUILD_CMD is a generic macro to build a given target in a given |
297 | # subdirectory. The target must be given through the shell variable | |
298 | # `target' and the subdirectory to build in must be given through `dir'. | |
299 | # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or | |
300 | # BUILD_ONE_CMD instead. | |
301 | # | |
b480283c RL |
302 | # RECURSIVE_BUILD_CMD is a macro to build a given target in all |
303 | # subdirectories defined in $(DIRS). It requires that the target | |
304 | # is given through the shell variable `target'. | |
9405a9a2 RS |
305 | # |
306 | # BUILD_ONE_CMD is a macro to build a given target in a given | |
307 | # subdirectory if that subdirectory is part of $(DIRS). It requires | |
308 | # exactly the same shell variables as BUILD_CMD. | |
02c31fa4 AP |
309 | BUILD_CMD= if [ -d "$$dir" ]; then \ |
310 | ( cd $$dir && echo "making $$target in $$dir..." && \ | |
311 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ | |
312 | ) || exit 1; \ | |
313 | fi | |
314 | RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done | |
f5ce5e14 | 315 | BUILD_ONE_CMD=\ |
b3b201b6 | 316 | if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \ |
f5ce5e14 RL |
317 | $(BUILD_CMD); \ |
318 | fi | |
88c80b3e | 319 | |
734540f8 | 320 | reflect: |
02c31fa4 | 321 | @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) |
734540f8 | 322 | |
4c82171a | 323 | sub_all: build_all |
c3f22253 | 324 | |
68a5f1a2 RL |
325 | build_all_but_tests: build_libs build_apps build_tools |
326 | build_all: build_all_but_tests build_tests | |
88c80b3e | 327 | |
177b5f9c RL |
328 | build_libs: build_libcrypto build_libssl openssl.pc |
329 | ||
330 | build_libcrypto: build_crypto build_engines libcrypto.pc | |
331 | build_libssl: build_ssl libssl.pc | |
88c80b3e RL |
332 | |
333 | build_crypto: | |
f072785e | 334 | @dir=crypto; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 335 | build_ssl: build_crypto |
f5ce5e14 | 336 | @dir=ssl; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 337 | build_engines: build_crypto |
ed28aef8 | 338 | @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD) |
c3f22253 RS |
339 | |
340 | build_apps: build_libs | |
f5ce5e14 | 341 | @dir=apps; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 342 | build_tests: build_libs |
f5ce5e14 | 343 | @dir=test; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 344 | build_tools: build_libs |
f5ce5e14 | 345 | @dir=tools; target=all; $(BUILD_ONE_CMD) |
ba5477eb RL |
346 | |
347 | all_testapps: build_libs build_testapps | |
348 | build_testapps: | |
f5ce5e14 | 349 | @dir=crypto; target=testapps; $(BUILD_ONE_CMD) |
b436a982 | 350 | |
f072785e | 351 | libcrypto$(SHLIB_EXT): libcrypto.a |
f4316c36 | 352 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
225c2721 DSH |
353 | if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \ |
354 | FIPSLD_CC="$(CC)"; CC=fips/fipsld; \ | |
355 | export CC FIPSLD_CC; \ | |
356 | fi; \ | |
24e20db4 | 357 | $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \ |
f4316c36 RL |
358 | else \ |
359 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 360 | exit 1; \ |
f4316c36 | 361 | fi |
0f180d1d | 362 | |
a22fb399 | 363 | libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a |
f4316c36 | 364 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
5ddcb866 | 365 | $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ |
f4316c36 RL |
366 | else \ |
367 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 368 | exit 1; \ |
f4316c36 | 369 | fi |
b436a982 | 370 | |
a22fb399 | 371 | link-shared: |
a370537b | 372 | @ set -e; for i in $(SHLIBDIRS); do \ |
755c5b33 | 373 | $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
374 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
375 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 | 376 | symlink.$(SHLIB_TARGET); \ |
6b86bad5 | 377 | libs="$$libs -l$$i"; \ |
0fd44e2d RL |
378 | done |
379 | ||
30afcc07 RL |
380 | build-shared: do_$(SHLIB_TARGET) link-shared |
381 | ||
382 | do_$(SHLIB_TARGET): | |
a370537b | 383 | @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \ |
02c31fa4 | 384 | $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
385 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
386 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 | 387 | LIBDEPS="$$libs $(EX_LIBS)" \ |
e048fd51 | 388 | link_shlib.$(SHLIB_TARGET); \ |
c1269c81 | 389 | libs="-l$$i $$libs"; \ |
fcf80c46 RL |
390 | case "$(PLATFORM)" in \ |
391 | Cygwin*) \ | |
392 | rm -f apps/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \ | |
393 | rm -f test/cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll; \ | |
394 | cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll apps/; \ | |
395 | cp cyg$$i-$(SHLIB_MAJOR).$(SHLIB_MINOR).dll test/; \ | |
396 | ;; \ | |
397 | mingw*) \ | |
520f434b RL |
398 | arch=; \ |
399 | if expr $(PLATFORM) : mingw64 > /dev/null; then \ | |
400 | arch=-x64; \ | |
401 | fi; \ | |
402 | rm -f apps/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \ | |
403 | rm -f test/lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll; \ | |
404 | cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll apps/; \ | |
405 | cp lib$$i-$(SHLIB_MAJOR)_$(SHLIB_MINOR)$$arch.dll test/; \ | |
406 | ;; \ | |
fcf80c46 | 407 | esac; \ |
a3fffd64 RL |
408 | done |
409 | ||
0962fbbf RL |
410 | libcrypto.pc: Makefile |
411 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
412 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 413 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
414 | echo 'includedir=$${prefix}/include'; \ |
415 | echo ''; \ | |
416 | echo 'Name: OpenSSL-libcrypto'; \ | |
417 | echo 'Description: OpenSSL cryptography library'; \ | |
418 | echo 'Version: '$(VERSION); \ | |
419 | echo 'Requires: '; \ | |
04296664 DSH |
420 | echo 'Libs: -L$${libdir} -lcrypto'; \ |
421 | echo 'Libs.private: $(EX_LIBS)'; \ | |
e36827f6 | 422 | echo 'Cflags: -I$${includedir}' ) > libcrypto.pc |
0962fbbf RL |
423 | |
424 | libssl.pc: Makefile | |
425 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
426 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 427 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
428 | echo 'includedir=$${prefix}/include'; \ |
429 | echo ''; \ | |
e6479c76 | 430 | echo 'Name: OpenSSL-libssl'; \ |
0962fbbf RL |
431 | echo 'Description: Secure Sockets Layer and cryptography libraries'; \ |
432 | echo 'Version: '$(VERSION); \ | |
e6479c76 MF |
433 | echo 'Requires.private: libcrypto'; \ |
434 | echo 'Libs: -L$${libdir} -lssl'; \ | |
04296664 | 435 | echo 'Libs.private: $(EX_LIBS)'; \ |
e36827f6 | 436 | echo 'Cflags: -I$${includedir}' ) > libssl.pc |
0962fbbf | 437 | |
42ba5d23 | 438 | openssl.pc: Makefile |
56824b96 RL |
439 | @ ( echo 'prefix=$(INSTALLTOP)'; \ |
440 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 441 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
56824b96 RL |
442 | echo 'includedir=$${prefix}/include'; \ |
443 | echo ''; \ | |
444 | echo 'Name: OpenSSL'; \ | |
445 | echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ | |
446 | echo 'Version: '$(VERSION); \ | |
e6479c76 | 447 | echo 'Requires: libssl libcrypto' ) > openssl.pc |
56824b96 | 448 | |
d10dac11 RS |
449 | Makefile: Makefile.in Configure config |
450 | @echo "Makefile is older than Makefile.in, Configure or config." | |
49b81422 | 451 | @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." |
9535d202 BL |
452 | @false |
453 | ||
dfeab068 | 454 | libclean: |
acb2f06a | 455 | rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib |
dfeab068 | 456 | |
7841edc9 | 457 | clean: libclean |
6ab36414 | 458 | rm -f */*/*.o */*.o *.o core a.out fluff testlog make.log cctest cctest.c |
56999ba5 | 459 | rm -rf *.bak certs/.0 |
02c31fa4 | 460 | @set -e; target=clean; $(RECURSIVE_BUILD_CMD) |
34ccd24d | 461 | rm -f $(LIBS) tags TAGS |
0962fbbf | 462 | rm -f openssl.pc libssl.pc libcrypto.pc |
7841edc9 | 463 | rm -f speed.* .pure |
bb8f3c58 | 464 | rm -f $(TARFILE) |
d02b48c6 RE |
465 | |
466 | makefile.one: files | |
99aab161 | 467 | $(PERL) util/mk1mf.pl >makefile.one; \ |
d02b48c6 RE |
468 | sh util/do_ms.sh |
469 | ||
bacad008 | 470 | files: |
42ba5d23 | 471 | $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO |
02c31fa4 | 472 | @set -e; target=files; $(RECURSIVE_BUILD_CMD) |
d02b48c6 | 473 | |
1cc67fa8 RL |
474 | gentests: |
475 | @(cd test && echo "generating dummy tests (if needed)..." && \ | |
a370537b | 476 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate ); |
1cc67fa8 | 477 | |
7984f082 | 478 | test: files tests |
d02b48c6 | 479 | |
6ab36414 | 480 | tests: build_tests |
bb8f3c58 | 481 | @(cd test && echo "testing..." && \ |
220bd849 | 482 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests ); |
1a3ae788 RS |
483 | @if [ -z "$(CROSS_COMPILE)" ]; then \ |
484 | OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \ | |
485 | fi | |
d02b48c6 | 486 | |
1780e6d9 RL |
487 | list-tests: |
488 | @(cd test && \ | |
489 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests) | |
490 | ||
d7f0ab5f UM |
491 | report: |
492 | @$(PERL) util/selftest.pl | |
493 | ||
34ccd24d RS |
494 | tags TAGS: FORCE |
495 | rm -f TAGS tags | |
496 | -ctags -R . | |
7a64489f | 497 | -etags `find . -name '*.[ch]' -o -name '*.pm'` |
34ccd24d RS |
498 | |
499 | FORCE: | |
d02b48c6 | 500 | |
8cef1212 RS |
501 | depend: |
502 | @set -e; target=depend; $(RECURSIVE_BUILD_CMD) | |
503 | ||
504 | update: generate errors ordinals depend | |
505 | ||
506 | generate: | |
7eba4e62 VD |
507 | (cd apps && PERL='${PERL}' $(MAKE) generate) |
508 | (cd crypto/bn && PERL='${PERL}' $(MAKE) generate) | |
509 | (cd crypto/objects && PERL='${PERL}' $(MAKE) generate) | |
8cef1212 | 510 | |
d02b48c6 | 511 | errors: |
797c61aa | 512 | $(PERL) util/ck_errf.pl -strict */*.c */*/*.c |
f6485909 | 513 | $(PERL) util/mkerr.pl -recurse -write |
506fec1a | 514 | (cd engines; $(MAKE) PERL=$(PERL) errors) |
d02b48c6 | 515 | |
6928b617 RL |
516 | ordinals: util/libcrypto.num util/libssl.num test_ordinals TABLE |
517 | util/libcrypto.num:: | |
f6485909 | 518 | $(PERL) util/mkdef.pl crypto update |
6928b617 | 519 | util/libssl.num:: |
f6485909 | 520 | $(PERL) util/mkdef.pl ssl update |
8cef1212 RS |
521 | test_ordinals: |
522 | TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals | |
7740a1c6 | 523 | |
97a0cc52 | 524 | TABLE: Configure Configurations/*.conf |
2330e18b | 525 | (echo 'Output of `Configure TABLE'"':"; \ |
f6485909 | 526 | $(PERL) Configure TABLE) > TABLE |
7740a1c6 | 527 | |
f9de8446 LJ |
528 | # Build distribution tar-file. As the list of files returned by "find" is |
529 | # pretty long, on several platforms a "too many arguments" error or similar | |
530 | # would occur. Therefore the list of files is temporarily stored into a file | |
531 | # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal | |
532 | # tar does not support the --files-from option. | |
4a544810 | 533 | TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \ |
2b0e65d0 | 534 | --owner 0 --group 0 \ |
4a544810 | 535 | --transform 's|^|$(NAME)/|' \ |
27f98436 RL |
536 | -cvf - |
537 | ||
4a544810 | 538 | $(TARFILE).list: |
2b0e65d0 RL |
539 | git diff --quiet HEAD |
540 | git ls-files | sort > $(TARFILE).list | |
27f98436 | 541 | |
4a544810 | 542 | tar: $(TARFILE).list |
756b9a00 LJ |
543 | find . -type d -print | xargs chmod 755 |
544 | find . -type f -print | xargs chmod a+r | |
545 | find . -type f -perm -0100 -print | xargs chmod a+x | |
4a544810 RL |
546 | $(TAR_COMMAND) | gzip --best > $(TARFILE).gz |
547 | rm -f $(TARFILE).list | |
548 | ls -l $(TARFILE).gz | |
d02b48c6 | 549 | |
4a544810 RL |
550 | tar-snap: $(TARFILE).list |
551 | $(TAR_COMMAND) > $(TARFILE) | |
552 | rm -f $(TARFILE).list | |
553 | ls -l $(TARFILE) | |
41d2a336 | 554 | |
7984f082 | 555 | dist: |
99aab161 | 556 | $(PERL) Configure dist |
a370537b | 557 | @$(MAKE) SDIRS='$(SDIRS)' clean |
4d3c30a1 | 558 | @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar |
d02b48c6 | 559 | |
28a80034 RL |
560 | install: all install_docs install_sw |
561 | ||
9405a9a2 RS |
562 | uninstall: uninstall_sw uninstall_docs |
563 | ||
28a80034 | 564 | install_sw: |
9405a9a2 | 565 | @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS) |
dee502be | 566 | @set -e; for i in include/openssl/*.h; do \ |
3c65577f RL |
567 | (cp $$i $(DESTDIR)$(INSTALLTOP)/$$i; \ |
568 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$$i ); \ | |
2a4a0a34 | 569 | done; |
dee502be | 570 | @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done |
d341e402 | 571 | @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ |
d02b48c6 | 572 | do \ |
b436a982 RL |
573 | if [ -f "$$i" ]; then \ |
574 | ( echo installing $$i; \ | |
3c65577f RL |
575 | cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
576 | $(RANLIB) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
577 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
578 | mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ | |
2c975b50 LJ |
579 | fi; \ |
580 | done; | |
cfd06a62 | 581 | @set -e; if [ -n "$(SHARED_LIBS)" ]; then \ |
a22fb399 RL |
582 | tmp="$(SHARED_LIBS)"; \ |
583 | for i in $${tmp:-x}; \ | |
584 | do \ | |
1fe198b6 | 585 | if [ -f "$$i" -o -f "$$i.a" ]; then \ |
520f434b RL |
586 | case "$(PLATFORM)" in \ |
587 | Cygwin*) \ | |
588 | c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ | |
589 | echo installing $$c; \ | |
3c65577f RL |
590 | cp $$c $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ |
591 | chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$c.new; \ | |
592 | mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$c.new $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ | |
520f434b RL |
593 | echo installing $$i.a; \ |
594 | cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ | |
595 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ | |
596 | mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ | |
597 | ;; \ | |
598 | mingw*) \ | |
599 | arch=; \ | |
600 | if expr $(PLATFORM) : mingw64 > /dev/null; then \ | |
601 | arch=-x64; \ | |
602 | fi; \ | |
603 | m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \ | |
604 | echo installing $$m; \ | |
605 | cp $$m $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \ | |
606 | chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$m.new; \ | |
607 | mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$m.new $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ | |
608 | echo installing $$i.a; \ | |
609 | cp $$i.a $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ | |
610 | chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new; \ | |
611 | mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ | |
612 | ;; \ | |
613 | *) \ | |
614 | echo installing $$i; \ | |
3c65577f RL |
615 | cp $$i $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
616 | chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
617 | mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
520f434b RL |
618 | ;; \ |
619 | esac; \ | |
2c975b50 | 620 | fi; \ |
a22fb399 RL |
621 | done; \ |
622 | ( here="`pwd`"; \ | |
3c65577f | 623 | cd $(DESTDIR)$(INSTALLTOP)/$(LIBDIR); \ |
4c3a2d64 | 624 | $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \ |
e68cb95d RL |
625 | if [ "$(INSTALLTOP)" != "/usr" ]; then \ |
626 | echo 'OpenSSL shared libraries have been installed in:'; \ | |
627 | echo ' $(INSTALLTOP)'; \ | |
e68cb95d | 628 | fi; \ |
a22fb399 | 629 | fi |
3c65577f RL |
630 | cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig |
631 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc | |
632 | cp libssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
633 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
634 | cp openssl.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
635 | chmod 644 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
e6e7b5f3 | 636 | |
9405a9a2 | 637 | uninstall_sw: |
3c65577f | 638 | cd include/openssl && files=* && cd $(DESTDIR)$(INSTALLTOP)/include/openssl && $(RM) $$files |
9405a9a2 RS |
639 | @for i in $(LIBS) ;\ |
640 | do \ | |
641 | test -f "$$i" && \ | |
3c65577f RL |
642 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i && \ |
643 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
9405a9a2 RS |
644 | done; |
645 | @if [ -n "$(SHARED_LIBS)" ]; then \ | |
646 | tmp="$(SHARED_LIBS)"; \ | |
647 | for i in $${tmp:-x}; \ | |
648 | do \ | |
649 | if [ -f "$$i" -o -f "$$i.a" ]; then \ | |
520f434b RL |
650 | case "$(PLATFORM)" in \ |
651 | Cygwin*) \ | |
652 | c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ | |
3c65577f RL |
653 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ |
654 | $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$c; \ | |
520f434b RL |
655 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ |
656 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ | |
657 | ;; \ | |
658 | mingw*) \ | |
659 | arch=; \ | |
660 | if expr $(PLATFORM) : mingw64 > /dev/null; then \ | |
661 | arch=-x64; \ | |
662 | fi; \ | |
663 | m=`echo $$i | sed -e 's/\.dll$$/-$(SHLIB_MAJOR)_$(SHLIB_MINOR)'"$$arch"'.dll/'`; \ | |
664 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ | |
665 | $(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$m; \ | |
666 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ | |
667 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i.a; \ | |
668 | ;; \ | |
669 | *) \ | |
3c65577f RL |
670 | echo $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ |
671 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
520f434b RL |
672 | ;; \ |
673 | esac; \ | |
9405a9a2 RS |
674 | fi; \ |
675 | done; \ | |
676 | fi | |
3c65577f RL |
677 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc |
678 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
679 | $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
df302cdc | 680 | @target=uninstall; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done |
9405a9a2 | 681 | |
60cdb821 UM |
682 | install_html_docs: |
683 | here="`pwd`"; \ | |
82d9185a | 684 | filecase=; \ |
457f7b14 | 685 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
82d9185a JR |
686 | filecase=-i; \ |
687 | esac; \ | |
60cdb821 | 688 | for subdir in apps crypto ssl; do \ |
3c65577f | 689 | $(PERL) $(TOP)/util/mkdir-p $(DESTDIR)$(HTMLDIR)/$$subdir; \ |
60cdb821 UM |
690 | for i in doc/$$subdir/*.pod; do \ |
691 | fn=`basename $$i .pod`; \ | |
692 | echo "installing html/$$fn.$(HTMLSUFFIX)"; \ | |
693 | cat $$i \ | |
694 | | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \ | |
690a2b1f | 695 | | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \ |
60cdb821 | 696 | | sed -r 's/<!DOCTYPE.*//g' \ |
3c65577f | 697 | > $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ |
60cdb821 UM |
698 | $(PERL) util/extract-names.pl < $$i | \ |
699 | grep -v $$filecase "^$$fn\$$" | \ | |
3c65577f | 700 | (cd $(DESTDIR)$(HTMLDIR)/$$subdir; \ |
60cdb821 | 701 | while read n; do \ |
220bd849 | 702 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \ |
60cdb821 UM |
703 | done); \ |
704 | done; \ | |
705 | done | |
706 | ||
9405a9a2 RS |
707 | uninstall_html_docs: |
708 | here="`pwd`"; \ | |
709 | filecase=; \ | |
710 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ | |
711 | filecase=-i; \ | |
712 | esac; \ | |
713 | for subdir in apps crypto ssl; do \ | |
714 | for i in doc/$$subdir/*.pod; do \ | |
715 | fn=`basename $$i .pod`; \ | |
3c65577f | 716 | $(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ |
9405a9a2 RS |
717 | $(PERL) util/extract-names.pl < $$i | \ |
718 | grep -v $$filecase "^$$fn\$$" | \ | |
719 | while read n; do \ | |
3c65577f | 720 | $(RM) $(DESTDIR)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \ |
9405a9a2 RS |
721 | done; \ |
722 | done; \ | |
723 | done | |
724 | ||
e6e7b5f3 BM |
725 | install_docs: |
726 | @$(PERL) $(TOP)/util/mkdir-p.pl \ | |
3c65577f RL |
727 | $(DESTDIR)$(MANDIR)/man1 \ |
728 | $(DESTDIR)$(MANDIR)/man3 \ | |
729 | $(DESTDIR)$(MANDIR)/man5 \ | |
730 | $(DESTDIR)$(MANDIR)/man7 | |
ec9f67f6 RL |
731 | here="`pwd`"; \ |
732 | filecase=; \ | |
457f7b14 | 733 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
ec9f67f6 | 734 | filecase=-i; \ |
b3ef742c | 735 | esac; \ |
cfd06a62 | 736 | set -e; for i in doc/apps/*.pod; do \ |
c6ce792f | 737 | fn=`basename $$i .pod`; \ |
401ee37a | 738 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ |
1cc087fe | 739 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 740 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 741 | pod2man \ |
2962243d | 742 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 743 | --release=$(VERSION) `basename $$i`) \ |
3c65577f | 744 | > $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 745 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
746 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
747 | (grep -v "[ ]"; true) | \ | |
3c65577f | 748 | (cd $(DESTDIR)$(MANDIR)/man$$sec/; \ |
ec9f67f6 | 749 | while read n; do \ |
220bd849 | 750 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 751 | done); \ |
f6f99618 | 752 | done; \ |
cfd06a62 | 753 | set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \ |
c6ce792f | 754 | fn=`basename $$i .pod`; \ |
401ee37a | 755 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ |
1cc087fe | 756 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 757 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 758 | pod2man \ |
2962243d | 759 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 760 | --release=$(VERSION) `basename $$i`) \ |
3c65577f | 761 | > $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 762 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
763 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
764 | (grep -v "[ ]"; true) | \ | |
3c65577f | 765 | (cd $(DESTDIR)$(MANDIR)/man$$sec/; \ |
ec9f67f6 | 766 | while read n; do \ |
220bd849 | 767 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 768 | done); \ |
c6ce792f | 769 | done |
d02b48c6 | 770 | |
9405a9a2 RS |
771 | uninstall_docs: |
772 | @here="`pwd`"; \ | |
773 | filecase=; \ | |
774 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \ | |
775 | filecase=-i; \ | |
776 | esac; \ | |
777 | for i in doc/apps/*.pod; do \ | |
778 | fn=`basename $$i .pod`; \ | |
779 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ | |
3c65577f RL |
780 | echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
781 | $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
9405a9a2 RS |
782 | $(PERL) util/extract-names.pl < $$i | \ |
783 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
784 | (grep -v "[ ]"; true) | \ | |
785 | while read n; do \ | |
3c65577f RL |
786 | echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ |
787 | $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
9405a9a2 RS |
788 | done; \ |
789 | done; \ | |
790 | for i in doc/crypto/*.pod doc/ssl/*.pod; do \ | |
791 | fn=`basename $$i .pod`; \ | |
792 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ | |
3c65577f RL |
793 | echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
794 | $(RM) $(DESTDIR)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
9405a9a2 RS |
795 | $(PERL) util/extract-names.pl < $$i | \ |
796 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
797 | (grep -v "[ ]"; true) | \ | |
798 | while read n; do \ | |
3c65577f RL |
799 | echo $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ |
800 | $(RM) $(DESTDIR)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
9405a9a2 RS |
801 | done; \ |
802 | done | |
803 | ||
d02b48c6 | 804 | # DO NOT DELETE THIS LINE -- make depend depends on it. |