Tomato 1.28
[tomato.git] / release / src / router / openssl / Makefile
blob7140966baee396442fcdfb669d9cd0f7df99c9d1
1 ### Generated automatically from Makefile.org by Configure.
3 ##
4 ## Makefile for OpenSSL
5 ##
7 VERSION=0.9.6d
8 MAJOR=0
9 MINOR=9.6
10 SHLIB_VERSION_NUMBER=0.9.6
11 SHLIB_VERSION_HISTORY=
12 SHLIB_MAJOR=0
13 SHLIB_MINOR=9.6
14 SHLIB_EXT=
15 PLATFORM=linux-mipsel
16 OPTIONS=
17 CONFIGURE_ARGS=linux-mipsel
18 SHLIB_TARGET=
20 # INSTALL_PREFIX is for package builders so that they can configure
21 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
22 # Normally it is left empty.
23 INSTALL_PREFIX=
24 INSTALLTOP=/usr/local/ssl
26 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
27 OPENSSLDIR=/usr/local/ssl
29 # RSAref - Define if we are to link with RSAref.
30 # NO_IDEA - Define to build without the IDEA algorithm
31 # NO_RC4 - Define to build without the RC4 algorithm
32 # NO_RC2 - Define to build without the RC2 algorithm
33 # THREADS - Define when building with threads, you will probably also need any
34 # system defines as well, i.e. _REENTERANT for Solaris 2.[34]
35 # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
36 # TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
37 # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
38 # DEVRANDOM - Give this the value of the 'random device' if your OS supports
39 # one. 32 bytes will be read from this when the random
40 # number generator is initalised.
41 # SSL_FORBID_ENULL - define if you want the server to be not able to use the
42 # NULL encryption ciphers.
44 # LOCK_DEBUG - turns on lots of lock debug output :-)
45 # REF_CHECK - turn on some xyz_free() assertions.
46 # REF_PRINT - prints some stuff on structure free.
47 # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
48 # MFUNC - Make all Malloc/Free/Realloc calls call
49 # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
50 # call application defined callbacks via CRYPTO_set_mem_functions()
51 # MD5_ASM needs to be defined to use the x86 assembler for MD5
52 # SHA1_ASM needs to be defined to use the x86 assembler for SHA1
53 # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
54 # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
55 # equal 4.
56 # PKCS1_CHECK - pkcs1 tests.
58 #export CC= mipsel-linux-gcc
59 #export LD= mipsel-linux-ld
60 #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
61 CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
62 DEPFLAG=
63 PEX_LIBS=
64 EX_LIBS=
65 EXE_EXT=
66 export AR=$(CROSS_COMPILER)ar r
67 #export RANLIB=mipsel-linux-ranlib
68 PERL=perl
69 TAR= tar
70 TARFLAGS= --no-recursion
72 # Set BN_ASM to bn_asm.o if you want to use the C version
73 BN_ASM= bn_asm.o
74 #BN_ASM= bn_asm.o
75 #BN_ASM= asm/bn86-elf.o # elf, linux-elf
76 #BN_ASM= asm/bn86-sol.o # solaris
77 #BN_ASM= asm/bn86-out.o # a.out, FreeBSD
78 #BN_ASM= asm/bn86bsdi.o # bsdi
79 #BN_ASM= asm/alpha.o # DEC Alpha
80 #BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC
81 #BN_ASM= asm/r3000.o # SGI MIPS cpu
82 #BN_ASM= asm/sparc.o # Sun solaris/SunOS
83 #BN_ASM= asm/bn-win32.o # Windows 95/NT
84 #BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS
85 #BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1
87 # For x86 assembler: Set PROCESSOR to 386 if you want to support
88 # the 80386.
89 PROCESSOR=
91 # Set DES_ENC to des_enc.o if you want to use the C version
92 #There are 4 x86 assember options.
93 DES_ENC= des_enc.o fcrypt_b.o
94 #DES_ENC= des_enc.o fcrypt_b.o # C
95 #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf
96 #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris
97 #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD
98 #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi
100 # Set BF_ENC to bf_enc.o if you want to use the C version
101 #There are 4 x86 assember options.
102 BF_ENC= bf_enc.o
103 #BF_ENC= bf_enc.o
104 #BF_ENC= asm/bx86-elf.o # elf
105 #BF_ENC= asm/bx86-sol.o # solaris
106 #BF_ENC= asm/bx86-out.o # a.out, FreeBSD
107 #BF_ENC= asm/bx86bsdi.o # bsdi
109 # Set CAST_ENC to c_enc.o if you want to use the C version
110 #There are 4 x86 assember options.
111 CAST_ENC= c_enc.o
112 #CAST_ENC= c_enc.o
113 #CAST_ENC= asm/cx86-elf.o # elf
114 #CAST_ENC= asm/cx86-sol.o # solaris
115 #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD
116 #CAST_ENC= asm/cx86bsdi.o # bsdi
118 # Set RC4_ENC to rc4_enc.o if you want to use the C version
119 #There are 4 x86 assember options.
120 RC4_ENC= rc4_enc.o
121 #RC4_ENC= rc4_enc.o
122 #RC4_ENC= asm/rx86-elf.o # elf
123 #RC4_ENC= asm/rx86-sol.o # solaris
124 #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD
125 #RC4_ENC= asm/rx86bsdi.o # bsdi
127 # Set RC5_ENC to rc5_enc.o if you want to use the C version
128 #There are 4 x86 assember options.
129 RC5_ENC= rc5_enc.o
130 #RC5_ENC= rc5_enc.o
131 #RC5_ENC= asm/r586-elf.o # elf
132 #RC5_ENC= asm/r586-sol.o # solaris
133 #RC5_ENC= asm/r586-out.o # a.out, FreeBSD
134 #RC5_ENC= asm/r586bsdi.o # bsdi
136 # Also need MD5_ASM defined
137 MD5_ASM_OBJ=
138 #MD5_ASM_OBJ= asm/mx86-elf.o # elf
139 #MD5_ASM_OBJ= asm/mx86-sol.o # solaris
140 #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD
141 #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi
143 # Also need SHA1_ASM defined
144 SHA1_ASM_OBJ=
145 #SHA1_ASM_OBJ= asm/sx86-elf.o # elf
146 #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris
147 #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD
148 #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi
150 # Also need RMD160_ASM defined
151 RMD160_ASM_OBJ=
152 #RMD160_ASM_OBJ= asm/rm86-elf.o # elf
153 #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris
154 #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
155 #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
157 # When we're prepared to use shared libraries in the programs we link here
158 # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
159 SHLIB_MARK=
161 DIRS= crypto ssl #apps #rsaref $(SHLIB_MARK) apps test tools
162 SHLIBDIRS= crypto ssl
164 # dirs in crypto to build
165 SDIRS= \
166 md2 md4 md5 sha mdc2 hmac ripemd \
167 des rc2 rc4 rc5 idea bf cast \
168 bn rsa dsa dh dso \
169 buffer bio stack lhash rand err objects \
170 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
172 MAKEFILE= Makefile.ssl
173 MAKE= make -f Makefile.ssl
175 MANDIR=$(OPENSSLDIR)/man
176 MAN1=1
177 MAN3=3
178 SHELL=/bin/sh
180 TOP= .
181 ONEDIRS=out tmp
182 EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
183 WDIRS= windows
184 LIBS= libcrypto.a libssl.a
185 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
186 SHARED_SSL=libssl$(SHLIB_EXT)
187 SHARED_LIBS=
188 SHARED_LIBS_LINK_EXTS=
189 SHARED_LDFLAGS=
191 GENERAL= Makefile
192 BASENAME= openssl
193 NAME= $(BASENAME)-$(VERSION)
194 TARFILE= $(NAME).tar
195 WTARFILE= $(NAME)-win.tar
196 EXHEADER= e_os.h e_os2.h
197 HEADER= e_os.h
199 # When we're prepared to use shared libraries in the programs we link here
200 # we might remove 'clean-shared' from the targets to perform at this stage
202 all: clean-shared Makefile.ssl sub_all shared-library my_apps
204 my_apps:
205 (cd apps && echo "making all in apps..." && \
206 $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' all )
208 sub_all:
209 @for i in $(DIRS); \
210 do \
211 if [ -d "$$i" ]; then \
212 (cd $$i && echo "making all in $$i..." && \
213 $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' all ) || exit 1; \
214 else \
215 $(MAKE) $$i; \
216 fi; \
217 done; \
218 if echo "$(DIRS)" | \
219 egrep '(^| )(crypto|ssl)( |$$)' > /dev/null 2>&1 && \
220 [ -n "$(SHARED_LIBS)" ]; then \
221 $(MAKE) $(SHARED_LIBS); \
224 libcrypto$(SHLIB_EXT): libcrypto.a
225 @if [ "$(SHLIB_TARGET)" != "" ]; then \
226 $(MAKE) SHLIBDIRS=crypto build-shared; \
227 else \
228 echo "There's no support for shared libraries on this platform" >&2; \
230 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
231 @if [ "$(SHLIB_TARGET)" != "" ]; then \
232 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
233 else \
234 echo "There's no support for shared libraries on this platform" >&2; \
237 clean-shared:
238 @for i in $(SHLIBDIRS); do \
239 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
240 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
241 for j in $${tmp:-x}; do \
242 ( set -x; rm -f lib$$i$$j ); \
243 done; \
244 fi; \
245 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
246 if [ "$(PLATFORM)" = "Cygwin" ]; then \
247 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
248 fi; \
249 done
251 link-shared:
252 @if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
253 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
254 for i in $(SHLIBDIRS); do \
255 prev=lib$$i$(SHLIB_EXT); \
256 for j in $${tmp:-x}; do \
257 ( set -x; ln -f -s $$prev lib$$i$$j ); \
258 prev=lib$$i$$j; \
259 done; \
260 done; \
263 build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
265 do_bsd-gcc-shared: do_gnu-shared
266 do_linux-shared: do_gnu-shared
267 do_gnu-shared:
268 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
269 ( set -x; ${CC} ${SHARED_LDFLAGS} \
270 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
271 -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
272 -Wl,-Bsymbolic \
273 -Wl,--whole-archive lib$$i.a \
274 -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
275 libs="$$libs -l$$i"; \
276 done
278 DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
279 collect2=`gcc -print-prog-name=collect2 2>&1` && \
280 [ -n "$$collect2" ] && \
281 my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
282 [ -n "$$my_ld" ] && \
283 $$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
285 # For Darwin AKA Mac OS/X (dyld)
286 do_darwin-shared:
287 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
288 ( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
289 lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
290 -compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
291 -install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
292 libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
293 echo "" ; \
294 done
296 do_cygwin-shared:
297 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
298 ( set -x; ${CC} -shared -o cyg$$i.dll \
299 -Wl,-Bsymbolic \
300 -Wl,--whole-archive lib$$i.a \
301 -Wl,--out-implib,lib$$i.dll.a \
302 -Wl,--no-whole-archive $$libs ) || exit 1; \
303 libs="$$libs -l$$i"; \
304 done
306 # This assumes that GNU utilities are *not* used
307 do_alpha-osf1-shared:
308 if ${DETECT_GNU_LD}; then \
309 $(MAKE) do_gnu-shared; \
310 else \
311 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
312 ( set -x; ${CC} ${SHARED_LDFLAGS} \
313 -shared -o lib$$i.so \
314 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
315 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
316 libs="$$libs -l$$i"; \
317 done; \
320 # This assumes that GNU utilities are *not* used
321 # The difference between alpha-osf1-shared and tru64-shared is the `-msym'
322 # option passed to the linker.
323 do_tru64-shared:
324 if ${DETECT_GNU_LD}; then \
325 $(MAKE) do_gnu-shared; \
326 else \
327 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
328 ( set -x; ${CC} ${SHARED_LDFLAGS} \
329 -shared -msym -o lib$$i.so \
330 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
331 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
332 libs="$$libs -l$$i"; \
333 done; \
336 # This assumes that GNU utilities are *not* used
337 # The difference between tru64-shared and tru64-shared-rpath is the
338 # -rpath ${INSTALLTOP}/lib passed to the linker.
339 do_tru64-shared-rpath:
340 if ${DETECT_GNU_LD}; then \
341 $(MAKE) do_gnu-shared; \
342 else \
343 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
344 ( set -x; ${CC} ${SHARED_LDFLAGS} \
345 -shared -msym -o lib$$i.so \
346 -rpath ${INSTALLTOP}/lib \
347 -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
348 -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
349 libs="$$libs -l$$i"; \
350 done; \
354 # This assumes that GNU utilities are *not* used
355 do_solaris-shared:
356 if ${DETECT_GNU_LD}; then \
357 $(MAKE) do_gnu-shared; \
358 else \
359 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
360 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
361 set -x; ${CC} ${SHARED_LDFLAGS} \
362 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
363 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
364 -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
365 libs="$$libs -l$$i"; \
366 done; \
369 # OpenServer 5 native compilers used
370 do_svr3-shared:
371 if ${DETECT_GNU_LD}; then \
372 $(MAKE) do_gnu-shared; \
373 else \
374 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
375 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
376 find . -name "*.o" -print > allobjs ; \
377 OBJS= ; export OBJS ; \
378 for obj in `ar t lib$$i.a` ; do \
379 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
380 done ; \
381 set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
382 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
383 $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
384 libs="$$libs -l$$i"; \
385 done; \
388 # UnixWare 7 and OpenUNIX 8 native compilers used
389 do_svr5-shared:
390 if ${DETECT_GNU_LD}; then \
391 $(MAKE) do_gnu-shared; \
392 else \
393 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
394 ( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
395 find . -name "*.o" -print > allobjs ; \
396 OBJS= ; export OBJS ; \
397 for obj in `ar t lib$$i.a` ; do \
398 OBJS="$${OBJS} `grep $$obj allobjs`" ; \
399 done ; \
400 set -x; ${CC} ${SHARED_LDFLAGS} \
401 -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
402 -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
403 $${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
404 libs="$$libs -l$$i"; \
405 done; \
408 # This assumes that GNU utilities are *not* used
409 do_irix-shared:
410 if ${DETECT_GNU_LD}; then \
411 $(MAKE) do_gnu-shared; \
412 else \
413 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
414 ( set -x; ${CC} ${SHARED_LDFLAGS} \
415 -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
416 -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
417 -all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
418 libs="$$libs -l$$i"; \
419 done; \
422 # This assumes that GNU utilities are *not* used
423 do_hpux-shared:
424 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
425 ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
426 +vnocompatwarnings \
427 -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
428 +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
429 -Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
430 libs="$$libs -L. -l$$i"; \
431 done
433 # This assumes that GNU utilities are *not* used
434 do_hpux64-shared:
435 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
436 ( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
437 -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
438 +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
439 +forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
440 libs="$$libs -L. -l$$i"; \
441 done
443 # The following method is said to work on all platforms. Tests will
444 # determine if that's how it's gong to be used.
445 # This assumes that for all but GNU systems, GNU utilities are *not* used.
446 # ALLSYMSFLAGS would be:
447 # GNU systems: --whole-archive
448 # Tru64 Unix: -all
449 # Solaris: -z allextract
450 # Irix: -all
451 # HP/UX-32bit: -Fl
452 # HP/UX-64bit: +forceload
453 # AIX: -bnogc
454 # SHAREDFLAGS would be:
455 # GNU systems: -shared -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
456 # Tru64 Unix: -shared \
457 # -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}"
458 # Solaris: -G -h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
459 # Irix: -shared -Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
460 # HP/UX-32bit: +vnocompatwarnings -b -z +s \
461 # +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
462 # HP/UX-64bit: -b -z +h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR}
463 # AIX: -G -bE:lib$$i.exp -bM:SRE
464 # SHAREDCMD would be:
465 # GNU systems: $(CC)
466 # Tru64 Unix: $(CC)
467 # Solaris: $(CC)
468 # Irix: $(CC)
469 # HP/UX-32bit: /usr/ccs/bin/ld
470 # HP/UX-64bit: /usr/ccs/bin/ld
471 # AIX: $(CC)
472 ALLSYMSFLAG=-bnogc
473 SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
474 SHAREDCMD=$(CC)
475 do_aix-shared:
476 libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
477 ( set -x; \
478 ld -r -o $$i.o $(ALLSYMSFLAG) lib$$i.a && \
479 ( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
480 $(SHAREDCMD) $(SHAREDFLAG) -o lib$$i.so lib$$i.o \
481 $$libs ${EX_LIBS} ) ) \
482 || exit 1; \
483 libs="$$libs -l$$i"; \
484 done
486 Makefile.ssl: Makefile.org
487 @echo "Makefile.ssl is older than Makefile.org."
488 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
489 @false
491 libclean:
492 rm -f *.a */lib */*/lib
494 clean:
495 rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
496 @for i in $(DIRS) ;\
497 do \
498 if [ -d "$$i" ]; then \
499 (cd $$i && echo "making clean in $$i..." && \
500 $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
501 rm -f $(LIBS); \
502 fi; \
503 done;
504 rm -f *.a *.o speed.* *.map *.so .pure core
505 rm -f $(TARFILE)
506 @for i in $(ONEDIRS) ;\
507 do \
508 rm -fr $$i/*; \
509 done
510 rm -rf shared
512 makefile.one: files
513 $(PERL) util/mk1mf.pl >makefile.one; \
514 sh util/do_ms.sh
516 files:
517 $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
518 @for i in $(DIRS) ;\
519 do \
520 if [ -d "$$i" ]; then \
521 (cd $$i && echo "making 'files' in $$i..." && \
522 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
523 fi; \
524 done;
526 links:
527 @$(TOP)/util/point.sh Makefile.ssl Makefile
528 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
529 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
530 @for i in $(DIRS); do \
531 if [ -d "$$i" ]; then \
532 (cd $$i && echo "making links in $$i..." && \
533 $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \
534 fi; \
535 done;
537 dclean:
538 rm -f *.bak
539 @for i in $(DIRS) ;\
540 do \
541 if [ -d "$$i" ]; then \
542 (cd $$i && echo "making dclean in $$i..." && \
543 $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
544 fi; \
545 done;
547 rehash: rehash.time
548 rehash.time: certs
549 @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs)
550 touch rehash.time
552 test: tests
554 tests: rehash
555 @(cd test && echo "testing..." && \
556 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' EXE_EXT='${EXE_EXT}' tests );
557 @apps/openssl version -a
559 report:
560 @$(PERL) util/selftest.pl
562 depend:
563 @for i in $(DIRS) ;\
564 do \
565 if [ -d "$$i" ]; then \
566 (cd $$i && echo "making dependencies $$i..." && \
567 $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
568 fi; \
569 done;
571 lint:
572 @for i in $(DIRS) ;\
573 do \
574 if [ -d "$$i" ]; then \
575 (cd $$i && echo "making lint $$i..." && \
576 $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
577 fi; \
578 done;
580 tags:
581 @for i in $(DIRS) ;\
582 do \
583 if [ -d "$$i" ]; then \
584 (cd $$i && echo "making tags $$i..." && \
585 $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
586 fi; \
587 done;
589 errors:
590 $(PERL) util/mkerr.pl -recurse -write
592 stacks:
593 $(PERL) util/mkstack.pl -write
595 util/libeay.num::
596 $(PERL) util/mkdef.pl crypto update
598 util/ssleay.num::
599 $(PERL) util/mkdef.pl ssl update
601 crypto/objects/obj_dat.h: crypto/objects/obj_mac.h crypto/objects/obj_dat.pl
602 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
603 crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt
604 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
606 TABLE: Configure
607 (echo 'Output of `Configure TABLE'"':"; \
608 $(PERL) Configure TABLE) > TABLE
610 update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
612 tar:
613 @$(TAR) $(TARFLAGS) -cvf - \
614 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
615 tardy --user_number=0 --user_name=openssl \
616 --group_number=0 --group_name=openssl \
617 --prefix=openssl-$(VERSION) - |\
618 gzip --best >../$(TARFILE).gz; \
619 ls -l ../$(TARFILE).gz
621 dist:
622 $(PERL) Configure dist
623 @$(MAKE) dist_pem_h
624 @$(MAKE) SDIRS='${SDIRS}' clean
625 @$(MAKE) tar
627 dist_pem_h:
628 (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
630 install: all install_docs
631 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
632 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
633 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
634 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
635 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
636 $(INSTALL_PREFIX)$(OPENSSLDIR)/private \
637 $(INSTALL_PREFIX)$(OPENSSLDIR)/lib
638 @for i in $(EXHEADER) ;\
639 do \
640 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
641 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
642 done;
643 @for i in $(DIRS) ;\
644 do \
645 if [ -d "$$i" ]; then \
646 (cd $$i; echo "installing $$i..."; \
647 $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
648 fi; \
649 done
650 @for i in $(LIBS) ;\
651 do \
652 if [ -f "$$i" ]; then \
653 ( echo installing $$i; \
654 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
655 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
656 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
657 fi; \
658 done
659 @if [ -n "$(SHARED_LIBS)" ]; then \
660 tmp="$(SHARED_LIBS)"; \
661 for i in $${tmp:-x}; \
662 do \
663 if [ -f "$$i" -o -f "$$i.a" ]; then \
664 ( echo installing $$i; \
665 if [ "$(PLATFORM)" != "Cygwin" ]; then \
666 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
667 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
668 else \
669 c=`echo $$i | sed 's/^lib/cyg/'`; \
670 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
671 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
672 cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
673 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
674 fi ); \
675 fi; \
676 done; \
677 ( here="`pwd`"; \
678 cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
679 make -f $$here/Makefile link-shared ); \
682 install_docs:
683 @$(PERL) $(TOP)/util/mkdir-p.pl \
684 $(INSTALL_PREFIX)$(MANDIR)/man1 \
685 $(INSTALL_PREFIX)$(MANDIR)/man3 \
686 $(INSTALL_PREFIX)$(MANDIR)/man5 \
687 $(INSTALL_PREFIX)$(MANDIR)/man7
688 @for i in doc/apps/*.pod; do \
689 fn=`basename $$i .pod`; \
690 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
691 echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
692 (cd `dirname $$i`; \
693 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
694 --release=$(VERSION) `basename $$i`) \
695 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
696 done
697 @for i in doc/crypto/*.pod doc/ssl/*.pod; do \
698 fn=`basename $$i .pod`; \
699 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
700 echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
701 (cd `dirname $$i`; \
702 $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
703 --release=$(VERSION) `basename $$i`) \
704 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
705 done
707 shared-library:
708 $(LD) -shared -o libcrypto.so $(shell find crypto -iname "*.o")
709 $(LD) -shared -o libssl.so $(shell find ssl -iname "*.o")
711 # DO NOT DELETE THIS LINE -- make depend depends on it.