Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / openssl / Makefile
blob8ce3bc0654c7b297b88ab18550cd254b91947030
1 ### Generated automatically from Makefile.org by Configure.
3 ##
4 ## Makefile for OpenSSL
5 ##
7 VERSION=1.0.1c
8 MAJOR=1
9 MINOR=0.1
10 SHLIB_VERSION_NUMBER=1.0.0
11 SHLIB_VERSION_HISTORY=
12 SHLIB_MAJOR=1
13 SHLIB_MINOR=0.0
14 SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
15 PLATFORM=linux-mipsel
16 OPTIONS=--openssldir=/etc --cross-compile-prefix= -ffunction-sections -fdata-sections -Wl,--gc-sections enable-shared enable-rc5 no-camellia no-capieng no-cms no-dtls1 no-ec no-ec_nistp_64_gcc_128 no-ecdh no-ecdsa no-engines no-err no-gmp no-gms no-gost no-hw no-jpake no-krb5 no-md2 no-mdc2 no-psk no-rfc3779 no-ripemd no-rmd160 no-sctp no-seed no-smime no-sse2 no-store no-threads no-ts no-zlib no-zlib-dynamic no-static-engine
17 CONFIGURE_ARGS=linux-mipsel --openssldir=/etc --cross-compile-prefix= -ffunction-sections -fdata-sections -Wl,--gc-sections shared enable-rc5 no-smime no-camellia no-krb5 no-rmd160 no-ripemd no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads no-engines no-zlib no-sse2 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
18 SHLIB_TARGET=linux-shared
20 # HERE indicates where this Makefile lives. This can be used to indicate
21 # where sub-Makefiles are expected to be. Currently has very limited usage,
22 # and should probably not be bothered with at all.
23 HERE=.
25 # INSTALL_PREFIX is for package builders so that they can configure
26 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
27 # Normally it is left empty.
28 INSTALL_PREFIX=
29 INSTALLTOP=/etc
31 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
32 OPENSSLDIR=/etc
34 # NO_IDEA - Define to build without the IDEA algorithm
35 # NO_RC4 - Define to build without the RC4 algorithm
36 # NO_RC2 - Define to build without the RC2 algorithm
37 # THREADS - Define when building with threads, you will probably also need any
38 # system defines as well, i.e. _REENTERANT for Solaris 2.[34]
39 # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
40 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
41 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
42 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
43 # one. 32 bytes will be read from this when the random
44 # number generator is initalised.
45 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
46 # NULL encryption ciphers.
48 # LOCK_DEBUG - turns on lots of lock debug output :-)
49 # REF_CHECK - turn on some xyz_free() assertions.
50 # REF_PRINT - prints some stuff on structure free.
51 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
52 # MFUNC - Make all Malloc/Free/Realloc calls call
53 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
54 # call application defined callbacks via CRYPTO_set_mem_functions()
55 # MD5_ASM needs to be defined to use the x86 assembler for MD5
56 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
57 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
58 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
59 # equal 4.
60 # PKCS1_CHECK - pkcs1 tests.
62 CROSS_COMPILE=
63 CC= $(CROSS_COMPILE)mipsel-uclibc-gcc
64 CFLAG= -fPIC -DOPENSSL_PIC -DDSO_DLFCN -DHAVE_DLFCN_H -ffunction-sections -fdata-sections -DOPENSSL_NO_ERR -DL_ENDIAN -DTERMIO -Os $(EXTRACFLAGS) -DOPENSSL_SMALL_FOOTPRINT -fomit-frame-pointer -Wall -DSHA1_ASM -DSHA256_ASM -DAES_ASM
65 DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_EC -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_ECDH -DOPENSSL_NO_ECDSA -DOPENSSL_NO_ENGINES -DOPENSSL_NO_GMP -DOPENSSL_NO_GMS -DOPENSSL_NO_GOST -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_PSK -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_RIPEMD -DOPENSSL_NO_RMD160 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SEED -DOPENSSL_NO_SMIME -DOPENSSL_NO_STORE -DOPENSSL_NO_TS
66 PEX_LIBS=
67 EX_LIBS= -Wl,--gc-sections -ldl
68 EXE_EXT=
69 ARFLAGS=
70 AR= $(CROSS_COMPILE)ar $(ARFLAGS) r
71 RANLIB= $(CROSS_COMPILE)ranlib
72 NM= $(CROSS_COMPILE)nm
73 PERL= /usr/bin/perl
74 TAR= tar
75 TARFLAGS= --no-recursion
76 MAKEDEPPROG=makedepend
77 LIBDIR=lib
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.
84 AS=$(CC) -c
85 ASFLAG=$(CFLAG)
87 # For x86 assembler: Set PROCESSOR to 386 if you want to support
88 # the 80386.
89 PROCESSOR=
91 # CPUID module collects small commonly used assembler snippets
92 CPUID_OBJ= mem_clr.o
93 BN_ASM= bn-mips.o
94 DES_ENC= des_enc.o fcrypt_b.o
95 AES_ENC= aes_cbc.o aes-mips.o
96 BF_ENC= bf_enc.o
97 CAST_ENC= c_enc.o
98 RC4_ENC= rc4_enc.o rc4_skey.o
99 RC5_ENC= rc5_enc.o
100 MD5_ASM_OBJ=
101 SHA1_ASM_OBJ= sha1-mips.o sha256-mips.o
102 RMD160_ASM_OBJ=
103 WP_ASM_OBJ= wp_block.o
104 CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
105 MODES_ASM_OBJ=
106 ENGINES_ASM_OBJ=
107 PERLASM_SCHEME= o32
109 # KRB5 stuff
110 KRB5_INCLUDES=
111 LIBKRB5=
113 # Zlib stuff
114 ZLIB_INCLUDE=
115 LIBZLIB=
117 # TOP level FIPS install directory.
118 FIPSDIR=/usr/local/ssl/fips-2.0
120 # This is the location of fipscanister.o and friends.
121 # The FIPS module build will place it $(INSTALLTOP)/lib
122 # but since $(INSTALLTOP) can only take the default value
123 # when the module is built it will be in /usr/local/ssl/lib
124 # $(INSTALLTOP) for this build may be different so hard
125 # code the path.
127 FIPSLIBDIR=
129 # The location of the library which contains fipscanister.o
130 # normally it will be libcrypto unless fipsdso is set in which
131 # case it will be libfips. If not compiling in FIPS mode at all
132 # this is empty making it a useful test for a FIPS compile.
134 FIPSCANLIB=
136 # Shared library base address. Currently only used on Windows.
139 BASEADDR=0xFB00000
141 DIRS= crypto ssl apps
142 ENGDIRS=
143 SHLIBDIRS= crypto ssl
145 # dirs in crypto to build
146 SDIRS= \
147 objects \
148 md4 md5 sha hmac whrlpool \
149 des aes rc2 rc4 rc5 idea bf cast modes \
150 bn rsa dsa dh dso engine \
151 buffer bio stack lhash rand err \
152 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui \
153 pqueue srp cmac
154 # keep in mind that the above list is adjusted by ./Configure
155 # according to no-xxx arguments...
157 # tests to perform. "alltests" is a special word indicating that all tests
158 # should be performed.
159 TESTS = alltests
161 MAKEFILE= Makefile
163 MANDIR=$(OPENSSLDIR)/man
164 MAN1=1
165 MAN3=3
166 MANSUFFIX=
167 HTMLSUFFIX=html
168 HTMLDIR=$(OPENSSLDIR)/html
169 SHELL=/bin/sh
171 TOP= .
172 ONEDIRS=out tmp
173 EDIRS= times bugs util include certs ms shlib mt demos perl sf dep VMS
174 WDIRS= windows
175 LIBS= libcrypto.a libssl.a
176 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
177 SHARED_SSL=libssl$(SHLIB_EXT)
178 SHARED_LIBS=$(SHARED_CRYPTO) $(SHARED_SSL)
179 SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so
180 SHARED_LDFLAGS=
182 GENERAL= Makefile
183 BASENAME= openssl
184 NAME= $(BASENAME)-$(VERSION)
185 TARFILE= $(NAME).tar
186 WTARFILE= $(NAME)-win.tar
187 EXHEADER= e_os2.h
188 HEADER= e_os.h
190 all: build_all openssl.pc libssl.pc libcrypto.pc
192 # as we stick to -e, CLEARENV ensures that local variables in lower
193 # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
194 # shell, which [annoyingly enough] terminates unset with error if VAR
195 # is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
196 # which terminates unset with error if no variable was present:-(
197 CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
198 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
199 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
200 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
201 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
202 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
203 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
204 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} $${SCRIPTS+SCRIPTS} \
205 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
206 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
208 BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
209 CC='$(CC)' CFLAG='$(CFLAG)' \
210 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
211 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
212 CROSS_COMPILE='$(CROSS_COMPILE)' \
213 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
214 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
215 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
216 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
217 LIBDIR='$(LIBDIR)' \
218 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
219 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
220 MAKEDEPPROG='$(MAKEDEPPROG)' \
221 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
222 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
223 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
224 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
225 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
226 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
227 CPUID_OBJ='$(CPUID_OBJ)' \
228 BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)' \
229 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
230 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
231 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
232 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
233 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
234 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
235 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
236 MODES_ASM_OBJ='$(MODES_ASM_OBJ)' \
237 ENGINES_ASM_OBJ='$(ENGINES_ASM_OBJ)' \
238 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
239 FIPSLIBDIR='${FIPSLIBDIR}' \
240 FIPSDIR='${FIPSDIR}' \
241 FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}" \
242 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
243 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
244 # which in turn eliminates ambiguities in variable treatment with -e.
246 # BUILD_CMD is a generic macro to build a given target in a given
247 # subdirectory. The target must be given through the shell variable
248 # `target' and the subdirectory to build in must be given through `dir'.
249 # This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
250 # BUILD_ONE_CMD instead.
252 # BUILD_ONE_CMD is a macro to build a given target in a given
253 # subdirectory if that subdirectory is part of $(DIRS). It requires
254 # exactly the same shell variables as BUILD_CMD.
256 # RECURSIVE_BUILD_CMD is a macro to build a given target in all
257 # subdirectories defined in $(DIRS). It requires that the target
258 # is given through the shell variable `target'.
259 BUILD_CMD= if [ -d "$$dir" ]; then \
260 ( cd $$dir && echo "making $$target in $$dir..." && \
261 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
262 ) || exit 1; \
264 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
265 BUILD_ONE_CMD=\
266 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
267 $(BUILD_CMD); \
270 reflect:
271 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
273 sub_all: build_all
274 build_all: build_libs build_apps build_tools
276 build_libs: build_crypto build_ssl build_engines
278 build_crypto:
279 @dir=crypto; target=all; $(BUILD_ONE_CMD)
280 build_ssl:
281 @dir=ssl; target=all; $(BUILD_ONE_CMD)
282 build_engines:
283 @dir=engines; target=all; $(BUILD_ONE_CMD)
284 build_apps:
285 @dir=apps; target=all; $(BUILD_ONE_CMD)
286 build_tests:
287 @dir=test; target=all; $(BUILD_ONE_CMD)
288 build_tools:
289 @dir=tools; target=all; $(BUILD_ONE_CMD)
291 all_testapps: build_libs build_testapps
292 build_testapps:
293 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
295 fips_premain_dso$(EXE_EXT): libcrypto.a
296 [ -z "$(FIPSCANLIB)" ] || $(CC) $(CFLAG) -Iinclude \
297 -DFINGERPRINT_PREMAIN_DSO_LOAD -o $@ \
298 $(FIPSLIBDIR)fips_premain.c $(FIPSLIBDIR)fipscanister.o \
299 libcrypto.a $(EX_LIBS)
301 libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
302 @if [ "$(SHLIB_TARGET)" != "" ]; then \
303 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
304 FIPSLD_LIBCRYPTO=libcrypto.a ; \
305 FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \
306 export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \
307 fi; \
308 $(MAKE) -e SHLIBDIRS=crypto build-shared; \
309 else \
310 echo "There's no support for shared libraries on this platform" >&2; \
311 exit 1; \
314 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
315 @if [ "$(SHLIB_TARGET)" != "" ]; then \
316 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
317 else \
318 echo "There's no support for shared libraries on this platform" >&2; \
319 exit 1; \
322 clean-shared:
323 @set -e; for i in $(SHLIBDIRS); do \
324 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
325 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
326 for j in $${tmp:-x}; do \
327 ( set -x; rm -f lib$$i$$j ); \
328 done; \
329 fi; \
330 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
331 if [ "$(PLATFORM)" = "Cygwin" ]; then \
332 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
333 fi; \
334 done
336 link-shared:
337 @ set -e; for i in $(SHLIBDIRS); do \
338 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
339 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
340 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
341 symlink.$(SHLIB_TARGET); \
342 libs="$$libs -l$$i"; \
343 done
345 build-shared: do_$(SHLIB_TARGET) link-shared
347 do_$(SHLIB_TARGET):
348 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
349 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
350 libs="$(LIBKRB5) $$libs"; \
351 fi; \
352 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
353 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
354 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
355 LIBDEPS="$$libs $(EX_LIBS)" \
356 link_a.$(SHLIB_TARGET); \
357 libs="-l$$i $$libs"; \
358 done
360 libcrypto.pc: Makefile
361 @ ( echo 'prefix=$(INSTALLTOP)'; \
362 echo 'exec_prefix=$${prefix}'; \
363 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
364 echo 'includedir=$${prefix}/include'; \
365 echo ''; \
366 echo 'Name: OpenSSL-libcrypto'; \
367 echo 'Description: OpenSSL cryptography library'; \
368 echo 'Version: '$(VERSION); \
369 echo 'Requires: '; \
370 echo 'Libs: -L$${libdir} -lcrypto'; \
371 echo 'Libs.private: $(EX_LIBS)'; \
372 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
374 libssl.pc: Makefile
375 @ ( echo 'prefix=$(INSTALLTOP)'; \
376 echo 'exec_prefix=$${prefix}'; \
377 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
378 echo 'includedir=$${prefix}/include'; \
379 echo ''; \
380 echo 'Name: OpenSSL'; \
381 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
382 echo 'Version: '$(VERSION); \
383 echo 'Requires: '; \
384 echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
385 echo 'Libs.private: $(EX_LIBS)'; \
386 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
388 openssl.pc: Makefile
389 @ ( echo 'prefix=$(INSTALLTOP)'; \
390 echo 'exec_prefix=$${prefix}'; \
391 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
392 echo 'includedir=$${prefix}/include'; \
393 echo ''; \
394 echo 'Name: OpenSSL'; \
395 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
396 echo 'Version: '$(VERSION); \
397 echo 'Requires: '; \
398 echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
399 echo 'Libs.private: $(EX_LIBS)'; \
400 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
402 libclean:
403 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
405 clean: libclean
406 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
407 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
408 rm -f $(LIBS)
409 rm -f openssl.pc libssl.pc libcrypto.pc
410 rm -f speed.* .pure
411 rm -f $(TARFILE)
412 @set -e; for i in $(ONEDIRS) ;\
413 do \
414 rm -fr $$i/*; \
415 done
417 makefile.one: files
418 $(PERL) util/mk1mf.pl >makefile.one; \
419 sh util/do_ms.sh
421 files:
422 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
423 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
425 links:
426 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
427 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
428 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
430 gentests:
431 @(cd test && echo "generating dummy tests (if needed)..." && \
432 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
434 dclean:
435 rm -rf *.bak include/openssl certs/.0
436 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
438 rehash: rehash.time
439 rehash.time: certs apps
440 @if [ -z "$(CROSS_COMPILE)" ]; then \
441 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
442 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
443 OPENSSL_DEBUG_MEMORY=on; \
444 export OPENSSL OPENSSL_DEBUG_MEMORY; \
445 $(PERL) tools/c_rehash certs) && \
446 touch rehash.time; \
447 else :; fi
449 test: tests
451 tests: rehash
452 @(cd test && echo "testing..." && \
453 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
454 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
456 report:
457 @$(PERL) util/selftest.pl
459 depend:
460 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
462 lint:
463 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
465 tags:
466 rm -f TAGS
467 find . -name '[^.]*.[ch]' | xargs etags -a
469 errors:
470 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
471 $(PERL) util/mkerr.pl -recurse -write
472 (cd engines; $(MAKE) PERL=$(PERL) errors)
474 stacks:
475 $(PERL) util/mkstack.pl -write
477 util/libeay.num::
478 $(PERL) util/mkdef.pl crypto update
480 util/ssleay.num::
481 $(PERL) util/mkdef.pl ssl update
483 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
484 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
485 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
486 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
487 crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
488 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
490 apps/openssl-vms.cnf: apps/openssl.cnf
491 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
493 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
494 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
497 TABLE: Configure
498 (echo 'Output of `Configure TABLE'"':"; \
499 $(PERL) Configure TABLE) > TABLE
501 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
503 # Build distribution tar-file. As the list of files returned by "find" is
504 # pretty long, on several platforms a "too many arguments" error or similar
505 # would occur. Therefore the list of files is temporarily stored into a file
506 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
507 # tar does not support the --files-from option.
508 tar:
509 find . -type d -print | xargs chmod 755
510 find . -type f -print | xargs chmod a+r
511 find . -type f -perm -0100 -print | xargs chmod a+x
512 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
513 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
514 tardy --user_number=0 --user_name=openssl \
515 --group_number=0 --group_name=openssl \
516 --prefix=openssl-$(VERSION) - |\
517 gzip --best >../$(TARFILE).gz; \
518 rm -f ../$(TARFILE).list; \
519 ls -l ../$(TARFILE).gz
521 tar-snap:
522 @$(TAR) $(TARFLAGS) -cvf - \
523 `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` |\
524 tardy --user_number=0 --user_name=openssl \
525 --group_number=0 --group_name=openssl \
526 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
527 ls -l ../$(TARFILE)
529 dist:
530 $(PERL) Configure dist
531 @$(MAKE) dist_pem_h
532 @$(MAKE) SDIRS='$(SDIRS)' clean
533 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
535 dist_pem_h:
536 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
538 install: all install_sw
540 install_sw:
541 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
542 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
543 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
544 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
545 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
546 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
547 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
548 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
549 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
550 do \
551 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
552 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
553 done;
554 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
555 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
556 do \
557 if [ -f "$$i" ]; then \
558 ( echo installing $$i; \
559 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
560 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
561 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
562 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
563 fi; \
564 done;
565 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
566 tmp="$(SHARED_LIBS)"; \
567 for i in $${tmp:-x}; \
568 do \
569 if [ -f "$$i" -o -f "$$i.a" ]; then \
570 ( echo installing $$i; \
571 if [ "$(PLATFORM)" != "Cygwin" ]; then \
572 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
573 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
574 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
575 else \
576 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
577 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
578 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
579 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
580 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
581 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
582 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
583 fi ); \
584 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
585 ( case $$i in \
586 *crypto*) i=libeay32.dll;; \
587 *ssl*) i=ssleay32.dll;; \
588 esac; \
589 echo installing $$i; \
590 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
591 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
592 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
593 fi; \
594 fi; \
595 done; \
596 ( here="`pwd`"; \
597 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
598 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
599 if [ "$(INSTALLTOP)" != "/usr" ]; then \
600 echo 'OpenSSL shared libraries have been installed in:'; \
601 echo ' $(INSTALLTOP)'; \
602 echo ''; \
603 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
604 fi; \
606 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
607 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
608 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
609 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
610 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
611 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
613 install_html_docs:
614 here="`pwd`"; \
615 for subdir in apps crypto ssl; do \
616 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
617 for i in doc/$$subdir/*.pod; do \
618 fn=`basename $$i .pod`; \
619 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
620 cat $$i \
621 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
622 | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
623 | sed -r 's/<!DOCTYPE.*//g' \
624 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
625 $(PERL) util/extract-names.pl < $$i | \
626 grep -v $$filecase "^$$fn\$$" | \
627 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
628 while read n; do \
629 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
630 done); \
631 done; \
632 done
634 install_docs:
635 @$(PERL) $(TOP)/util/mkdir-p.pl \
636 $(INSTALL_PREFIX)$(MANDIR)/man1 \
637 $(INSTALL_PREFIX)$(MANDIR)/man3 \
638 $(INSTALL_PREFIX)$(MANDIR)/man5 \
639 $(INSTALL_PREFIX)$(MANDIR)/man7
640 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
641 here="`pwd`"; \
642 filecase=; \
643 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
644 filecase=-i; \
645 fi; \
646 set -e; for i in doc/apps/*.pod; do \
647 fn=`basename $$i .pod`; \
648 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
649 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
650 (cd `$(PERL) util/dirname.pl $$i`; \
651 sh -c "$$pod2man \
652 --section=$$sec --center=OpenSSL \
653 --release=$(VERSION) `basename $$i`") \
654 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
655 $(PERL) util/extract-names.pl < $$i | \
656 (grep -v $$filecase "^$$fn\$$"; true) | \
657 (grep -v "[ ]"; true) | \
658 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
659 while read n; do \
660 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
661 done); \
662 done; \
663 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
664 fn=`basename $$i .pod`; \
665 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
666 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
667 (cd `$(PERL) util/dirname.pl $$i`; \
668 sh -c "$$pod2man \
669 --section=$$sec --center=OpenSSL \
670 --release=$(VERSION) `basename $$i`") \
671 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
672 $(PERL) util/extract-names.pl < $$i | \
673 (grep -v $$filecase "^$$fn\$$"; true) | \
674 (grep -v "[ ]"; true) | \
675 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
676 while read n; do \
677 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
678 done); \
679 done
681 # DO NOT DELETE THIS LINE -- make depend depends on it.