Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / openssl / Makefile
blob2573edcfb70774be8c727f92b3fb93ed5a564171
1 ### Generated automatically from Makefile.org by Configure.
3 ##
4 ## Makefile for OpenSSL
5 ##
7 VERSION=1.0.1j
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-armv4
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_nistp_64_gcc_128 no-engines no-err no-gmp no-gms no-hw no-jpake no-krb5 no-md2 no-mdc2 no-psk no-rfc3779 no-ripemd no-rmd160 no-sctp no-seed no-sha0 no-smime no-sse2 no-store no-threads no-ts no-unit-test no-zlib no-zlib-dynamic no-static-engine
17 CONFIGURE_ARGS=linux-armv4 --openssldir=/etc --cross-compile-prefix= -ffunction-sections -fdata-sections -Wl,--gc-sections shared enable-rc5 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 no-err no-hw no-jpake no-threads no-zlib no-engines 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)arm-brcm-linux-uclibcgnueabi-gcc
64 CFLAG= -fPIC -DOPENSSL_PIC -DDSO_DLFCN -DHAVE_DLFCN_H -ffunction-sections -fdata-sections -DOPENSSL_NO_ERR -DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM
65 DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CMS -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_ENGINES -DOPENSSL_NO_GMP -DOPENSSL_NO_GMS -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_SHA0 -DOPENSSL_NO_SMIME -DOPENSSL_NO_STORE -DOPENSSL_NO_TS -DOPENSSL_NO_UNIT_TEST
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 --record-size=10240
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= armcap.o armv4cpuid.o
93 BN_ASM= bn_asm.o armv4-mont.o armv4-gf2m.o
94 DES_ENC= des_enc.o fcrypt_b.o
95 AES_ENC= aes_cbc.o aes-armv4.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-armv4-large.o sha256-armv4.o sha512-armv4.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= ghash-armv4.o
106 ENGINES_ASM_OBJ=
107 PERLASM_SCHEME= void
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= ccgost
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 ec rsa dsa ecdsa dh ecdh 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 CC="$${CC:-$(CC)}" build-shared && \
309 (touch -c fips_premain_dso$(EXE_EXT) || :); \
310 else \
311 echo "There's no support for shared libraries on this platform" >&2; \
312 exit 1; \
315 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
316 @if [ "$(SHLIB_TARGET)" != "" ]; then \
317 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
318 else \
319 echo "There's no support for shared libraries on this platform" >&2; \
320 exit 1; \
323 clean-shared:
324 @set -e; for i in $(SHLIBDIRS); do \
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) ); \
332 if [ "$(PLATFORM)" = "Cygwin" ]; then \
333 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
334 fi; \
335 done
337 link-shared:
338 @ set -e; for i in $(SHLIBDIRS); do \
339 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
340 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
341 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
342 symlink.$(SHLIB_TARGET); \
343 libs="$$libs -l$$i"; \
344 done
346 build-shared: do_$(SHLIB_TARGET) link-shared
348 do_$(SHLIB_TARGET):
349 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
350 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
351 libs="$(LIBKRB5) $$libs"; \
352 fi; \
353 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
354 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
355 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
356 LIBDEPS="$$libs $(EX_LIBS)" \
357 link_a.$(SHLIB_TARGET); \
358 libs="-l$$i $$libs"; \
359 done
361 libcrypto.pc: Makefile
362 @ ( echo 'prefix=$(INSTALLTOP)'; \
363 echo 'exec_prefix=$${prefix}'; \
364 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
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: '; \
371 echo 'Libs: -L$${libdir} -lcrypto'; \
372 echo 'Libs.private: $(EX_LIBS)'; \
373 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
375 libssl.pc: Makefile
376 @ ( echo 'prefix=$(INSTALLTOP)'; \
377 echo 'exec_prefix=$${prefix}'; \
378 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
379 echo 'includedir=$${prefix}/include'; \
380 echo ''; \
381 echo 'Name: OpenSSL'; \
382 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
383 echo 'Version: '$(VERSION); \
384 echo 'Requires: '; \
385 echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
386 echo 'Libs.private: $(EX_LIBS)'; \
387 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
389 openssl.pc: Makefile
390 @ ( echo 'prefix=$(INSTALLTOP)'; \
391 echo 'exec_prefix=$${prefix}'; \
392 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
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); \
398 echo 'Requires: '; \
399 echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
400 echo 'Libs.private: $(EX_LIBS)'; \
401 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
403 libclean:
404 rm -f *.map *.so *.so.* *.dylib *.dll engines/*.so engines/*.dll engines/*.dylib *.a engines/*.a */lib */*/lib
406 clean: libclean
407 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
408 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
409 rm -f $(LIBS)
410 rm -f openssl.pc libssl.pc libcrypto.pc
411 rm -f speed.* .pure
412 rm -f $(TARFILE)
413 @set -e; for i in $(ONEDIRS) ;\
414 do \
415 rm -fr $$i/*; \
416 done
418 makefile.one: files
419 $(PERL) util/mk1mf.pl >makefile.one; \
420 sh util/do_ms.sh
422 files:
423 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
424 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
426 links:
427 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
428 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
429 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
431 gentests:
432 @(cd test && echo "generating dummy tests (if needed)..." && \
433 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
435 dclean:
436 rm -rf *.bak include/openssl certs/.0
437 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
439 rehash: rehash.time
440 rehash.time: certs apps
441 @if [ -z "$(CROSS_COMPILE)" ]; then \
442 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
443 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
444 OPENSSL_DEBUG_MEMORY=on; \
445 export OPENSSL OPENSSL_DEBUG_MEMORY; \
446 $(PERL) tools/c_rehash certs/demo) && \
447 touch rehash.time; \
448 else :; fi
450 test: tests
452 tests: rehash
453 @(cd test && echo "testing..." && \
454 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
455 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
457 report:
458 @$(PERL) util/selftest.pl
460 depend:
461 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
463 lint:
464 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
466 tags:
467 rm -f TAGS
468 find . -name '[^.]*.[ch]' | xargs etags -a
470 errors:
471 $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
472 $(PERL) util/mkerr.pl -recurse -write
473 (cd engines; $(MAKE) PERL=$(PERL) errors)
475 stacks:
476 $(PERL) util/mkstack.pl -write
478 util/libeay.num::
479 $(PERL) util/mkdef.pl crypto update
481 util/ssleay.num::
482 $(PERL) util/mkdef.pl ssl update
484 crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
485 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
486 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
487 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
488 crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
489 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
491 apps/openssl-vms.cnf: apps/openssl.cnf
492 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
494 crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
495 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
498 TABLE: Configure
499 (echo 'Output of `Configure TABLE'"':"; \
500 $(PERL) Configure TABLE) > TABLE
502 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
504 # Build distribution tar-file. As the list of files returned by "find" is
505 # pretty long, on several platforms a "too many arguments" error or similar
506 # would occur. Therefore the list of files is temporarily stored into a file
507 # and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
508 # tar does not support the --files-from option.
509 tar:
510 find . -type d -print | xargs chmod 755
511 find . -type f -print | xargs chmod a+r
512 find . -type f -perm -0100 -print | xargs chmod a+x
513 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
514 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
515 tardy --user_number=0 --user_name=openssl \
516 --group_number=0 --group_name=openssl \
517 --prefix=openssl-$(VERSION) - |\
518 gzip --best >../$(TARFILE).gz; \
519 rm -f ../$(TARFILE).list; \
520 ls -l ../$(TARFILE).gz
522 tar-snap:
523 @$(TAR) $(TARFLAGS) -cvf - \
524 `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` |\
525 tardy --user_number=0 --user_name=openssl \
526 --group_number=0 --group_name=openssl \
527 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
528 ls -l ../$(TARFILE)
530 dist:
531 $(PERL) Configure dist
532 @$(MAKE) dist_pem_h
533 @$(MAKE) SDIRS='$(SDIRS)' clean
534 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
536 dist_pem_h:
537 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
539 install: all install_sw
541 install_sw:
542 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
543 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
544 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
545 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
546 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
547 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
548 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
549 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
550 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
551 do \
552 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
553 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
554 done;
555 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
556 @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
557 do \
558 if [ -f "$$i" ]; then \
559 ( echo installing $$i; \
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 ); \
564 fi; \
565 done;
566 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
567 tmp="$(SHARED_LIBS)"; \
568 for i in $${tmp:-x}; \
569 do \
570 if [ -f "$$i" -o -f "$$i.a" ]; then \
571 ( echo installing $$i; \
572 if [ "$(PLATFORM)" != "Cygwin" ]; then \
573 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
574 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
575 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
576 else \
577 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
578 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
579 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
580 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
581 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
582 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
583 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
584 fi ); \
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; \
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 ); \
594 fi; \
595 fi; \
596 done; \
597 ( here="`pwd`"; \
598 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
599 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
600 if [ "$(INSTALLTOP)" != "/usr" ]; then \
601 echo 'OpenSSL shared libraries have been installed in:'; \
602 echo ' $(INSTALLTOP)'; \
603 echo ''; \
604 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
605 fi; \
607 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
608 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
609 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
610 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
611 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
612 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
614 install_html_docs:
615 here="`pwd`"; \
616 for subdir in apps crypto ssl; do \
617 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
618 for i in doc/$$subdir/*.pod; do \
619 fn=`basename $$i .pod`; \
620 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
621 cat $$i \
622 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
623 | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
624 | sed -r 's/<!DOCTYPE.*//g' \
625 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
626 $(PERL) util/extract-names.pl < $$i | \
627 grep -v $$filecase "^$$fn\$$" | \
628 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
629 while read n; do \
630 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
631 done); \
632 done; \
633 done
635 install_docs:
636 @$(PERL) $(TOP)/util/mkdir-p.pl \
637 $(INSTALL_PREFIX)$(MANDIR)/man1 \
638 $(INSTALL_PREFIX)$(MANDIR)/man3 \
639 $(INSTALL_PREFIX)$(MANDIR)/man5 \
640 $(INSTALL_PREFIX)$(MANDIR)/man7
641 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
642 here="`pwd`"; \
643 filecase=; \
644 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
645 filecase=-i; \
646 fi; \
647 set -e; for i in doc/apps/*.pod; do \
648 fn=`basename $$i .pod`; \
649 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
650 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
651 (cd `$(PERL) util/dirname.pl $$i`; \
652 sh -c "$$pod2man \
653 --section=$$sec --center=OpenSSL \
654 --release=$(VERSION) `basename $$i`") \
655 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
656 $(PERL) util/extract-names.pl < $$i | \
657 (grep -v $$filecase "^$$fn\$$"; true) | \
658 (grep -v "[ ]"; true) | \
659 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
660 while read n; do \
661 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
662 done); \
663 done; \
664 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
665 fn=`basename $$i .pod`; \
666 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
667 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
668 (cd `$(PERL) util/dirname.pl $$i`; \
669 sh -c "$$pod2man \
670 --section=$$sec --center=OpenSSL \
671 --release=$(VERSION) `basename $$i`") \
672 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
673 $(PERL) util/extract-names.pl < $$i | \
674 (grep -v $$filecase "^$$fn\$$"; true) | \
675 (grep -v "[ ]"; true) | \
676 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
677 while read n; do \
678 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
679 done); \
680 done
682 # DO NOT DELETE THIS LINE -- make depend depends on it.