]> git.ipfire.org Git - thirdparty/openssl.git/blame - Makefile.org
Include "!eNULL" in SSL_DEFAULT_CIPHER_LIST to make sure that a
[thirdparty/openssl.git] / Makefile.org
CommitLineData
d56128f0
RE
1##
2## Makefile for OpenSSL
3##
4
0973910f
UM
5VERSION=
6MAJOR=
7MINOR=
b436a982
RL
8SHLIB_VERSION_NUMBER=
9SHLIB_VERSION_HISTORY=
10SHLIB_MAJOR=
11SHLIB_MINOR=
a22fb399 12SHLIB_EXT=
d56128f0 13PLATFORM=dist
31ff97b2 14OPTIONS=
c59cb511 15CONFIGURE_ARGS=
b436a982
RL
16SHLIB_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.
21HERE=.
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.
26INSTALL_PREFIX=
462ba4f6
UM
27INSTALLTOP=/usr/local/ssl
28
29# Do not edit this manually. Use Configure --openssldir=DIR do change this!
30OPENSSLDIR=/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
60CC= cc
61CFLAG= -O
f5d7a031 62DEPFLAG=
bc29d0e5 63PEX_LIBS=
651d0aff 64EX_LIBS=
967d95f0 65EXE_EXT=
179add2b
RL
66ARFLAGS=
67AR=ar $(ARFLAGS) r
99aab161
UM
68RANLIB= ranlib
69PERL= perl
2dbb3ccd 70TAR= tar
63977104 71TARFLAGS= --no-recursion
cf1b7d96 72MAKEDEPPROG=makedepend
d02b48c6 73
3cc9a89d
AP
74# We let the C compiler driver to take care of .s files. This is done in
75# order to be excused from maintaining a separate set of architecture
76# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
77# gcc, then the driver will automatically translate it to -xarch=v8plus
78# and pass it down to assembler.
79AS=$(CC) -c
01fc834b 80ASFLAG=$(CFLAG)
3cc9a89d 81
14e21f86
AP
82# For x86 assembler: Set PROCESSOR to 386 if you want to support
83# the 80386.
84PROCESSOR=
85
86# CPUID module collects small commonly used assembler snippets
87CPUID_OBJ=
dfeab068 88BN_ASM= bn_asm.o
67ea999d 89DES_ENC= des_enc.o fcrypt_b.o
ed65fab9 90AES_ASM_OBJ=aes_core.o aes_cbc.o
67ea999d
AP
91BF_ENC= bf_enc.o
92CAST_ENC= c_enc.o
93RC4_ENC= rc4_enc.o
94RC5_ENC= rc5_enc.o
95MD5_ASM_OBJ=
96SHA1_ASM_OBJ=
97RMD160_ASM_OBJ=
58964a49 98
f9b3bff6
RL
99# KRB5 stuff
100KRB5_INCLUDES=
c1269c81 101LIBKRB5=
f9b3bff6 102
7614f0e5
DSH
103# Zlib stuff
104ZLIB_INCLUDE=
105LIBZLIB=
106
506fec1a 107DIRS= crypto ssl engines apps test tools
0973910f
UM
108SHLIBDIRS= crypto ssl
109
d02b48c6
RE
110# dirs in crypto to build
111SDIRS= \
d87b79bf 112 objects \
3009458e 113 md2 md4 md5 sha mdc2 hmac ripemd \
e18eef3d 114 des aes rc2 rc4 rc5 idea bf cast camellia \
67ea999d 115 bn ec rsa dsa ecdsa dh ecdh dso engine \
d87b79bf 116 buffer bio stack lhash rand err \
a5db6fa5 117 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
36d16f8e 118 store pqueue
a24b7eeb
AP
119# keep in mind that the above list is adjusted by ./Configure
120# according to no-xxx arguments...
d02b48c6 121
f777408f
RL
122# tests to perform. "alltests" is a special word indicating that all tests
123# should be performed.
124TESTS = alltests
125
42ba5d23 126MAKEFILE= Makefile
d02b48c6 127
e1c55191 128MANDIR=$(OPENSSLDIR)/man
d02b48c6
RE
129MAN1=1
130MAN3=3
1cc087fe 131MANSUFFIX=
d02b48c6
RE
132SHELL=/bin/sh
133
58964a49 134TOP= .
d02b48c6 135ONEDIRS=out tmp
7d7d2cbc 136EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
58964a49 137WDIRS= windows
b436a982 138LIBS= libcrypto.a libssl.a
a22fb399
RL
139SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
140SHARED_SSL=libssl$(SHLIB_EXT)
141SHARED_LIBS=
142SHARED_LIBS_LINK_EXTS=
a5595fde 143SHARED_LDFLAGS=
58964a49
RE
144
145GENERAL= Makefile
9ce5db45 146BASENAME= openssl
58964a49
RE
147NAME= $(BASENAME)-$(VERSION)
148TARFILE= $(NAME).tar
149WTARFILE= $(NAME)-win.tar
cf1b7d96 150EXHEADER= e_os2.h
58964a49 151HEADER= e_os.h
d02b48c6 152
ef8a18f4 153all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
d02b48c6 154
a24b7eeb
AP
155# as we stick to -e, CLEARENV ensures that local variables in lower
156# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
157# shell, which [annoyingly enough] terminates unset with error if VAR
158# is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
159# which terminates unset with error if no variable was present:-(
160CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
161 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
162 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
163 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
164 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
165 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
166 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
167 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
168 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
169 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
170
d0590fe6 171BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
d0590fe6 172 CC='${CC}' CFLAG='${CFLAG}' \
33c3ecf7 173 AS='${CC}' ASFLAG='${CFLAG} -c' \
d0590fe6 174 AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
7844ff73
RL
175 SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
176 INSTALL_PREFIX='${INSTALL_PREFIX}' \
7abbffc3 177 INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
a24b7eeb 178 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
ce92b6eb
AP
179 DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
180 MAKEDEPPROG='${MAKEDEPPROG}' \
a24b7eeb 181 SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
d0590fe6
AP
182 KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' \
183 EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' \
184 SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' \
185 PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' \
14e21f86 186 CPUID_OBJ='${CPUID_OBJ}' \
d0590fe6
AP
187 BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' \
188 AES_ASM_OBJ='${AES_ASM_OBJ}' \
189 BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' \
190 RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' \
191 SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' \
192 MD5_ASM_OBJ='${MD5_ASM_OBJ}' \
7abbffc3 193 RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
a24b7eeb
AP
194 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
195# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
196# which in turn eliminates ambiguities in variable treatment with -e.
d0590fe6 197
6b5f5e35
RL
198# BUILD_CMD is a generic macro to build a given target in a given
199# subdirectory. The target must be given through the shell variable
200# `target' and the subdirectory to build in must be given through `dir'.
201# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
202# BUILD_ONE_CMD instead.
203#
204# BUILD_ONE_CMD is a macro to build a given target in a given
205# subdirectory if that subdirectory is part of $(DIRS). It requires
206# exactly the same shell variables as BUILD_CMD.
207#
208# RECURSIVE_BUILD_CMD is a macro to build a given target in all
209# subdirectories defined in $(DIRS). It requires that the target
210# is given through the shell variable `target'.
a24b7eeb
AP
211BUILD_CMD= if [ -d "$$dir" ]; then \
212 ( cd $$dir && echo "making $$target in $$dir..." && \
213 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
214 ) || exit 1; \
215 fi
216RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
6b5f5e35
RL
217BUILD_ONE_CMD=\
218 if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
219 $(BUILD_CMD); \
220 fi
88c80b3e 221
734540f8 222reflect:
a24b7eeb 223 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
734540f8 224
4c82171a 225sub_all: build_all
88c80b3e
RL
226build_all: build_libs build_apps build_tests build_tools
227
506fec1a 228build_libs: build_crypto build_ssl build_engines
88c80b3e
RL
229
230build_crypto:
6b5f5e35 231 @dir=crypto; target=all; $(BUILD_ONE_CMD)
88c80b3e 232build_ssl:
6b5f5e35 233 @dir=ssl; target=all; $(BUILD_ONE_CMD)
506fec1a 234build_engines:
6b5f5e35 235 @dir=engines; target=all; $(BUILD_ONE_CMD)
88c80b3e 236build_apps:
6b5f5e35 237 @dir=apps; target=all; $(BUILD_ONE_CMD)
88c80b3e 238build_tests:
6b5f5e35 239 @dir=test; target=all; $(BUILD_ONE_CMD)
88c80b3e 240build_tools:
6b5f5e35 241 @dir=tools; target=all; $(BUILD_ONE_CMD)
ba5477eb
RL
242
243all_testapps: build_libs build_testapps
244build_testapps:
6b5f5e35 245 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
b436a982 246
a22fb399 247libcrypto$(SHLIB_EXT): libcrypto.a
f4316c36 248 @if [ "$(SHLIB_TARGET)" != "" ]; then \
a22fb399 249 $(MAKE) SHLIBDIRS=crypto build-shared; \
f4316c36
RL
250 else \
251 echo "There's no support for shared libraries on this platform" >&2; \
d0590fe6 252 exit 1; \
f4316c36 253 fi
0f180d1d 254
a22fb399 255libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
f4316c36 256 @if [ "$(SHLIB_TARGET)" != "" ]; then \
5ddcb866 257 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
f4316c36
RL
258 else \
259 echo "There's no support for shared libraries on this platform" >&2; \
d0590fe6 260 exit 1; \
f4316c36 261 fi
b436a982
RL
262
263clean-shared:
cfd06a62 264 @set -e; for i in $(SHLIBDIRS); do \
a22fb399
RL
265 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
266 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
267 for j in $${tmp:-x}; do \
268 ( set -x; rm -f lib$$i$$j ); \
269 done; \
270 fi; \
271 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
49e04548 272 if [ "$(PLATFORM)" = "Cygwin" ]; then \
1fe198b6
RL
273 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
274 fi; \
b436a982 275 done
d02b48c6 276
a22fb399 277link-shared:
cfd06a62 278 @ set -e; for i in ${SHLIBDIRS}; do \
3bfe024d 279 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
30afcc07
RL
280 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
281 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
282 symlink.$(SHLIB_TARGET); \
6b86bad5 283 libs="$$libs -l$$i"; \
0fd44e2d
RL
284 done
285
30afcc07
RL
286build-shared: do_$(SHLIB_TARGET) link-shared
287
288do_$(SHLIB_TARGET):
cfd06a62 289 @ set -e; libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
c1269c81
RL
290 if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
291 libs="$(LIBKRB5) $$libs"; \
292 fi; \
a24b7eeb 293 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
30afcc07
RL
294 LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
295 LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
296 LIBDEPS="$$libs $(EX_LIBS)" \
297 link_a.$(SHLIB_TARGET); \
c1269c81 298 libs="-l$$i $$libs"; \
a3fffd64
RL
299 done
300
ef8a18f4
RL
301libcrypto.pc: Makefile
302 @ ( echo 'prefix=$(INSTALLTOP)'; \
303 echo 'exec_prefix=$${prefix}'; \
304 echo 'libdir=$${exec_prefix}/lib'; \
305 echo 'includedir=$${prefix}/include'; \
306 echo ''; \
307 echo 'Name: OpenSSL-libcrypto'; \
308 echo 'Description: OpenSSL cryptography library'; \
309 echo 'Version: '$(VERSION); \
310 echo 'Requires: '; \
311 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
312 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
313
314libssl.pc: Makefile
315 @ ( echo 'prefix=$(INSTALLTOP)'; \
316 echo 'exec_prefix=$${prefix}'; \
317 echo 'libdir=$${exec_prefix}/lib'; \
318 echo 'includedir=$${prefix}/include'; \
319 echo ''; \
320 echo 'Name: OpenSSL'; \
321 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
322 echo 'Version: '$(VERSION); \
323 echo 'Requires: '; \
324 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
325 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
326
42ba5d23 327openssl.pc: Makefile
56824b96
RL
328 @ ( echo 'prefix=$(INSTALLTOP)'; \
329 echo 'exec_prefix=$${prefix}'; \
330 echo 'libdir=$${exec_prefix}/lib'; \
331 echo 'includedir=$${prefix}/include'; \
332 echo ''; \
333 echo 'Name: OpenSSL'; \
334 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
335 echo 'Version: '$(VERSION); \
336 echo 'Requires: '; \
337 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
49be7042 338 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
56824b96 339
c7199e62
BL
340Makefile: Makefile.org Configure config
341 @echo "Makefile is older than Makefile.org, Configure or config."
49b81422 342 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
9535d202
BL
343 @false
344
dfeab068 345libclean:
15da07d4 346 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
dfeab068 347
7841edc9
RL
348clean: libclean
349 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
a24b7eeb
AP
350 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
351 rm -f $(LIBS)
ef8a18f4 352 rm -f openssl.pc libssl.pc libcrypto.pc
7841edc9 353 rm -f speed.* .pure
bb8f3c58 354 rm -f $(TARFILE)
cfd06a62 355 @set -e; for i in $(ONEDIRS) ;\
d02b48c6 356 do \
bb8f3c58 357 rm -fr $$i/*; \
d02b48c6
RE
358 done
359
360makefile.one: files
99aab161 361 $(PERL) util/mk1mf.pl >makefile.one; \
d02b48c6
RE
362 sh util/do_ms.sh
363
bacad008 364files:
42ba5d23 365 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
a24b7eeb 366 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
d02b48c6
RE
367
368links:
6576774b 369 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
41d2a336 370 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
a24b7eeb 371 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
d02b48c6 372
1cc67fa8
RL
373gentests:
374 @(cd test && echo "generating dummy tests (if needed)..." && \
a24b7eeb 375 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on generate );
1cc67fa8 376
d02b48c6 377dclean:
bb8f3c58 378 rm -f *.bak
a24b7eeb 379 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
d02b48c6 380
e6e7b5f3
BM
381rehash: rehash.time
382rehash.time: certs
62d27939
AP
383 @(OPENSSL="`pwd`/util/opensslwrap.sh"; \
384 OPENSSL_DEBUG_MEMORY=on; \
69c922f5 385 export OPENSSL OPENSSL_DEBUG_MEMORY; \
69c922f5 386 $(PERL) tools/c_rehash certs)
3ebf0be1 387 touch rehash.time
d02b48c6 388
58964a49 389test: tests
d02b48c6 390
73bfb9ad 391tests: rehash
bb8f3c58 392 @(cd test && echo "testing..." && \
a24b7eeb 393 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
62d27939 394 util/opensslwrap.sh version -a
d02b48c6 395
d7f0ab5f
UM
396report:
397 @$(PERL) util/selftest.pl
398
d02b48c6 399depend:
a24b7eeb 400 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
d02b48c6
RE
401
402lint:
a24b7eeb 403 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
d02b48c6
RE
404
405tags:
a273a282
BL
406 rm -f TAGS
407 find . -name '[^.]*.[ch]' | xargs etags -a
d02b48c6
RE
408
409errors:
f6485909 410 $(PERL) util/mkerr.pl -recurse -write
506fec1a 411 (cd engines; $(MAKE) PERL=$(PERL) errors)
fbeaa3c4 412 $(PERL) util/ck_errf.pl */*.c */*/*.c
d02b48c6 413
e41c8d6a 414stacks:
f6485909 415 $(PERL) util/mkstack.pl -write
e41c8d6a 416
7740a1c6 417util/libeay.num::
f6485909 418 $(PERL) util/mkdef.pl crypto update
7740a1c6
BM
419
420util/ssleay.num::
f6485909 421 $(PERL) util/mkdef.pl ssl update
7740a1c6 422
1d00800e 423crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
f6485909 424 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
0357422d 425crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
f6485909 426 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
49e747e6 427
2faa930b
RL
428apps/openssl-vms.cnf: apps/openssl.cnf
429 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
430
d8e64093
RL
431crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
432 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
433
434
62c419d6 435TABLE: Configure
2330e18b 436 (echo 'Output of `Configure TABLE'"':"; \
f6485909 437 $(PERL) Configure TABLE) > TABLE
7740a1c6 438
d8e64093 439update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
7740a1c6 440
f9de8446
LJ
441# Build distribution tar-file. As the list of files returned by "find" is
442# pretty long, on several platforms a "too many arguments" error or similar
443# would occur. Therefore the list of files is temporarily stored into a file
444# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
445# tar does not support the --files-from option.
d02b48c6 446tar:
756b9a00
LJ
447 find . -type d -print | xargs chmod 755
448 find . -type f -print | xargs chmod a+r
449 find . -type f -perm -0100 -print | xargs chmod a+x
f9de8446
LJ
450 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
451 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
5a061129 452 tardy --user_number=0 --user_name=openssl \
9ce5db45
RE
453 --group_number=0 --group_name=openssl \
454 --prefix=openssl-$(VERSION) - |\
651d0aff 455 gzip --best >../$(TARFILE).gz; \
f9de8446 456 rm -f ../$(TARFILE).list; \
651d0aff 457 ls -l ../$(TARFILE).gz
d02b48c6 458
41d2a336
RL
459tar-snap:
460 @$(TAR) $(TARFLAGS) -cvf - \
3a7cef3e 461 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
41d2a336
RL
462 tardy --user_number=0 --user_name=openssl \
463 --group_number=0 --group_name=openssl \
464 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
465 ls -l ../$(TARFILE)
466
58964a49 467dist:
99aab161 468 $(PERL) Configure dist
d02b48c6
RE
469 @$(MAKE) dist_pem_h
470 @$(MAKE) SDIRS='${SDIRS}' clean
870d3d55 471 @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
d02b48c6
RE
472
473dist_pem_h:
a24b7eeb 474 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
d02b48c6 475
28a80034
RL
476install: all install_docs install_sw
477
478install_sw:
f0588887
BM
479 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
480 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
90819805 481 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
9d5c42b6 482 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
f0588887
BM
483 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
484 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
485 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
8d472bdd 486 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
a2ac429d 487 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
2a4a0a34
BM
488 do \
489 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
490 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
491 done;
a24b7eeb 492 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
cfd06a62 493 @set -e; for i in $(LIBS) ;\
d02b48c6 494 do \
b436a982
RL
495 if [ -f "$$i" ]; then \
496 ( echo installing $$i; \
7104c376
RL
497 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
498 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
499 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
30c08f2e 500 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
2c975b50
LJ
501 fi; \
502 done;
cfd06a62 503 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
a22fb399
RL
504 tmp="$(SHARED_LIBS)"; \
505 for i in $${tmp:-x}; \
506 do \
1fe198b6 507 if [ -f "$$i" -o -f "$$i.a" ]; then \
a22fb399 508 ( echo installing $$i; \
49e04548 509 if [ "$(PLATFORM)" != "Cygwin" ]; then \
7104c376
RL
510 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
511 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
30c08f2e 512 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
1fe198b6 513 else \
15da07d4 514 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
7104c376
RL
515 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
516 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
30c08f2e 517 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
15da07d4
RL
518 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
519 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
520 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
1fe198b6 521 fi ); \
2c975b50 522 fi; \
a22fb399
RL
523 done; \
524 ( here="`pwd`"; \
525 cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
4c3a2d64 526 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
e68cb95d
RL
527 if [ "$(INSTALLTOP)" != "/usr" ]; then \
528 echo 'OpenSSL shared libraries have been installed in:'; \
529 echo ' $(INSTALLTOP)'; \
530 echo ''; \
c0cc5c30 531 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
e68cb95d 532 fi; \
a22fb399 533 fi
ef8a18f4
RL
534 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
535 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libcrypto.pc
536 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
537 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libssl.pc
8e7a8b68 538 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
eeff6bb6 539 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
e6e7b5f3
BM
540
541install_docs:
542 @$(PERL) $(TOP)/util/mkdir-p.pl \
e1c55191
UM
543 $(INSTALL_PREFIX)$(MANDIR)/man1 \
544 $(INSTALL_PREFIX)$(MANDIR)/man3 \
545 $(INSTALL_PREFIX)$(MANDIR)/man5 \
546 $(INSTALL_PREFIX)$(MANDIR)/man7
623e9e66 547 @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
ec9f67f6
RL
548 here="`pwd`"; \
549 filecase=; \
94c1672e 550 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
ec9f67f6
RL
551 filecase=-i; \
552 fi; \
cfd06a62 553 set -e; for i in doc/apps/*.pod; do \
c6ce792f 554 fn=`basename $$i .pod`; \
401ee37a 555 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
1cc087fe 556 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
d13363af 557 (cd `$(PERL) util/dirname.pl $$i`; \
623e9e66 558 sh -c "$$pod2man \
2962243d
RL
559 --section=$$sec --center=OpenSSL \
560 --release=$(VERSION) `basename $$i`") \
1cc087fe 561 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
ec9f67f6 562 $(PERL) util/extract-names.pl < $$i | \
a4ae7466
RL
563 (grep -v $$filecase "^$$fn\$$"; true) | \
564 (grep -v "[ ]"; true) | \
ec9f67f6
RL
565 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
566 while read n; do \
49096719 567 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
ec9f67f6 568 done); \
f6f99618 569 done; \
cfd06a62 570 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
c6ce792f 571 fn=`basename $$i .pod`; \
401ee37a 572 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
1cc087fe 573 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
d13363af 574 (cd `$(PERL) util/dirname.pl $$i`; \
623e9e66 575 sh -c "$$pod2man \
2962243d
RL
576 --section=$$sec --center=OpenSSL \
577 --release=$(VERSION) `basename $$i`") \
1cc087fe 578 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
ec9f67f6 579 $(PERL) util/extract-names.pl < $$i | \
a4ae7466
RL
580 (grep -v $$filecase "^$$fn\$$"; true) | \
581 (grep -v "[ ]"; true) | \
ec9f67f6
RL
582 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
583 while read n; do \
49096719 584 $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
ec9f67f6 585 done); \
c6ce792f 586 done
d02b48c6
RE
587
588# DO NOT DELETE THIS LINE -- make depend depends on it.