]>
Commit | Line | Data |
---|---|---|
d56128f0 RE |
1 | ## |
2 | ## Makefile for OpenSSL | |
3 | ## | |
4 | ||
0973910f UM |
5 | VERSION= |
6 | MAJOR= | |
7 | MINOR= | |
b436a982 RL |
8 | SHLIB_VERSION_NUMBER= |
9 | SHLIB_VERSION_HISTORY= | |
10 | SHLIB_MAJOR= | |
11 | SHLIB_MINOR= | |
a22fb399 | 12 | SHLIB_EXT= |
d56128f0 | 13 | PLATFORM=dist |
31ff97b2 | 14 | OPTIONS= |
c59cb511 | 15 | CONFIGURE_ARGS= |
b436a982 RL |
16 | SHLIB_TARGET= |
17 | ||
30c08f2e RL |
18 | # HERE indicates where this Makefile lives. This can be used to indicate |
19 | # where sub-Makefiles are expected to be. Currently has very limited usage, | |
20 | # and should probably not be bothered with at all. | |
21 | HERE=. | |
22 | ||
e5f3045f BM |
23 | # INSTALL_PREFIX is for package builders so that they can configure |
24 | # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. | |
25 | # Normally it is left empty. | |
26 | INSTALL_PREFIX= | |
462ba4f6 UM |
27 | INSTALLTOP=/usr/local/ssl |
28 | ||
29 | # Do not edit this manually. Use Configure --openssldir=DIR do change this! | |
30 | OPENSSLDIR=/usr/local/ssl | |
d56128f0 | 31 | |
d02b48c6 RE |
32 | # NO_IDEA - Define to build without the IDEA algorithm |
33 | # NO_RC4 - Define to build without the RC4 algorithm | |
34 | # NO_RC2 - Define to build without the RC2 algorithm | |
35 | # THREADS - Define when building with threads, you will probably also need any | |
58964a49 | 36 | # system defines as well, i.e. _REENTERANT for Solaris 2.[34] |
d02b48c6 RE |
37 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. |
38 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. | |
39 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). | |
40 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports | |
58964a49 RE |
41 | # one. 32 bytes will be read from this when the random |
42 | # number generator is initalised. | |
baf748ba | 43 | # SSL_FORBID_ENULL - define if you want the server to be not able to use the |
58964a49 | 44 | # NULL encryption ciphers. |
d02b48c6 RE |
45 | # |
46 | # LOCK_DEBUG - turns on lots of lock debug output :-) | |
47 | # REF_CHECK - turn on some xyz_free() assertions. | |
58964a49 | 48 | # REF_PRINT - prints some stuff on structure free. |
d02b48c6 RE |
49 | # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff |
50 | # MFUNC - Make all Malloc/Free/Realloc calls call | |
58964a49 RE |
51 | # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to |
52 | # call application defined callbacks via CRYPTO_set_mem_functions() | |
53 | # MD5_ASM needs to be defined to use the x86 assembler for MD5 | |
54 | # SHA1_ASM needs to be defined to use the x86 assembler for SHA1 | |
55 | # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 | |
dfeab068 RE |
56 | # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must |
57 | # equal 4. | |
58 | # PKCS1_CHECK - pkcs1 tests. | |
d02b48c6 | 59 | |
67ea999d AP |
60 | CC= cc |
61 | CFLAG= -O | |
f5d7a031 | 62 | DEPFLAG= |
bc29d0e5 | 63 | PEX_LIBS= |
651d0aff | 64 | EX_LIBS= |
967d95f0 | 65 | EXE_EXT= |
179add2b RL |
66 | ARFLAGS= |
67 | AR=ar $(ARFLAGS) r | |
99aab161 | 68 | RANLIB= ranlib |
cbfb39d1 | 69 | NM= nm |
99aab161 | 70 | PERL= perl |
9405a9a2 RS |
71 | #RM= echo -- |
72 | RM= rm -f | |
2dbb3ccd | 73 | TAR= tar |
63977104 | 74 | TARFLAGS= --no-recursion |
cf1b7d96 | 75 | MAKEDEPPROG=makedepend |
6727565a | 76 | LIBDIR=lib |
d02b48c6 | 77 | |
3cc9a89d AP |
78 | # We let the C compiler driver to take care of .s files. This is done in |
79 | # order to be excused from maintaining a separate set of architecture | |
80 | # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC | |
81 | # gcc, then the driver will automatically translate it to -xarch=v8plus | |
82 | # and pass it down to assembler. | |
f072785e | 83 | AS=$(CC) -c |
01fc834b | 84 | ASFLAG=$(CFLAG) |
3cc9a89d | 85 | |
14e21f86 AP |
86 | # For x86 assembler: Set PROCESSOR to 386 if you want to support |
87 | # the 80386. | |
88 | PROCESSOR= | |
89 | ||
90 | # CPUID module collects small commonly used assembler snippets | |
91 | CPUID_OBJ= | |
dfeab068 | 92 | BN_ASM= bn_asm.o |
6019cdd3 | 93 | EC_ASM= |
67ea999d | 94 | DES_ENC= des_enc.o fcrypt_b.o |
0ddd3ea2 | 95 | AES_ENC= aes_core.o aes_cbc.o |
67ea999d AP |
96 | BF_ENC= bf_enc.o |
97 | CAST_ENC= c_enc.o | |
98 | RC4_ENC= rc4_enc.o | |
99 | RC5_ENC= rc5_enc.o | |
100 | MD5_ASM_OBJ= | |
101 | SHA1_ASM_OBJ= | |
102 | RMD160_ASM_OBJ= | |
ed26604a | 103 | WP_ASM_OBJ= |
6a8517f2 | 104 | CMLL_ENC= |
8a1c92ce | 105 | MODES_ASM_OBJ= |
ed28aef8 | 106 | ENGINES_ASM_OBJ= |
fa8e921f | 107 | PERLASM_SCHEME= |
58964a49 | 108 | |
f9b3bff6 RL |
109 | # KRB5 stuff |
110 | KRB5_INCLUDES= | |
c1269c81 | 111 | LIBKRB5= |
f9b3bff6 | 112 | |
ad2695b1 DSH |
113 | # Zlib stuff |
114 | ZLIB_INCLUDE= | |
115 | LIBZLIB= | |
116 | ||
1ab2f7f1 DSH |
117 | # This is the location of fipscanister.o and friends. |
118 | # The FIPS module build will place it $(INSTALLTOP)/lib | |
119 | # but since $(INSTALLTOP) can only take the default value | |
120 | # when the module is built it will be in /usr/local/ssl/lib | |
5084af28 | 121 | # $(INSTALLTOP) for this build may be different so hard |
1ab2f7f1 DSH |
122 | # code the path. |
123 | ||
124 | FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/ | |
125 | ||
1ab2f7f1 | 126 | # The location of the library which contains fipscanister.o |
f072785e DSH |
127 | # normally it will be libcrypto. If not compiling in FIPS mode |
128 | # at all this is empty making it a useful test for a FIPS compile. | |
1ab2f7f1 DSH |
129 | |
130 | FIPSCANLIB= | |
131 | ||
132 | # Shared library base address. Currently only used on Windows. | |
133 | # | |
134 | ||
135 | BASEADDR= | |
136 | ||
71a5f534 | 137 | DIRS= crypto ssl engines apps test tools |
ef236ec3 | 138 | ENGDIRS= ccgost |
0973910f UM |
139 | SHLIBDIRS= crypto ssl |
140 | ||
d02b48c6 RE |
141 | # dirs in crypto to build |
142 | SDIRS= \ | |
d87b79bf | 143 | objects \ |
d1593e6b | 144 | md2 md4 md5 sha mdc2 hmac ripemd whrlpool \ |
5d48a66a | 145 | des aes rc2 rc4 rc5 idea bf cast camellia seed modes \ |
67ea999d | 146 | bn ec rsa dsa ecdsa dh ecdh dso engine \ |
d87b79bf | 147 | buffer bio stack lhash rand err \ |
a5db6fa5 | 148 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \ |
edc032b5 | 149 | cms pqueue ts jpake srp store cmac |
02c31fa4 AP |
150 | # keep in mind that the above list is adjusted by ./Configure |
151 | # according to no-xxx arguments... | |
d02b48c6 | 152 | |
f777408f RL |
153 | # tests to perform. "alltests" is a special word indicating that all tests |
154 | # should be performed. | |
155 | TESTS = alltests | |
156 | ||
42ba5d23 | 157 | MAKEFILE= Makefile |
d02b48c6 | 158 | |
e1c55191 | 159 | MANDIR=$(OPENSSLDIR)/man |
d02b48c6 RE |
160 | MAN1=1 |
161 | MAN3=3 | |
1cc087fe | 162 | MANSUFFIX= |
60cdb821 UM |
163 | HTMLSUFFIX=html |
164 | HTMLDIR=$(OPENSSLDIR)/html | |
d02b48c6 RE |
165 | SHELL=/bin/sh |
166 | ||
58964a49 | 167 | TOP= . |
d02b48c6 | 168 | ONEDIRS=out tmp |
7d7d2cbc | 169 | EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS |
58964a49 | 170 | WDIRS= windows |
b436a982 | 171 | LIBS= libcrypto.a libssl.a |
a22fb399 RL |
172 | SHARED_CRYPTO=libcrypto$(SHLIB_EXT) |
173 | SHARED_SSL=libssl$(SHLIB_EXT) | |
174 | SHARED_LIBS= | |
175 | SHARED_LIBS_LINK_EXTS= | |
a5595fde | 176 | SHARED_LDFLAGS= |
58964a49 RE |
177 | |
178 | GENERAL= Makefile | |
9ce5db45 | 179 | BASENAME= openssl |
58964a49 RE |
180 | NAME= $(BASENAME)-$(VERSION) |
181 | TARFILE= $(NAME).tar | |
182 | WTARFILE= $(NAME)-win.tar | |
cf1b7d96 | 183 | EXHEADER= e_os2.h |
58964a49 | 184 | HEADER= e_os.h |
d02b48c6 | 185 | |
9405a9a2 RS |
186 | # Directories created on install if they don't exist. |
187 | INSTALLDIRS= \ | |
188 | $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ | |
189 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ | |
190 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ | |
191 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ | |
192 | $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ | |
193 | $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ | |
194 | $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ | |
195 | $(INSTALL_PREFIX)$(OPENSSLDIR)/private | |
196 | ||
0962fbbf | 197 | all: Makefile build_all openssl.pc libssl.pc libcrypto.pc |
d02b48c6 | 198 | |
02c31fa4 | 199 | # as we stick to -e, CLEARENV ensures that local variables in lower |
a41b0aad AP |
200 | # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn |
201 | # shell, which [annoyingly enough] terminates unset with error if VAR | |
202 | # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh, | |
203 | # which terminates unset with error if no variable was present:-( | |
204 | CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \ | |
02c31fa4 AP |
205 | $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \ |
206 | $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \ | |
207 | $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \ | |
208 | $${EXHEADER+EXHEADER} $${HEADER+HEADER} \ | |
209 | $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \ | |
210 | $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \ | |
dce1cc2a | 211 | $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \ |
2f3c39bc | 212 | $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \ |
02c31fa4 AP |
213 | $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} |
214 | ||
a370537b AP |
215 | BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \ |
216 | CC='$(CC)' CFLAG='$(CFLAG)' \ | |
f072785e | 217 | AS='$(CC)' ASFLAG='$(CFLAG) -c' \ |
a370537b | 218 | AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ |
34775923 | 219 | CROSS_COMPILE='$(CROSS_COMPILE)' \ |
ef236ec3 | 220 | PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \ |
6727565a | 221 | SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ |
a370537b AP |
222 | INSTALL_PREFIX='$(INSTALL_PREFIX)' \ |
223 | INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \ | |
19c5314f | 224 | LIBDIR='$(LIBDIR)' \ |
a370537b AP |
225 | MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \ |
226 | DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \ | |
227 | MAKEDEPPROG='$(MAKEDEPPROG)' \ | |
228 | SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \ | |
229 | KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \ | |
cc7399e7 | 230 | ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \ |
a370537b AP |
231 | EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \ |
232 | SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \ | |
233 | PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \ | |
6019cdd3 | 234 | CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \ |
9405a9a2 | 235 | EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \ |
a370537b AP |
236 | AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \ |
237 | BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \ | |
238 | RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \ | |
239 | SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \ | |
240 | MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \ | |
241 | RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \ | |
242 | WP_ASM_OBJ='$(WP_ASM_OBJ)' \ | |
8a1c92ce | 243 | MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \ |
ed28aef8 | 244 | ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \ |
a370537b | 245 | PERLASM_SCHEME='$(PERLASM_SCHEME)' \ |
1ab2f7f1 DSH |
246 | FIPSLIBDIR='${FIPSLIBDIR}' \ |
247 | FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \ | |
02c31fa4 AP |
248 | THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= |
249 | # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, | |
250 | # which in turn eliminates ambiguities in variable treatment with -e. | |
d0590fe6 | 251 | |
b480283c RL |
252 | # BUILD_CMD is a generic macro to build a given target in a given |
253 | # subdirectory. The target must be given through the shell variable | |
254 | # `target' and the subdirectory to build in must be given through `dir'. | |
255 | # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or | |
256 | # BUILD_ONE_CMD instead. | |
257 | # | |
b480283c RL |
258 | # RECURSIVE_BUILD_CMD is a macro to build a given target in all |
259 | # subdirectories defined in $(DIRS). It requires that the target | |
260 | # is given through the shell variable `target'. | |
9405a9a2 RS |
261 | # |
262 | # BUILD_ONE_CMD is a macro to build a given target in a given | |
263 | # subdirectory if that subdirectory is part of $(DIRS). It requires | |
264 | # exactly the same shell variables as BUILD_CMD. | |
02c31fa4 AP |
265 | BUILD_CMD= if [ -d "$$dir" ]; then \ |
266 | ( cd $$dir && echo "making $$target in $$dir..." && \ | |
267 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ | |
268 | ) || exit 1; \ | |
269 | fi | |
270 | RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done | |
f5ce5e14 | 271 | BUILD_ONE_CMD=\ |
b3b201b6 | 272 | if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \ |
f5ce5e14 RL |
273 | $(BUILD_CMD); \ |
274 | fi | |
88c80b3e | 275 | |
734540f8 | 276 | reflect: |
02c31fa4 | 277 | @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) |
734540f8 | 278 | |
4c82171a | 279 | sub_all: build_all |
c3f22253 | 280 | |
88c80b3e RL |
281 | build_all: build_libs build_apps build_tests build_tools |
282 | ||
f072785e | 283 | build_libs: build_crypto build_ssl build_engines |
88c80b3e RL |
284 | |
285 | build_crypto: | |
f072785e | 286 | @dir=crypto; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 287 | build_ssl: build_crypto |
f5ce5e14 | 288 | @dir=ssl; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 289 | build_engines: build_crypto |
ed28aef8 | 290 | @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD) |
c3f22253 RS |
291 | |
292 | build_apps: build_libs | |
f5ce5e14 | 293 | @dir=apps; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 294 | build_tests: build_libs |
f5ce5e14 | 295 | @dir=test; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 296 | build_tools: build_libs |
f5ce5e14 | 297 | @dir=tools; target=all; $(BUILD_ONE_CMD) |
ba5477eb RL |
298 | |
299 | all_testapps: build_libs build_testapps | |
300 | build_testapps: | |
f5ce5e14 | 301 | @dir=crypto; target=testapps; $(BUILD_ONE_CMD) |
b436a982 | 302 | |
f072785e | 303 | libcrypto$(SHLIB_EXT): libcrypto.a |
f4316c36 | 304 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
225c2721 DSH |
305 | if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \ |
306 | FIPSLD_CC="$(CC)"; CC=fips/fipsld; \ | |
307 | export CC FIPSLD_CC; \ | |
308 | fi; \ | |
24e20db4 | 309 | $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \ |
f4316c36 RL |
310 | else \ |
311 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 312 | exit 1; \ |
f4316c36 | 313 | fi |
0f180d1d | 314 | |
a22fb399 | 315 | libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a |
f4316c36 | 316 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
5ddcb866 | 317 | $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ |
f4316c36 RL |
318 | else \ |
319 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 320 | exit 1; \ |
f4316c36 | 321 | fi |
b436a982 RL |
322 | |
323 | clean-shared: | |
cfd06a62 | 324 | @set -e; for i in $(SHLIBDIRS); do \ |
a22fb399 RL |
325 | if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ |
326 | tmp="$(SHARED_LIBS_LINK_EXTS)"; \ | |
327 | for j in $${tmp:-x}; do \ | |
328 | ( set -x; rm -f lib$$i$$j ); \ | |
329 | done; \ | |
330 | fi; \ | |
331 | ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \ | |
b3ef742c | 332 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ |
1fe198b6 RL |
333 | ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \ |
334 | fi; \ | |
b436a982 | 335 | done |
d02b48c6 | 336 | |
a22fb399 | 337 | link-shared: |
a370537b | 338 | @ set -e; for i in $(SHLIBDIRS); do \ |
755c5b33 | 339 | $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
340 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
341 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 | 342 | symlink.$(SHLIB_TARGET); \ |
6b86bad5 | 343 | libs="$$libs -l$$i"; \ |
0fd44e2d RL |
344 | done |
345 | ||
30afcc07 RL |
346 | build-shared: do_$(SHLIB_TARGET) link-shared |
347 | ||
348 | do_$(SHLIB_TARGET): | |
a370537b | 349 | @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \ |
e075341d | 350 | if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \ |
c1269c81 RL |
351 | libs="$(LIBKRB5) $$libs"; \ |
352 | fi; \ | |
02c31fa4 | 353 | $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
354 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
355 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 RL |
356 | LIBDEPS="$$libs $(EX_LIBS)" \ |
357 | link_a.$(SHLIB_TARGET); \ | |
c1269c81 | 358 | libs="-l$$i $$libs"; \ |
a3fffd64 RL |
359 | done |
360 | ||
0962fbbf RL |
361 | libcrypto.pc: Makefile |
362 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
363 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 364 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
365 | echo 'includedir=$${prefix}/include'; \ |
366 | echo ''; \ | |
367 | echo 'Name: OpenSSL-libcrypto'; \ | |
368 | echo 'Description: OpenSSL cryptography library'; \ | |
369 | echo 'Version: '$(VERSION); \ | |
370 | echo 'Requires: '; \ | |
04296664 DSH |
371 | echo 'Libs: -L$${libdir} -lcrypto'; \ |
372 | echo 'Libs.private: $(EX_LIBS)'; \ | |
0962fbbf RL |
373 | echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc |
374 | ||
375 | libssl.pc: Makefile | |
376 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
377 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 378 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
379 | echo 'includedir=$${prefix}/include'; \ |
380 | echo ''; \ | |
e6479c76 | 381 | echo 'Name: OpenSSL-libssl'; \ |
0962fbbf RL |
382 | echo 'Description: Secure Sockets Layer and cryptography libraries'; \ |
383 | echo 'Version: '$(VERSION); \ | |
e6479c76 MF |
384 | echo 'Requires.private: libcrypto'; \ |
385 | echo 'Libs: -L$${libdir} -lssl'; \ | |
04296664 | 386 | echo 'Libs.private: $(EX_LIBS)'; \ |
0962fbbf RL |
387 | echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc |
388 | ||
42ba5d23 | 389 | openssl.pc: Makefile |
56824b96 RL |
390 | @ ( echo 'prefix=$(INSTALLTOP)'; \ |
391 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 392 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
56824b96 RL |
393 | echo 'includedir=$${prefix}/include'; \ |
394 | echo ''; \ | |
395 | echo 'Name: OpenSSL'; \ | |
396 | echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ | |
397 | echo 'Version: '$(VERSION); \ | |
e6479c76 | 398 | echo 'Requires: libssl libcrypto' ) > openssl.pc |
56824b96 | 399 | |
c7199e62 BL |
400 | Makefile: Makefile.org Configure config |
401 | @echo "Makefile is older than Makefile.org, Configure or config." | |
49b81422 | 402 | @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." |
9535d202 BL |
403 | @false |
404 | ||
dfeab068 | 405 | libclean: |
acb2f06a | 406 | rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib |
dfeab068 | 407 | |
7841edc9 | 408 | clean: libclean |
0431941e | 409 | rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c |
56999ba5 | 410 | rm -rf *.bak certs/.0 |
02c31fa4 | 411 | @set -e; target=clean; $(RECURSIVE_BUILD_CMD) |
34ccd24d | 412 | rm -f $(LIBS) tags TAGS |
0962fbbf | 413 | rm -f openssl.pc libssl.pc libcrypto.pc |
7841edc9 | 414 | rm -f speed.* .pure |
bb8f3c58 | 415 | rm -f $(TARFILE) |
cfd06a62 | 416 | @set -e; for i in $(ONEDIRS) ;\ |
d02b48c6 | 417 | do \ |
bb8f3c58 | 418 | rm -fr $$i/*; \ |
d02b48c6 RE |
419 | done |
420 | ||
421 | makefile.one: files | |
99aab161 | 422 | $(PERL) util/mk1mf.pl >makefile.one; \ |
d02b48c6 RE |
423 | sh util/do_ms.sh |
424 | ||
bacad008 | 425 | files: |
42ba5d23 | 426 | $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO |
02c31fa4 | 427 | @set -e; target=files; $(RECURSIVE_BUILD_CMD) |
d02b48c6 RE |
428 | |
429 | links: | |
6576774b | 430 | @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl |
41d2a336 | 431 | @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) |
02c31fa4 | 432 | @set -e; target=links; $(RECURSIVE_BUILD_CMD) |
d02b48c6 | 433 | |
1cc67fa8 RL |
434 | gentests: |
435 | @(cd test && echo "generating dummy tests (if needed)..." && \ | |
a370537b | 436 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate ); |
1cc67fa8 | 437 | |
d02b48c6 | 438 | dclean: |
02c31fa4 | 439 | @set -e; target=dclean; $(RECURSIVE_BUILD_CMD) |
d02b48c6 | 440 | |
0431941e DSH |
441 | rehash: rehash.time |
442 | rehash.time: certs apps | |
34775923 | 443 | @if [ -z "$(CROSS_COMPILE)" ]; then \ |
0431941e DSH |
444 | (OPENSSL="`pwd`/util/opensslwrap.sh"; \ |
445 | [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ | |
446 | OPENSSL_DEBUG_MEMORY=on; \ | |
447 | export OPENSSL OPENSSL_DEBUG_MEMORY; \ | |
fefc111a | 448 | $(PERL) tools/c_rehash certs/demo) && \ |
0431941e DSH |
449 | touch rehash.time; \ |
450 | else :; fi | |
451 | ||
58964a49 | 452 | test: tests |
d02b48c6 | 453 | |
0431941e | 454 | tests: rehash |
bb8f3c58 | 455 | @(cd test && echo "testing..." && \ |
220bd849 DSH |
456 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests ); |
457 | OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a | |
d02b48c6 | 458 | |
d7f0ab5f UM |
459 | report: |
460 | @$(PERL) util/selftest.pl | |
461 | ||
d02b48c6 | 462 | depend: |
02c31fa4 | 463 | @set -e; target=depend; $(RECURSIVE_BUILD_CMD) |
d02b48c6 RE |
464 | |
465 | lint: | |
02c31fa4 | 466 | @set -e; target=lint; $(RECURSIVE_BUILD_CMD) |
d02b48c6 | 467 | |
34ccd24d RS |
468 | tags TAGS: FORCE |
469 | rm -f TAGS tags | |
470 | -ctags -R . | |
471 | -etags -R . | |
472 | ||
473 | FORCE: | |
d02b48c6 RE |
474 | |
475 | errors: | |
797c61aa | 476 | $(PERL) util/ck_errf.pl -strict */*.c */*/*.c |
f6485909 | 477 | $(PERL) util/mkerr.pl -recurse -write |
506fec1a | 478 | (cd engines; $(MAKE) PERL=$(PERL) errors) |
d02b48c6 | 479 | |
a6fbcb42 DSH |
480 | stacks: |
481 | $(PERL) util/mkstack.pl -write | |
482 | ||
7740a1c6 | 483 | util/libeay.num:: |
f6485909 | 484 | $(PERL) util/mkdef.pl crypto update |
7740a1c6 BM |
485 | |
486 | util/ssleay.num:: | |
f6485909 | 487 | $(PERL) util/mkdef.pl ssl update |
7740a1c6 | 488 | |
1d00800e | 489 | crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h |
f6485909 | 490 | $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h |
0357422d | 491 | crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num |
f6485909 | 492 | $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h |
a19c9f17 | 493 | crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num |
aaa29f9e | 494 | $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h |
49e747e6 | 495 | |
2faa930b RL |
496 | apps/openssl-vms.cnf: apps/openssl.cnf |
497 | $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf | |
498 | ||
11cd2397 RL |
499 | crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl |
500 | $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h | |
501 | ||
502 | ||
97a0cc52 | 503 | TABLE: Configure Configurations/*.conf |
2330e18b | 504 | (echo 'Output of `Configure TABLE'"':"; \ |
f6485909 | 505 | $(PERL) Configure TABLE) > TABLE |
7740a1c6 | 506 | |
a6fbcb42 | 507 | update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend |
7740a1c6 | 508 | |
f9de8446 LJ |
509 | # Build distribution tar-file. As the list of files returned by "find" is |
510 | # pretty long, on several platforms a "too many arguments" error or similar | |
511 | # would occur. Therefore the list of files is temporarily stored into a file | |
512 | # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal | |
513 | # tar does not support the --files-from option. | |
d02b48c6 | 514 | tar: |
756b9a00 LJ |
515 | find . -type d -print | xargs chmod 755 |
516 | find . -type f -print | xargs chmod a+r | |
517 | find . -type f -perm -0100 -print | xargs chmod a+x | |
5b8aa1a2 | 518 | find * \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \ |
f9de8446 | 519 | $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \ |
5a061129 | 520 | tardy --user_number=0 --user_name=openssl \ |
9ce5db45 RE |
521 | --group_number=0 --group_name=openssl \ |
522 | --prefix=openssl-$(VERSION) - |\ | |
651d0aff | 523 | gzip --best >../$(TARFILE).gz; \ |
f9de8446 | 524 | rm -f ../$(TARFILE).list; \ |
651d0aff | 525 | ls -l ../$(TARFILE).gz |
d02b48c6 | 526 | |
41d2a336 RL |
527 | tar-snap: |
528 | @$(TAR) $(TARFLAGS) -cvf - \ | |
5b8aa1a2 | 529 | `find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\ |
41d2a336 RL |
530 | tardy --user_number=0 --user_name=openssl \ |
531 | --group_number=0 --group_name=openssl \ | |
532 | --prefix=openssl-$(VERSION) - > ../$(TARFILE);\ | |
533 | ls -l ../$(TARFILE) | |
534 | ||
58964a49 | 535 | dist: |
99aab161 | 536 | $(PERL) Configure dist |
d02b48c6 | 537 | @$(MAKE) dist_pem_h |
a370537b AP |
538 | @$(MAKE) SDIRS='$(SDIRS)' clean |
539 | @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar | |
d02b48c6 RE |
540 | |
541 | dist_pem_h: | |
02c31fa4 | 542 | (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) |
d02b48c6 | 543 | |
28a80034 RL |
544 | install: all install_docs install_sw |
545 | ||
9405a9a2 RS |
546 | uninstall: uninstall_sw uninstall_docs |
547 | ||
28a80034 | 548 | install_sw: |
9405a9a2 | 549 | @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS) |
a2ac429d | 550 | @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\ |
2a4a0a34 BM |
551 | do \ |
552 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | |
553 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | |
554 | done; | |
02c31fa4 | 555 | @set -e; target=install; $(RECURSIVE_BUILD_CMD) |
d341e402 | 556 | @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ |
d02b48c6 | 557 | do \ |
b436a982 RL |
558 | if [ -f "$$i" ]; then \ |
559 | ( echo installing $$i; \ | |
6727565a DSH |
560 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
561 | $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
562 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
563 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ | |
2c975b50 LJ |
564 | fi; \ |
565 | done; | |
cfd06a62 | 566 | @set -e; if [ -n "$(SHARED_LIBS)" ]; then \ |
a22fb399 RL |
567 | tmp="$(SHARED_LIBS)"; \ |
568 | for i in $${tmp:-x}; \ | |
569 | do \ | |
1fe198b6 | 570 | if [ -f "$$i" -o -f "$$i.a" ]; then \ |
a22fb399 | 571 | ( echo installing $$i; \ |
65370f9b | 572 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ |
447aa490 | 573 | c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ |
7104c376 RL |
574 | cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ |
575 | chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ | |
30c08f2e | 576 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ |
6727565a DSH |
577 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
578 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
579 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
65370f9b AP |
580 | else \ |
581 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
582 | chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
583 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
1fe198b6 | 584 | fi ); \ |
4c1a6e00 LJ |
585 | if expr $(PLATFORM) : 'mingw' > /dev/null; then \ |
586 | ( case $$i in \ | |
587 | *crypto*) i=libeay32.dll;; \ | |
588 | *ssl*) i=ssleay32.dll;; \ | |
589 | esac; \ | |
590 | echo installing $$i; \ | |
9405a9a2 RS |
591 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ |
592 | chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ | |
593 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ | |
4c1a6e00 | 594 | fi; \ |
2c975b50 | 595 | fi; \ |
a22fb399 RL |
596 | done; \ |
597 | ( here="`pwd`"; \ | |
72a9776a | 598 | cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \ |
4c3a2d64 | 599 | $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \ |
e68cb95d RL |
600 | if [ "$(INSTALLTOP)" != "/usr" ]; then \ |
601 | echo 'OpenSSL shared libraries have been installed in:'; \ | |
602 | echo ' $(INSTALLTOP)'; \ | |
e68cb95d | 603 | fi; \ |
a22fb399 | 604 | fi |
6727565a DSH |
605 | cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig |
606 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc | |
607 | cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
608 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
609 | cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
610 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
e6e7b5f3 | 611 | |
9405a9a2 RS |
612 | uninstall_sw: |
613 | cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files | |
614 | @for i in $(LIBS) ;\ | |
615 | do \ | |
616 | test -f "$$i" && \ | |
617 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \ | |
618 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
619 | done; | |
620 | @if [ -n "$(SHARED_LIBS)" ]; then \ | |
621 | tmp="$(SHARED_LIBS)"; \ | |
622 | for i in $${tmp:-x}; \ | |
623 | do \ | |
624 | if [ -f "$$i" -o -f "$$i.a" ]; then \ | |
625 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ | |
626 | c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ | |
627 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ | |
628 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ | |
629 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
630 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
631 | else \ | |
632 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
633 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
634 | fi; \ | |
635 | if expr $(PLATFORM) : 'mingw' > /dev/null; then \ | |
636 | case $$i in \ | |
637 | *crypto*) i=libeay32.dll;; \ | |
638 | *ssl*) i=ssleay32.dll;; \ | |
639 | esac; \ | |
640 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ | |
641 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ | |
642 | fi; \ | |
643 | fi; \ | |
644 | done; \ | |
645 | fi | |
646 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc | |
647 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
648 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
649 | @target=uninstall; $(RECURSIVE_BUILD_CMD) | |
650 | ||
60cdb821 UM |
651 | install_html_docs: |
652 | here="`pwd`"; \ | |
82d9185a | 653 | filecase=; \ |
457f7b14 | 654 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
82d9185a JR |
655 | filecase=-i; \ |
656 | esac; \ | |
60cdb821 | 657 | for subdir in apps crypto ssl; do \ |
9405a9a2 | 658 | $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ |
60cdb821 UM |
659 | for i in doc/$$subdir/*.pod; do \ |
660 | fn=`basename $$i .pod`; \ | |
661 | echo "installing html/$$fn.$(HTMLSUFFIX)"; \ | |
662 | cat $$i \ | |
663 | | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \ | |
690a2b1f | 664 | | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \ |
60cdb821 UM |
665 | | sed -r 's/<!DOCTYPE.*//g' \ |
666 | > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ | |
667 | $(PERL) util/extract-names.pl < $$i | \ | |
668 | grep -v $$filecase "^$$fn\$$" | \ | |
669 | (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ | |
670 | while read n; do \ | |
220bd849 | 671 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \ |
60cdb821 UM |
672 | done); \ |
673 | done; \ | |
674 | done | |
675 | ||
9405a9a2 RS |
676 | uninstall_html_docs: |
677 | here="`pwd`"; \ | |
678 | filecase=; \ | |
679 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ | |
680 | filecase=-i; \ | |
681 | esac; \ | |
682 | for subdir in apps crypto ssl; do \ | |
683 | for i in doc/$$subdir/*.pod; do \ | |
684 | fn=`basename $$i .pod`; \ | |
685 | $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ | |
686 | $(PERL) util/extract-names.pl < $$i | \ | |
687 | grep -v $$filecase "^$$fn\$$" | \ | |
688 | while read n; do \ | |
689 | $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \ | |
690 | done; \ | |
691 | done; \ | |
692 | done | |
693 | ||
e6e7b5f3 BM |
694 | install_docs: |
695 | @$(PERL) $(TOP)/util/mkdir-p.pl \ | |
e1c55191 UM |
696 | $(INSTALL_PREFIX)$(MANDIR)/man1 \ |
697 | $(INSTALL_PREFIX)$(MANDIR)/man3 \ | |
698 | $(INSTALL_PREFIX)$(MANDIR)/man5 \ | |
699 | $(INSTALL_PREFIX)$(MANDIR)/man7 | |
ec9f67f6 RL |
700 | here="`pwd`"; \ |
701 | filecase=; \ | |
457f7b14 | 702 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
ec9f67f6 | 703 | filecase=-i; \ |
b3ef742c | 704 | esac; \ |
cfd06a62 | 705 | set -e; for i in doc/apps/*.pod; do \ |
c6ce792f | 706 | fn=`basename $$i .pod`; \ |
401ee37a | 707 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ |
1cc087fe | 708 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 709 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 710 | pod2man \ |
2962243d | 711 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 712 | --release=$(VERSION) `basename $$i`) \ |
1cc087fe | 713 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 714 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
715 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
716 | (grep -v "[ ]"; true) | \ | |
ec9f67f6 RL |
717 | (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ |
718 | while read n; do \ | |
220bd849 | 719 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 720 | done); \ |
f6f99618 | 721 | done; \ |
cfd06a62 | 722 | set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \ |
c6ce792f | 723 | fn=`basename $$i .pod`; \ |
401ee37a | 724 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ |
1cc087fe | 725 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 726 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 727 | pod2man \ |
2962243d | 728 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 729 | --release=$(VERSION) `basename $$i`) \ |
1cc087fe | 730 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 731 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
732 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
733 | (grep -v "[ ]"; true) | \ | |
ec9f67f6 RL |
734 | (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ |
735 | while read n; do \ | |
220bd849 | 736 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 737 | done); \ |
c6ce792f | 738 | done |
d02b48c6 | 739 | |
9405a9a2 RS |
740 | uninstall_docs: |
741 | @here="`pwd`"; \ | |
742 | filecase=; \ | |
743 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \ | |
744 | filecase=-i; \ | |
745 | esac; \ | |
746 | for i in doc/apps/*.pod; do \ | |
747 | fn=`basename $$i .pod`; \ | |
748 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ | |
749 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
750 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
751 | $(PERL) util/extract-names.pl < $$i | \ | |
752 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
753 | (grep -v "[ ]"; true) | \ | |
754 | while read n; do \ | |
755 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
756 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
757 | done; \ | |
758 | done; \ | |
759 | for i in doc/crypto/*.pod doc/ssl/*.pod; do \ | |
760 | fn=`basename $$i .pod`; \ | |
761 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ | |
762 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
763 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
764 | $(PERL) util/extract-names.pl < $$i | \ | |
765 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
766 | (grep -v "[ ]"; true) | \ | |
767 | while read n; do \ | |
768 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
769 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
770 | done; \ | |
771 | done | |
772 | ||
d02b48c6 | 773 | # DO NOT DELETE THIS LINE -- make depend depends on it. |