]>
Commit | Line | Data |
---|---|---|
d56128f0 RE |
1 | ## |
2 | ## Makefile for OpenSSL | |
3 | ## | |
4 | ||
107b5792 RL |
5 | VERSION={- $config{version} -} |
6 | MAJOR={- $config{major} -} | |
7 | MINOR={- $config{minor} -} | |
8 | SHLIB_VERSION_NUMBER={- $config{shlib_version_number} -} | |
9 | SHLIB_VERSION_HISTORY={- $config{shlib_version_history} -} | |
10 | SHLIB_MAJOR={- $config{shlib_major} -} | |
11 | SHLIB_MINOR={- $config{shlib_minor} -} | |
12 | SHLIB_EXT={- $target{shared_extension} -} | |
13 | PLATFORM={- $config{target} -} | |
14 | OPTIONS={- $config{options} -} | |
15 | CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -}) | |
16 | SHLIB_TARGET={- $target{shared_target} -} | |
b436a982 | 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. | |
107b5792 | 26 | INSTALL_PREFIX={- $config{install_prefix} -} |
462ba4f6 | 27 | |
d74dfafd RL |
28 | # Do not edit these manually. Use Configure with --prefix or --openssldir |
29 | # to change this! Short explanation in the top comment in Configure | |
107b5792 RL |
30 | INSTALLTOP={- $config{prefix} -} |
31 | OPENSSLDIR={- $config{openssldir} -} | |
d56128f0 | 32 | |
d02b48c6 RE |
33 | # NO_IDEA - Define to build without the IDEA algorithm |
34 | # NO_RC4 - Define to build without the RC4 algorithm | |
35 | # NO_RC2 - Define to build without the RC2 algorithm | |
36 | # THREADS - Define when building with threads, you will probably also need any | |
c98d63f2 | 37 | # system defines as well, i.e. _REENTRANT for Solaris 2.[34] |
d02b48c6 RE |
38 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. |
39 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. | |
40 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). | |
41 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports | |
58964a49 RE |
42 | # one. 32 bytes will be read from this when the random |
43 | # number generator is initalised. | |
baf748ba | 44 | # SSL_FORBID_ENULL - define if you want the server to be not able to use the |
58964a49 | 45 | # NULL encryption ciphers. |
d02b48c6 RE |
46 | # |
47 | # LOCK_DEBUG - turns on lots of lock debug output :-) | |
48 | # REF_CHECK - turn on some xyz_free() assertions. | |
58964a49 | 49 | # REF_PRINT - prints some stuff on structure free. |
d02b48c6 | 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 | |
107b5792 RL |
60 | CROSS_COMPILE= {- $config{cross_compile_prefix} -} |
61 | CC= $(CROSS_COMPILE){- $target{cc} -} | |
62 | CFLAG= {- $config{cflags} -} | |
63 | DEPFLAG= {- $config{depflags} -} | |
64 | PEX_LIBS= {- $config{prelflags} -} | |
65 | EX_LIBS= {- $config{lflags} -} | |
66 | EXE_EXT= {- $target{exe_extension} -} | |
67 | ARFLAGS= {- $target{arflags} -} | |
68 | AR=$(CROSS_COMPILE){- $target{ar} -} $(ARFLAGS) r | |
69 | RANLIB= {- $target{ranlib} -} | |
70 | NM= $(CROSS_COMPILE){- $target{nm} -} | |
71 | PERL= {- $config{perl} -} | |
9405a9a2 RS |
72 | #RM= echo -- |
73 | RM= rm -f | |
2dbb3ccd | 74 | TAR= tar |
63977104 | 75 | TARFLAGS= --no-recursion |
107b5792 RL |
76 | MAKEDEPPROG=$(CROSS_COMPILE){- $config{makedepprog} -} |
77 | LIBDIR={- $config{libdir} -} | |
d02b48c6 | 78 | |
3cc9a89d AP |
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. | |
f072785e | 84 | AS=$(CC) -c |
01fc834b | 85 | ASFLAG=$(CFLAG) |
3cc9a89d | 86 | |
14e21f86 AP |
87 | # For x86 assembler: Set PROCESSOR to 386 if you want to support |
88 | # the 80386. | |
107b5792 | 89 | PROCESSOR= {- $config{processor} -} |
14e21f86 AP |
90 | |
91 | # CPUID module collects small commonly used assembler snippets | |
107b5792 RL |
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 | ENGINES_ASM_OBJ= {- $target{engines_obj} -} | |
108 | CHACHA_ENC= {- $target{chacha_obj} -} | |
109 | POLY1305_ASM_OBJ= {- $target{poly1305_obj} -} | |
110 | PERLASM_SCHEME= {- $target{perlasm_scheme} -} | |
58964a49 | 111 | |
ad2695b1 | 112 | # Zlib stuff |
107b5792 RL |
113 | ZLIB_INCLUDE={- $withargs{zlib-include} -} |
114 | LIBZLIB={- $withargs{zlib-lib} -} | |
ad2695b1 | 115 | |
1ab2f7f1 DSH |
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 | |
5084af28 | 120 | # $(INSTALLTOP) for this build may be different so hard |
1ab2f7f1 DSH |
121 | # code the path. |
122 | ||
107b5792 | 123 | FIPSLIBDIR={- $config{fipslibdir} -} |
1ab2f7f1 | 124 | |
1ab2f7f1 | 125 | # The location of the library which contains fipscanister.o |
f072785e DSH |
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. | |
1ab2f7f1 | 128 | |
107b5792 | 129 | FIPSCANLIB={- $config{fips} ? "libcrypto" : "" -} |
1ab2f7f1 DSH |
130 | |
131 | # Shared library base address. Currently only used on Windows. | |
132 | # | |
133 | ||
107b5792 | 134 | BASEADDR={- $config{baseaddr} -} |
1ab2f7f1 | 135 | |
107b5792 | 136 | DIRS= {- join(" ", @{$config{dirs}}) -} |
0973910f | 137 | SHLIBDIRS= crypto ssl |
dee502be | 138 | INSTALL_SUBS= engines apps tools |
0973910f | 139 | |
d02b48c6 | 140 | # dirs in crypto to build |
107b5792 | 141 | SDIRS= {- join(" ", @{$config{sdirs}}) -} |
d02b48c6 | 142 | |
f777408f RL |
143 | # tests to perform. "alltests" is a special word indicating that all tests |
144 | # should be performed. | |
145 | TESTS = alltests | |
146 | ||
42ba5d23 | 147 | MAKEFILE= Makefile |
d02b48c6 | 148 | |
d74dfafd | 149 | MANDIR=$(INSTALLTOP)/share/man |
d02b48c6 RE |
150 | MAN1=1 |
151 | MAN3=3 | |
1cc087fe | 152 | MANSUFFIX= |
60cdb821 | 153 | HTMLSUFFIX=html |
d74dfafd | 154 | HTMLDIR=$(INSTALLTOP)/share/doc/$(BASENAME)/html |
d02b48c6 RE |
155 | SHELL=/bin/sh |
156 | ||
58964a49 | 157 | TOP= . |
b436a982 | 158 | LIBS= libcrypto.a libssl.a |
a22fb399 RL |
159 | SHARED_CRYPTO=libcrypto$(SHLIB_EXT) |
160 | SHARED_SSL=libssl$(SHLIB_EXT) | |
107b5792 RL |
161 | SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -} |
162 | SHARED_LIBS_LINK_EXTS={- $config{shared_link_extensions} -} | |
163 | SHARED_LDFLAGS={- $target{shared_ldflag} -} | |
58964a49 RE |
164 | |
165 | GENERAL= Makefile | |
9ce5db45 | 166 | BASENAME= openssl |
58964a49 | 167 | NAME= $(BASENAME)-$(VERSION) |
4a544810 | 168 | TARFILE= ../$(NAME).tar |
58964a49 | 169 | HEADER= e_os.h |
d02b48c6 | 170 | |
9405a9a2 RS |
171 | # Directories created on install if they don't exist. |
172 | INSTALLDIRS= \ | |
173 | $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ | |
174 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \ | |
175 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \ | |
176 | $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \ | |
177 | $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ | |
178 | $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ | |
179 | $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ | |
180 | $(INSTALL_PREFIX)$(OPENSSLDIR)/private | |
181 | ||
177b5f9c | 182 | all: Makefile build_all |
d02b48c6 | 183 | |
02c31fa4 | 184 | # as we stick to -e, CLEARENV ensures that local variables in lower |
a41b0aad AP |
185 | # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn |
186 | # shell, which [annoyingly enough] terminates unset with error if VAR | |
187 | # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh, | |
188 | # which terminates unset with error if no variable was present:-( | |
189 | CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \ | |
02c31fa4 AP |
190 | $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \ |
191 | $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \ | |
192 | $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \ | |
a80e33b9 | 193 | $${HEADER+HEADER} \ |
02c31fa4 AP |
194 | $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \ |
195 | $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \ | |
dce1cc2a | 196 | $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \ |
2f3c39bc | 197 | $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \ |
02c31fa4 AP |
198 | $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS} |
199 | ||
193ed2d7 AP |
200 | # LC_ALL=C ensures that error [and other] messages are delivered in |
201 | # same language for uniform treatment. | |
202 | BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\ | |
a370537b | 203 | CC='$(CC)' CFLAG='$(CFLAG)' \ |
f072785e | 204 | AS='$(CC)' ASFLAG='$(CFLAG) -c' \ |
a370537b | 205 | AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \ |
34775923 | 206 | CROSS_COMPILE='$(CROSS_COMPILE)' \ |
a8eda431 | 207 | PERL='$(PERL)' \ |
6727565a | 208 | SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \ |
a370537b AP |
209 | INSTALL_PREFIX='$(INSTALL_PREFIX)' \ |
210 | INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \ | |
19c5314f | 211 | LIBDIR='$(LIBDIR)' \ |
a370537b | 212 | MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \ |
721c2ac0 | 213 | DEPFLAG='$(DEPFLAG)' \ |
a370537b AP |
214 | MAKEDEPPROG='$(MAKEDEPPROG)' \ |
215 | SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \ | |
cc7399e7 | 216 | ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \ |
a370537b AP |
217 | EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \ |
218 | SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \ | |
219 | PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \ | |
6019cdd3 | 220 | CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)' \ |
9405a9a2 | 221 | EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)' \ |
a370537b AP |
222 | AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \ |
223 | BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \ | |
224 | RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \ | |
225 | SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \ | |
226 | MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \ | |
227 | RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \ | |
228 | WP_ASM_OBJ='$(WP_ASM_OBJ)' \ | |
8a1c92ce | 229 | MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \ |
ed28aef8 | 230 | ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \ |
22c2e80f AP |
231 | CHACHA_ENC='$(CHACHA_ENC)' \ |
232 | POLY1305_ASM_OBJ='$(POLY1305_ASM_OBJ)' \ | |
a370537b | 233 | PERLASM_SCHEME='$(PERLASM_SCHEME)' \ |
1ab2f7f1 DSH |
234 | FIPSLIBDIR='${FIPSLIBDIR}' \ |
235 | FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \ | |
02c31fa4 AP |
236 | THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES= |
237 | # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors, | |
238 | # which in turn eliminates ambiguities in variable treatment with -e. | |
d0590fe6 | 239 | |
b480283c RL |
240 | # BUILD_CMD is a generic macro to build a given target in a given |
241 | # subdirectory. The target must be given through the shell variable | |
242 | # `target' and the subdirectory to build in must be given through `dir'. | |
243 | # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or | |
244 | # BUILD_ONE_CMD instead. | |
245 | # | |
b480283c RL |
246 | # RECURSIVE_BUILD_CMD is a macro to build a given target in all |
247 | # subdirectories defined in $(DIRS). It requires that the target | |
248 | # is given through the shell variable `target'. | |
9405a9a2 RS |
249 | # |
250 | # BUILD_ONE_CMD is a macro to build a given target in a given | |
251 | # subdirectory if that subdirectory is part of $(DIRS). It requires | |
252 | # exactly the same shell variables as BUILD_CMD. | |
02c31fa4 AP |
253 | BUILD_CMD= if [ -d "$$dir" ]; then \ |
254 | ( cd $$dir && echo "making $$target in $$dir..." && \ | |
255 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \ | |
256 | ) || exit 1; \ | |
257 | fi | |
258 | RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done | |
f5ce5e14 | 259 | BUILD_ONE_CMD=\ |
b3b201b6 | 260 | if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \ |
f5ce5e14 RL |
261 | $(BUILD_CMD); \ |
262 | fi | |
88c80b3e | 263 | |
734540f8 | 264 | reflect: |
02c31fa4 | 265 | @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV) |
734540f8 | 266 | |
4c82171a | 267 | sub_all: build_all |
c3f22253 | 268 | |
88c80b3e RL |
269 | build_all: build_libs build_apps build_tests build_tools |
270 | ||
177b5f9c RL |
271 | build_libs: build_libcrypto build_libssl openssl.pc |
272 | ||
273 | build_libcrypto: build_crypto build_engines libcrypto.pc | |
274 | build_libssl: build_ssl libssl.pc | |
88c80b3e RL |
275 | |
276 | build_crypto: | |
f072785e | 277 | @dir=crypto; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 278 | build_ssl: build_crypto |
f5ce5e14 | 279 | @dir=ssl; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 280 | build_engines: build_crypto |
ed28aef8 | 281 | @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD) |
c3f22253 RS |
282 | |
283 | build_apps: build_libs | |
f5ce5e14 | 284 | @dir=apps; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 285 | build_tests: build_libs |
f5ce5e14 | 286 | @dir=test; target=all; $(BUILD_ONE_CMD) |
c3f22253 | 287 | build_tools: build_libs |
f5ce5e14 | 288 | @dir=tools; target=all; $(BUILD_ONE_CMD) |
ba5477eb RL |
289 | |
290 | all_testapps: build_libs build_testapps | |
291 | build_testapps: | |
f5ce5e14 | 292 | @dir=crypto; target=testapps; $(BUILD_ONE_CMD) |
b436a982 | 293 | |
f072785e | 294 | libcrypto$(SHLIB_EXT): libcrypto.a |
f4316c36 | 295 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
225c2721 DSH |
296 | if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \ |
297 | FIPSLD_CC="$(CC)"; CC=fips/fipsld; \ | |
298 | export CC FIPSLD_CC; \ | |
299 | fi; \ | |
24e20db4 | 300 | $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \ |
f4316c36 RL |
301 | else \ |
302 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 303 | exit 1; \ |
f4316c36 | 304 | fi |
0f180d1d | 305 | |
a22fb399 | 306 | libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a |
f4316c36 | 307 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
5ddcb866 | 308 | $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ |
f4316c36 RL |
309 | else \ |
310 | echo "There's no support for shared libraries on this platform" >&2; \ | |
d0590fe6 | 311 | exit 1; \ |
f4316c36 | 312 | fi |
b436a982 RL |
313 | |
314 | clean-shared: | |
cfd06a62 | 315 | @set -e; for i in $(SHLIBDIRS); do \ |
a22fb399 RL |
316 | if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \ |
317 | tmp="$(SHARED_LIBS_LINK_EXTS)"; \ | |
318 | for j in $${tmp:-x}; do \ | |
319 | ( set -x; rm -f lib$$i$$j ); \ | |
320 | done; \ | |
321 | fi; \ | |
322 | ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \ | |
b3ef742c | 323 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ |
1fe198b6 RL |
324 | ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \ |
325 | fi; \ | |
b436a982 | 326 | done |
d02b48c6 | 327 | |
a22fb399 | 328 | link-shared: |
a370537b | 329 | @ set -e; for i in $(SHLIBDIRS); do \ |
755c5b33 | 330 | $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
331 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
332 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 | 333 | symlink.$(SHLIB_TARGET); \ |
6b86bad5 | 334 | libs="$$libs -l$$i"; \ |
0fd44e2d RL |
335 | done |
336 | ||
30afcc07 RL |
337 | build-shared: do_$(SHLIB_TARGET) link-shared |
338 | ||
339 | do_$(SHLIB_TARGET): | |
a370537b | 340 | @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \ |
02c31fa4 | 341 | $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \ |
a370537b AP |
342 | LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \ |
343 | LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \ | |
30afcc07 RL |
344 | LIBDEPS="$$libs $(EX_LIBS)" \ |
345 | link_a.$(SHLIB_TARGET); \ | |
c1269c81 | 346 | libs="-l$$i $$libs"; \ |
a3fffd64 RL |
347 | done |
348 | ||
0962fbbf RL |
349 | libcrypto.pc: Makefile |
350 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
351 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 352 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
353 | echo 'includedir=$${prefix}/include'; \ |
354 | echo ''; \ | |
355 | echo 'Name: OpenSSL-libcrypto'; \ | |
356 | echo 'Description: OpenSSL cryptography library'; \ | |
357 | echo 'Version: '$(VERSION); \ | |
358 | echo 'Requires: '; \ | |
04296664 DSH |
359 | echo 'Libs: -L$${libdir} -lcrypto'; \ |
360 | echo 'Libs.private: $(EX_LIBS)'; \ | |
e36827f6 | 361 | echo 'Cflags: -I$${includedir}' ) > libcrypto.pc |
0962fbbf RL |
362 | |
363 | libssl.pc: Makefile | |
364 | @ ( echo 'prefix=$(INSTALLTOP)'; \ | |
365 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 366 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
0962fbbf RL |
367 | echo 'includedir=$${prefix}/include'; \ |
368 | echo ''; \ | |
e6479c76 | 369 | echo 'Name: OpenSSL-libssl'; \ |
0962fbbf RL |
370 | echo 'Description: Secure Sockets Layer and cryptography libraries'; \ |
371 | echo 'Version: '$(VERSION); \ | |
e6479c76 MF |
372 | echo 'Requires.private: libcrypto'; \ |
373 | echo 'Libs: -L$${libdir} -lssl'; \ | |
04296664 | 374 | echo 'Libs.private: $(EX_LIBS)'; \ |
e36827f6 | 375 | echo 'Cflags: -I$${includedir}' ) > libssl.pc |
0962fbbf | 376 | |
42ba5d23 | 377 | openssl.pc: Makefile |
56824b96 RL |
378 | @ ( echo 'prefix=$(INSTALLTOP)'; \ |
379 | echo 'exec_prefix=$${prefix}'; \ | |
6727565a | 380 | echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \ |
56824b96 RL |
381 | echo 'includedir=$${prefix}/include'; \ |
382 | echo ''; \ | |
383 | echo 'Name: OpenSSL'; \ | |
384 | echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ | |
385 | echo 'Version: '$(VERSION); \ | |
e6479c76 | 386 | echo 'Requires: libssl libcrypto' ) > openssl.pc |
56824b96 | 387 | |
d10dac11 RS |
388 | Makefile: Makefile.in Configure config |
389 | @echo "Makefile is older than Makefile.in, Configure or config." | |
49b81422 | 390 | @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." |
9535d202 BL |
391 | @false |
392 | ||
dfeab068 | 393 | libclean: |
acb2f06a | 394 | rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib |
dfeab068 | 395 | |
7841edc9 | 396 | clean: libclean |
9598996c | 397 | rm -f */*/*.o */*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c |
56999ba5 | 398 | rm -rf *.bak certs/.0 |
02c31fa4 | 399 | @set -e; target=clean; $(RECURSIVE_BUILD_CMD) |
34ccd24d | 400 | rm -f $(LIBS) tags TAGS |
0962fbbf | 401 | rm -f openssl.pc libssl.pc libcrypto.pc |
7841edc9 | 402 | rm -f speed.* .pure |
bb8f3c58 | 403 | rm -f $(TARFILE) |
d02b48c6 RE |
404 | |
405 | makefile.one: files | |
99aab161 | 406 | $(PERL) util/mk1mf.pl >makefile.one; \ |
d02b48c6 RE |
407 | sh util/do_ms.sh |
408 | ||
bacad008 | 409 | files: |
42ba5d23 | 410 | $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO |
02c31fa4 | 411 | @set -e; target=files; $(RECURSIVE_BUILD_CMD) |
d02b48c6 | 412 | |
1cc67fa8 RL |
413 | gentests: |
414 | @(cd test && echo "generating dummy tests (if needed)..." && \ | |
a370537b | 415 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate ); |
1cc67fa8 | 416 | |
0431941e | 417 | rehash: rehash.time |
ae41f971 | 418 | rehash.time: certs build_apps build_tools |
34775923 | 419 | @if [ -z "$(CROSS_COMPILE)" ]; then \ |
0431941e DSH |
420 | (OPENSSL="`pwd`/util/opensslwrap.sh"; \ |
421 | [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \ | |
bea6cd3e RS |
422 | OPENSSL_DEBUG_MEMORY=on; OPENSSL_CONF=/dev/null ; \ |
423 | export OPENSSL OPENSSL_DEBUG_MEMORY OPENSSL_CONF; \ | |
67949615 RL |
424 | $$OPENSSL rehash certs/demo \ |
425 | || $(PERL) tools/c_rehash certs/demo) && \ | |
0431941e DSH |
426 | touch rehash.time; \ |
427 | else :; fi | |
428 | ||
58964a49 | 429 | test: tests |
d02b48c6 | 430 | |
0aca86b3 | 431 | |
0431941e | 432 | tests: rehash |
bb8f3c58 | 433 | @(cd test && echo "testing..." && \ |
220bd849 | 434 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests ); |
1a3ae788 RS |
435 | @if [ -z "$(CROSS_COMPILE)" ]; then \ |
436 | OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a; \ | |
437 | fi | |
d02b48c6 | 438 | |
1780e6d9 RL |
439 | list-tests: |
440 | @(cd test && \ | |
441 | $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests) | |
442 | ||
d7f0ab5f UM |
443 | report: |
444 | @$(PERL) util/selftest.pl | |
445 | ||
34ccd24d RS |
446 | tags TAGS: FORCE |
447 | rm -f TAGS tags | |
448 | -ctags -R . | |
7a64489f | 449 | -etags `find . -name '*.[ch]' -o -name '*.pm'` |
34ccd24d RS |
450 | |
451 | FORCE: | |
d02b48c6 | 452 | |
8cef1212 RS |
453 | depend: |
454 | @set -e; target=depend; $(RECURSIVE_BUILD_CMD) | |
455 | ||
456 | update: generate errors ordinals depend | |
457 | ||
458 | generate: | |
459 | (cd apps && $(MAKE) generate) | |
460 | (cd crypto/bn && $(MAKE) generate) | |
461 | (cd crypto/objects && $(MAKE) generate) | |
462 | ||
d02b48c6 | 463 | errors: |
797c61aa | 464 | $(PERL) util/ck_errf.pl -strict */*.c */*/*.c |
f6485909 | 465 | $(PERL) util/mkerr.pl -recurse -write |
506fec1a | 466 | (cd engines; $(MAKE) PERL=$(PERL) errors) |
cc79f06c | 467 | (cd crypto/ct; $(MAKE) PERL=$(PERL) errors) |
d02b48c6 | 468 | |
8cef1212 | 469 | ordinals: util/libeay.num util/ssleay.num test_ordinals TABLE |
7740a1c6 | 470 | util/libeay.num:: |
f6485909 | 471 | $(PERL) util/mkdef.pl crypto update |
7740a1c6 | 472 | util/ssleay.num:: |
f6485909 | 473 | $(PERL) util/mkdef.pl ssl update |
8cef1212 RS |
474 | test_ordinals: |
475 | TOP=$(TOP) PERL=$(PERL) $(PERL) test/run_tests.pl test_ordinals | |
7740a1c6 | 476 | |
97a0cc52 | 477 | TABLE: Configure Configurations/*.conf |
2330e18b | 478 | (echo 'Output of `Configure TABLE'"':"; \ |
f6485909 | 479 | $(PERL) Configure TABLE) > TABLE |
7740a1c6 | 480 | |
f9de8446 LJ |
481 | # Build distribution tar-file. As the list of files returned by "find" is |
482 | # pretty long, on several platforms a "too many arguments" error or similar | |
483 | # would occur. Therefore the list of files is temporarily stored into a file | |
484 | # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal | |
485 | # tar does not support the --files-from option. | |
4a544810 | 486 | TAR_COMMAND=$(TAR) $(TARFLAGS) --files-from $(TARFILE).list \ |
b91dd150 | 487 | --owner 0 --group 0 \ |
4a544810 | 488 | --transform 's|^|$(NAME)/|' \ |
27f98436 RL |
489 | -cvf - |
490 | ||
4a544810 | 491 | $(TARFILE).list: |
27f98436 RL |
492 | find * \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \ |
493 | \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \ | |
3cd7aef3 | 494 | \! -name '*test' \! -name '.#*' \! -name '*~' \! -type l \ |
4a544810 | 495 | | sort > $(TARFILE).list |
27f98436 | 496 | |
4a544810 | 497 | tar: $(TARFILE).list |
756b9a00 LJ |
498 | find . -type d -print | xargs chmod 755 |
499 | find . -type f -print | xargs chmod a+r | |
500 | find . -type f -perm -0100 -print | xargs chmod a+x | |
4a544810 RL |
501 | $(TAR_COMMAND) | gzip --best > $(TARFILE).gz |
502 | rm -f $(TARFILE).list | |
503 | ls -l $(TARFILE).gz | |
d02b48c6 | 504 | |
4a544810 RL |
505 | tar-snap: $(TARFILE).list |
506 | $(TAR_COMMAND) > $(TARFILE) | |
507 | rm -f $(TARFILE).list | |
508 | ls -l $(TARFILE) | |
41d2a336 | 509 | |
58964a49 | 510 | dist: |
99aab161 | 511 | $(PERL) Configure dist |
a370537b | 512 | @$(MAKE) SDIRS='$(SDIRS)' clean |
4d3c30a1 | 513 | @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar |
d02b48c6 | 514 | |
28a80034 RL |
515 | install: all install_docs install_sw |
516 | ||
9405a9a2 RS |
517 | uninstall: uninstall_sw uninstall_docs |
518 | ||
28a80034 | 519 | install_sw: |
9405a9a2 | 520 | @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALLDIRS) |
dee502be RL |
521 | @set -e; for i in include/openssl/*.h; do \ |
522 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$$i; \ | |
523 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$$i ); \ | |
2a4a0a34 | 524 | done; |
dee502be | 525 | @set -e; target=install; for dir in $(INSTALL_SUBS); do $(BUILD_CMD); done |
d341e402 | 526 | @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ |
d02b48c6 | 527 | do \ |
b436a982 RL |
528 | if [ -f "$$i" ]; then \ |
529 | ( echo installing $$i; \ | |
6727565a DSH |
530 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
531 | $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
532 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
533 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \ | |
2c975b50 LJ |
534 | fi; \ |
535 | done; | |
cfd06a62 | 536 | @set -e; if [ -n "$(SHARED_LIBS)" ]; then \ |
a22fb399 RL |
537 | tmp="$(SHARED_LIBS)"; \ |
538 | for i in $${tmp:-x}; \ | |
539 | do \ | |
1fe198b6 | 540 | if [ -f "$$i" -o -f "$$i.a" ]; then \ |
a22fb399 | 541 | ( echo installing $$i; \ |
65370f9b | 542 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ |
447aa490 | 543 | c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ |
7104c376 RL |
544 | cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ |
545 | chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \ | |
30c08f2e | 546 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ |
6727565a DSH |
547 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ |
548 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
549 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
65370f9b AP |
550 | else \ |
551 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
552 | chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \ | |
553 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
1fe198b6 | 554 | fi ); \ |
4c1a6e00 LJ |
555 | if expr $(PLATFORM) : 'mingw' > /dev/null; then \ |
556 | ( case $$i in \ | |
557 | *crypto*) i=libeay32.dll;; \ | |
558 | *ssl*) i=ssleay32.dll;; \ | |
559 | esac; \ | |
560 | echo installing $$i; \ | |
9405a9a2 RS |
561 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ |
562 | chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ | |
563 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ | |
4c1a6e00 | 564 | fi; \ |
2c975b50 | 565 | fi; \ |
a22fb399 RL |
566 | done; \ |
567 | ( here="`pwd`"; \ | |
72a9776a | 568 | cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \ |
4c3a2d64 | 569 | $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \ |
e68cb95d RL |
570 | if [ "$(INSTALLTOP)" != "/usr" ]; then \ |
571 | echo 'OpenSSL shared libraries have been installed in:'; \ | |
572 | echo ' $(INSTALLTOP)'; \ | |
e68cb95d | 573 | fi; \ |
a22fb399 | 574 | fi |
6727565a DSH |
575 | cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig |
576 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc | |
577 | cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
578 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
579 | cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig | |
580 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
e6e7b5f3 | 581 | |
9405a9a2 RS |
582 | uninstall_sw: |
583 | cd include/openssl && files=* && cd $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl && $(RM) $$files | |
584 | @for i in $(LIBS) ;\ | |
585 | do \ | |
586 | test -f "$$i" && \ | |
587 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i && \ | |
588 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
589 | done; | |
590 | @if [ -n "$(SHARED_LIBS)" ]; then \ | |
591 | tmp="$(SHARED_LIBS)"; \ | |
592 | for i in $${tmp:-x}; \ | |
593 | do \ | |
594 | if [ -f "$$i" -o -f "$$i.a" ]; then \ | |
595 | if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \ | |
596 | c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \ | |
597 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ | |
598 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \ | |
599 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
600 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
601 | else \ | |
602 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
603 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \ | |
604 | fi; \ | |
605 | if expr $(PLATFORM) : 'mingw' > /dev/null; then \ | |
606 | case $$i in \ | |
607 | *crypto*) i=libeay32.dll;; \ | |
608 | *ssl*) i=ssleay32.dll;; \ | |
609 | esac; \ | |
610 | echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ | |
611 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ | |
612 | fi; \ | |
613 | fi; \ | |
614 | done; \ | |
615 | fi | |
616 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc | |
617 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc | |
618 | $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc | |
619 | @target=uninstall; $(RECURSIVE_BUILD_CMD) | |
620 | ||
60cdb821 UM |
621 | install_html_docs: |
622 | here="`pwd`"; \ | |
82d9185a | 623 | filecase=; \ |
457f7b14 | 624 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
82d9185a JR |
625 | filecase=-i; \ |
626 | esac; \ | |
60cdb821 | 627 | for subdir in apps crypto ssl; do \ |
9405a9a2 | 628 | $(PERL) $(TOP)/util/mkdir-p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ |
60cdb821 UM |
629 | for i in doc/$$subdir/*.pod; do \ |
630 | fn=`basename $$i .pod`; \ | |
631 | echo "installing html/$$fn.$(HTMLSUFFIX)"; \ | |
632 | cat $$i \ | |
633 | | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \ | |
690a2b1f | 634 | | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \ |
60cdb821 UM |
635 | | sed -r 's/<!DOCTYPE.*//g' \ |
636 | > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ | |
637 | $(PERL) util/extract-names.pl < $$i | \ | |
638 | grep -v $$filecase "^$$fn\$$" | \ | |
639 | (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \ | |
640 | while read n; do \ | |
220bd849 | 641 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \ |
60cdb821 UM |
642 | done); \ |
643 | done; \ | |
644 | done | |
645 | ||
9405a9a2 RS |
646 | uninstall_html_docs: |
647 | here="`pwd`"; \ | |
648 | filecase=; \ | |
649 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ | |
650 | filecase=-i; \ | |
651 | esac; \ | |
652 | for subdir in apps crypto ssl; do \ | |
653 | for i in doc/$$subdir/*.pod; do \ | |
654 | fn=`basename $$i .pod`; \ | |
655 | $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \ | |
656 | $(PERL) util/extract-names.pl < $$i | \ | |
657 | grep -v $$filecase "^$$fn\$$" | \ | |
658 | while read n; do \ | |
659 | $(RM) $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/"$$n".$(HTMLSUFFIX); \ | |
660 | done; \ | |
661 | done; \ | |
662 | done | |
663 | ||
e6e7b5f3 BM |
664 | install_docs: |
665 | @$(PERL) $(TOP)/util/mkdir-p.pl \ | |
e1c55191 UM |
666 | $(INSTALL_PREFIX)$(MANDIR)/man1 \ |
667 | $(INSTALL_PREFIX)$(MANDIR)/man3 \ | |
668 | $(INSTALL_PREFIX)$(MANDIR)/man5 \ | |
669 | $(INSTALL_PREFIX)$(MANDIR)/man7 | |
ec9f67f6 RL |
670 | here="`pwd`"; \ |
671 | filecase=; \ | |
457f7b14 | 672 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \ |
ec9f67f6 | 673 | filecase=-i; \ |
b3ef742c | 674 | esac; \ |
cfd06a62 | 675 | set -e; for i in doc/apps/*.pod; do \ |
c6ce792f | 676 | fn=`basename $$i .pod`; \ |
401ee37a | 677 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ |
1cc087fe | 678 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 679 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 680 | pod2man \ |
2962243d | 681 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 682 | --release=$(VERSION) `basename $$i`) \ |
1cc087fe | 683 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 684 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
685 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
686 | (grep -v "[ ]"; true) | \ | |
ec9f67f6 RL |
687 | (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ |
688 | while read n; do \ | |
220bd849 | 689 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 690 | done); \ |
f6f99618 | 691 | done; \ |
cfd06a62 | 692 | set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \ |
c6ce792f | 693 | fn=`basename $$i .pod`; \ |
401ee37a | 694 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ |
1cc087fe | 695 | echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ |
d13363af | 696 | (cd `$(PERL) util/dirname.pl $$i`; \ |
a4a93411 | 697 | pod2man \ |
2962243d | 698 | --section=$$sec --center=OpenSSL \ |
a4a93411 | 699 | --release=$(VERSION) `basename $$i`) \ |
1cc087fe | 700 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 701 | $(PERL) util/extract-names.pl < $$i | \ |
f6098f2d RL |
702 | (grep -v $$filecase "^$$fn\$$"; true) | \ |
703 | (grep -v "[ ]"; true) | \ | |
ec9f67f6 RL |
704 | (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \ |
705 | while read n; do \ | |
220bd849 | 706 | PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \ |
ec9f67f6 | 707 | done); \ |
c6ce792f | 708 | done |
d02b48c6 | 709 | |
9405a9a2 RS |
710 | uninstall_docs: |
711 | @here="`pwd`"; \ | |
712 | filecase=; \ | |
713 | case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \ | |
714 | filecase=-i; \ | |
715 | esac; \ | |
716 | for i in doc/apps/*.pod; do \ | |
717 | fn=`basename $$i .pod`; \ | |
718 | sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ | |
719 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
720 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
721 | $(PERL) util/extract-names.pl < $$i | \ | |
722 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
723 | (grep -v "[ ]"; true) | \ | |
724 | while read n; do \ | |
725 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
726 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
727 | done; \ | |
728 | done; \ | |
729 | for i in doc/crypto/*.pod doc/ssl/*.pod; do \ | |
730 | fn=`basename $$i .pod`; \ | |
731 | sec=`$(PERL) util/extract-section.pl 3 < $$i`; \ | |
732 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
733 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ | |
734 | $(PERL) util/extract-names.pl < $$i | \ | |
735 | (grep -v $$filecase "^$$fn\$$"; true) | \ | |
736 | (grep -v "[ ]"; true) | \ | |
737 | while read n; do \ | |
738 | echo $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
739 | $(RM) $(INSTALL_PREFIX)$(MANDIR)/man$$sec/"$$n".$${sec}$(MANSUFFIX); \ | |
740 | done; \ | |
741 | done | |
742 | ||
d02b48c6 | 743 | # DO NOT DELETE THIS LINE -- make depend depends on it. |