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