1 | ## |
---|
2 | ## Makefile for OpenSSL |
---|
3 | ## |
---|
4 | |
---|
5 | VERSION= |
---|
6 | MAJOR= |
---|
7 | MINOR= |
---|
8 | SHLIB_VERSION_NUMBER= |
---|
9 | SHLIB_VERSION_HISTORY= |
---|
10 | SHLIB_MAJOR= |
---|
11 | SHLIB_MINOR= |
---|
12 | PLATFORM=dist |
---|
13 | OPTIONS= |
---|
14 | CONFIGURE_ARGS= |
---|
15 | SHLIB_TARGET= |
---|
16 | |
---|
17 | # INSTALL_PREFIX is for package builders so that they can configure |
---|
18 | # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/. |
---|
19 | # Normally it is left empty. |
---|
20 | INSTALL_PREFIX= |
---|
21 | INSTALLTOP=/usr/local/ssl |
---|
22 | |
---|
23 | # Do not edit this manually. Use Configure --openssldir=DIR do change this! |
---|
24 | OPENSSLDIR=/usr/local/ssl |
---|
25 | |
---|
26 | # RSAref - Define if we are to link with RSAref. |
---|
27 | # NO_IDEA - Define to build without the IDEA algorithm |
---|
28 | # NO_RC4 - Define to build without the RC4 algorithm |
---|
29 | # NO_RC2 - Define to build without the RC2 algorithm |
---|
30 | # THREADS - Define when building with threads, you will probably also need any |
---|
31 | # system defines as well, i.e. _REENTERANT for Solaris 2.[34] |
---|
32 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. |
---|
33 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. |
---|
34 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). |
---|
35 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports |
---|
36 | # one. 32 bytes will be read from this when the random |
---|
37 | # number generator is initalised. |
---|
38 | # SSL_FORBID_ENULL - define if you want the server to be not able to use the |
---|
39 | # NULL encryption ciphers. |
---|
40 | # |
---|
41 | # LOCK_DEBUG - turns on lots of lock debug output :-) |
---|
42 | # REF_CHECK - turn on some xyz_free() assertions. |
---|
43 | # REF_PRINT - prints some stuff on structure free. |
---|
44 | # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff |
---|
45 | # MFUNC - Make all Malloc/Free/Realloc calls call |
---|
46 | # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to |
---|
47 | # call application defined callbacks via CRYPTO_set_mem_functions() |
---|
48 | # MD5_ASM needs to be defined to use the x86 assembler for MD5 |
---|
49 | # SHA1_ASM needs to be defined to use the x86 assembler for SHA1 |
---|
50 | # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 |
---|
51 | # Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must |
---|
52 | # equal 4. |
---|
53 | # PKCS1_CHECK - pkcs1 tests. |
---|
54 | |
---|
55 | CC= gcc |
---|
56 | #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM |
---|
57 | CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM |
---|
58 | DEPFLAG= |
---|
59 | PEX_LIBS= -L. -L.. -L../.. -L../../.. |
---|
60 | EX_LIBS= |
---|
61 | AR=ar r |
---|
62 | RANLIB= ranlib |
---|
63 | PERL= perl |
---|
64 | TAR= tar |
---|
65 | TARFLAGS= --no-recursion |
---|
66 | |
---|
67 | # Set BN_ASM to bn_asm.o if you want to use the C version |
---|
68 | BN_ASM= bn_asm.o |
---|
69 | #BN_ASM= bn_asm.o |
---|
70 | #BN_ASM= asm/bn86-elf.o # elf, linux-elf |
---|
71 | #BN_ASM= asm/bn86-sol.o # solaris |
---|
72 | #BN_ASM= asm/bn86-out.o # a.out, FreeBSD |
---|
73 | #BN_ASM= asm/bn86bsdi.o # bsdi |
---|
74 | #BN_ASM= asm/alpha.o # DEC Alpha |
---|
75 | #BN_ASM= asm/pa-risc2.o # HP-UX PA-RISC |
---|
76 | #BN_ASM= asm/r3000.o # SGI MIPS cpu |
---|
77 | #BN_ASM= asm/sparc.o # Sun solaris/SunOS |
---|
78 | #BN_ASM= asm/bn-win32.o # Windows 95/NT |
---|
79 | #BN_ASM= asm/x86w16.o # 16 bit code for Windows 3.1/DOS |
---|
80 | #BN_ASM= asm/x86w32.o # 32 bit code for Windows 3.1 |
---|
81 | |
---|
82 | # For x86 assembler: Set PROCESSOR to 386 if you want to support |
---|
83 | # the 80386. |
---|
84 | PROCESSOR= |
---|
85 | |
---|
86 | # Set DES_ENC to des_enc.o if you want to use the C version |
---|
87 | #There are 4 x86 assember options. |
---|
88 | DES_ENC= asm/dx86-out.o asm/yx86-out.o |
---|
89 | #DES_ENC= des_enc.o fcrypt_b.o # C |
---|
90 | #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf |
---|
91 | #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris |
---|
92 | #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD |
---|
93 | #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi |
---|
94 | |
---|
95 | # Set BF_ENC to bf_enc.o if you want to use the C version |
---|
96 | #There are 4 x86 assember options. |
---|
97 | BF_ENC= asm/bx86-out.o |
---|
98 | #BF_ENC= bf_enc.o |
---|
99 | #BF_ENC= asm/bx86-elf.o # elf |
---|
100 | #BF_ENC= asm/bx86-sol.o # solaris |
---|
101 | #BF_ENC= asm/bx86-out.o # a.out, FreeBSD |
---|
102 | #BF_ENC= asm/bx86bsdi.o # bsdi |
---|
103 | |
---|
104 | # Set CAST_ENC to c_enc.o if you want to use the C version |
---|
105 | #There are 4 x86 assember options. |
---|
106 | CAST_ENC= asm/cx86-out.o |
---|
107 | #CAST_ENC= c_enc.o |
---|
108 | #CAST_ENC= asm/cx86-elf.o # elf |
---|
109 | #CAST_ENC= asm/cx86-sol.o # solaris |
---|
110 | #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD |
---|
111 | #CAST_ENC= asm/cx86bsdi.o # bsdi |
---|
112 | |
---|
113 | # Set RC4_ENC to rc4_enc.o if you want to use the C version |
---|
114 | #There are 4 x86 assember options. |
---|
115 | RC4_ENC= asm/rx86-out.o |
---|
116 | #RC4_ENC= rc4_enc.o |
---|
117 | #RC4_ENC= asm/rx86-elf.o # elf |
---|
118 | #RC4_ENC= asm/rx86-sol.o # solaris |
---|
119 | #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD |
---|
120 | #RC4_ENC= asm/rx86bsdi.o # bsdi |
---|
121 | |
---|
122 | # Set RC5_ENC to rc5_enc.o if you want to use the C version |
---|
123 | #There are 4 x86 assember options. |
---|
124 | RC5_ENC= asm/r586-out.o |
---|
125 | #RC5_ENC= rc5_enc.o |
---|
126 | #RC5_ENC= asm/r586-elf.o # elf |
---|
127 | #RC5_ENC= asm/r586-sol.o # solaris |
---|
128 | #RC5_ENC= asm/r586-out.o # a.out, FreeBSD |
---|
129 | #RC5_ENC= asm/r586bsdi.o # bsdi |
---|
130 | |
---|
131 | # Also need MD5_ASM defined |
---|
132 | MD5_ASM_OBJ= asm/mx86-out.o |
---|
133 | #MD5_ASM_OBJ= asm/mx86-elf.o # elf |
---|
134 | #MD5_ASM_OBJ= asm/mx86-sol.o # solaris |
---|
135 | #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD |
---|
136 | #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi |
---|
137 | |
---|
138 | # Also need SHA1_ASM defined |
---|
139 | SHA1_ASM_OBJ= asm/sx86-out.o |
---|
140 | #SHA1_ASM_OBJ= asm/sx86-elf.o # elf |
---|
141 | #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris |
---|
142 | #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD |
---|
143 | #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi |
---|
144 | |
---|
145 | # Also need RMD160_ASM defined |
---|
146 | RMD160_ASM_OBJ= asm/rm86-out.o |
---|
147 | #RMD160_ASM_OBJ= asm/rm86-elf.o # elf |
---|
148 | #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris |
---|
149 | #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD |
---|
150 | #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi |
---|
151 | |
---|
152 | # To do special treatment, use "directory names" starting with a period. |
---|
153 | # When we're prepared to use shared libraries in the programs we link here |
---|
154 | # we might have SHLIB_MARK1 get the value ".shlib." and SHLIB_MARK2 be empty, |
---|
155 | # or have that configurable. |
---|
156 | SHLIB_MARK1=.shlib-clean. |
---|
157 | SHLIB_MARK2=.shlib. |
---|
158 | |
---|
159 | DIRS= crypto ssl rsaref $(SHLIB_MARK1) apps test tools $(SHLIB_MARK2) |
---|
160 | SHLIBDIRS= crypto ssl |
---|
161 | |
---|
162 | # dirs in crypto to build |
---|
163 | SDIRS= \ |
---|
164 | md2 md4 md5 sha mdc2 hmac ripemd \ |
---|
165 | des rc2 rc4 rc5 idea bf cast \ |
---|
166 | bn rsa dsa dh dso \ |
---|
167 | buffer bio stack lhash rand err objects \ |
---|
168 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
---|
169 | |
---|
170 | MAKEFILE= Makefile.ssl |
---|
171 | MAKE= make -f Makefile.ssl |
---|
172 | |
---|
173 | MANDIR=$(OPENSSLDIR)/man |
---|
174 | MAN1=1 |
---|
175 | MAN3=3 |
---|
176 | SHELL=/bin/sh |
---|
177 | |
---|
178 | TOP= . |
---|
179 | ONEDIRS=out tmp |
---|
180 | EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS |
---|
181 | WDIRS= windows |
---|
182 | LIBS= libcrypto.a libssl.a |
---|
183 | SHARED_LIBS=libcrypto.so libssl.so |
---|
184 | |
---|
185 | GENERAL= Makefile |
---|
186 | BASENAME= openssl |
---|
187 | NAME= $(BASENAME)-$(VERSION) |
---|
188 | TARFILE= $(NAME).tar |
---|
189 | WTARFILE= $(NAME)-win.tar |
---|
190 | EXHEADER= e_os.h e_os2.h |
---|
191 | HEADER= e_os.h |
---|
192 | |
---|
193 | all: Makefile.ssl |
---|
194 | @need_shlib=true; \ |
---|
195 | for i in $(DIRS) ;\ |
---|
196 | do \ |
---|
197 | if [ "$$i" = ".shlib-clean." ]; then \ |
---|
198 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
199 | $(MAKE) clean-shared; \ |
---|
200 | fi; \ |
---|
201 | elif [ "$$i" = ".shlib." ]; then \ |
---|
202 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
203 | $(MAKE) $(SHARED_LIBS); \ |
---|
204 | fi; \ |
---|
205 | need_shlib=false; \ |
---|
206 | else \ |
---|
207 | (cd $$i && echo "making all in $$i..." && \ |
---|
208 | $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' 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}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ |
---|
209 | fi; \ |
---|
210 | done; \ |
---|
211 | if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ |
---|
212 | $(MAKE) $(SHARED_LIBS); \ |
---|
213 | fi |
---|
214 | |
---|
215 | sub_all: |
---|
216 | @need_shlib=true; \ |
---|
217 | for i in $(DIRS) ;\ |
---|
218 | do \ |
---|
219 | if [ "$$i" = ".shlib-clean." ]; then \ |
---|
220 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
221 | $(MAKE) clean-shared; \ |
---|
222 | fi; \ |
---|
223 | elif [ "$$i" = ".shlib." ]; then \ |
---|
224 | if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
225 | $(MAKE) $(SHARED_LIBS); \ |
---|
226 | fi; \ |
---|
227 | need_shlib=false; \ |
---|
228 | else \ |
---|
229 | (cd $$i && echo "making all in $$i..." && \ |
---|
230 | $(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}' all ) || exit 1; \ |
---|
231 | fi; \ |
---|
232 | done; \ |
---|
233 | if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \ |
---|
234 | $(MAKE) $(SHARED_LIBS); \ |
---|
235 | fi |
---|
236 | |
---|
237 | libcrypto.so: libcrypto.a |
---|
238 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
239 | $(MAKE) SHLIBDIRS=crypto $(SHLIB_TARGET); \ |
---|
240 | else \ |
---|
241 | echo "There's no support for shared libraries on this platform" >&2; \ |
---|
242 | fi |
---|
243 | libssl.so: libcrypto.so libssl.a |
---|
244 | @if [ "$(SHLIB_TARGET)" != "" ]; then \ |
---|
245 | $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-L. -lcrypto' $(SHLIB_TARGET); \ |
---|
246 | else \ |
---|
247 | echo "There's no support for shared libraries on this platform" >&2; \ |
---|
248 | fi |
---|
249 | |
---|
250 | clean-shared: |
---|
251 | for i in ${SHLIBDIRS}; do \ |
---|
252 | rm -f lib$$i.so \ |
---|
253 | lib$$i.so.${SHLIB_MAJOR} \ |
---|
254 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ |
---|
255 | done |
---|
256 | |
---|
257 | linux-shared: |
---|
258 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ |
---|
259 | rm -f lib$$i.so \ |
---|
260 | lib$$i.so.${SHLIB_MAJOR} \ |
---|
261 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ |
---|
262 | ( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
---|
263 | -Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \ |
---|
264 | -Wl,--whole-archive lib$$i.a \ |
---|
265 | -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \ |
---|
266 | libs="$$libs -L. -l$$i"; \ |
---|
267 | ( set -x; \ |
---|
268 | ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
---|
269 | lib$$i.so.${SHLIB_MAJOR}; \ |
---|
270 | ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \ |
---|
271 | done |
---|
272 | |
---|
273 | # This assumes that GNU utilities are *not* used |
---|
274 | true64-shared: |
---|
275 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ |
---|
276 | ( set -x; ${CC} -shared -no_archive -o lib$$i.so \ |
---|
277 | -set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \ |
---|
278 | -all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \ |
---|
279 | libs="$$libs -L. -l$$i"; \ |
---|
280 | done |
---|
281 | |
---|
282 | # This assumes that GNU utilities are *not* used |
---|
283 | solaris-shared: |
---|
284 | libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ |
---|
285 | rm -f lib$$i.so \ |
---|
286 | lib$$i.so.${SHLIB_MAJOR} \ |
---|
287 | lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \ |
---|
288 | ( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
---|
289 | -h lib$$i.so.${SHLIB_MAJOR} \ |
---|
290 | -z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \ |
---|
291 | libs="$$libs -L. -l$$i"; \ |
---|
292 | ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
---|
293 | lib$$i.so.${SHLIB_MAJOR}; \ |
---|
294 | ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \ |
---|
295 | done |
---|
296 | |
---|
297 | Makefile.ssl: Makefile.org |
---|
298 | @echo "Makefile.ssl is older than Makefile.org." |
---|
299 | @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." |
---|
300 | @false |
---|
301 | |
---|
302 | libclean: |
---|
303 | rm -f *.a */lib */*/lib |
---|
304 | |
---|
305 | clean: |
---|
306 | rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c |
---|
307 | @for i in $(DIRS) ;\ |
---|
308 | do \ |
---|
309 | if echo "$$i" | grep -v '^\.'; then \ |
---|
310 | (cd $$i && echo "making clean in $$i..." && \ |
---|
311 | $(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \ |
---|
312 | rm -f $(LIBS); \ |
---|
313 | fi; \ |
---|
314 | done; |
---|
315 | rm -f *.a *.o speed.* *.map *.so .pure core |
---|
316 | rm -f $(TARFILE) |
---|
317 | @for i in $(ONEDIRS) ;\ |
---|
318 | do \ |
---|
319 | rm -fr $$i/*; \ |
---|
320 | done |
---|
321 | |
---|
322 | makefile.one: files |
---|
323 | $(PERL) util/mk1mf.pl >makefile.one; \ |
---|
324 | sh util/do_ms.sh |
---|
325 | |
---|
326 | files: |
---|
327 | $(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO |
---|
328 | @for i in $(DIRS) ;\ |
---|
329 | do \ |
---|
330 | if echo "$$i" | grep -v '^\.'; then \ |
---|
331 | (cd $$i && echo "making 'files' in $$i..." && \ |
---|
332 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \ |
---|
333 | fi; \ |
---|
334 | done; |
---|
335 | |
---|
336 | links: |
---|
337 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
---|
338 | @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl |
---|
339 | @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER) |
---|
340 | @for i in $(DIRS); do \ |
---|
341 | if echo "$$i" | grep -v '^\.'; then \ |
---|
342 | (cd $$i && echo "making links in $$i..." && \ |
---|
343 | $(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; \ |
---|
344 | fi; \ |
---|
345 | done; |
---|
346 | |
---|
347 | dclean: |
---|
348 | rm -f *.bak |
---|
349 | @for i in $(DIRS) ;\ |
---|
350 | do \ |
---|
351 | if echo "$$i" | grep -v '^\.'; then \ |
---|
352 | (cd $$i && echo "making dclean in $$i..." && \ |
---|
353 | $(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \ |
---|
354 | fi; \ |
---|
355 | done; |
---|
356 | |
---|
357 | rehash: rehash.time |
---|
358 | rehash.time: certs |
---|
359 | @(OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs) |
---|
360 | touch rehash.time |
---|
361 | |
---|
362 | test: tests |
---|
363 | |
---|
364 | tests: rehash |
---|
365 | @(cd test && echo "testing..." && \ |
---|
366 | $(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}' tests ); |
---|
367 | @apps/openssl version -a |
---|
368 | |
---|
369 | report: |
---|
370 | @$(PERL) util/selftest.pl |
---|
371 | |
---|
372 | depend: |
---|
373 | @for i in $(DIRS) ;\ |
---|
374 | do \ |
---|
375 | if echo "$$i" | grep -v '^\.'; then \ |
---|
376 | (cd $$i && echo "making dependencies $$i..." && \ |
---|
377 | $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \ |
---|
378 | fi; \ |
---|
379 | done; |
---|
380 | |
---|
381 | lint: |
---|
382 | @for i in $(DIRS) ;\ |
---|
383 | do \ |
---|
384 | if echo "$$i" | grep -v '^\.'; then \ |
---|
385 | (cd $$i && echo "making lint $$i..." && \ |
---|
386 | $(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \ |
---|
387 | fi; \ |
---|
388 | done; |
---|
389 | |
---|
390 | tags: |
---|
391 | @for i in $(DIRS) ;\ |
---|
392 | do \ |
---|
393 | if echo "$$i" | grep -v '^\.'; then \ |
---|
394 | (cd $$i && echo "making tags $$i..." && \ |
---|
395 | $(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \ |
---|
396 | fi; \ |
---|
397 | done; |
---|
398 | |
---|
399 | errors: |
---|
400 | perl util/mkerr.pl -recurse -write |
---|
401 | |
---|
402 | stacks: |
---|
403 | perl util/mkstack.pl -write |
---|
404 | |
---|
405 | util/libeay.num:: |
---|
406 | perl util/mkdef.pl crypto update |
---|
407 | |
---|
408 | util/ssleay.num:: |
---|
409 | perl util/mkdef.pl ssl update |
---|
410 | |
---|
411 | crypto/objects/obj_dat.h: crypto/objects/obj_mac.h crypto/objects/obj_dat.pl |
---|
412 | perl crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h |
---|
413 | crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt |
---|
414 | perl crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h |
---|
415 | |
---|
416 | TABLE: Configure |
---|
417 | (echo 'Output of `Configure TABLE'"':"; \ |
---|
418 | perl Configure TABLE) > TABLE |
---|
419 | |
---|
420 | update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE |
---|
421 | |
---|
422 | tar: |
---|
423 | @$(TAR) $(TARFLAGS) -cvf - \ |
---|
424 | `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\ |
---|
425 | tardy --user_number=0 --user_name=openssl \ |
---|
426 | --group_number=0 --group_name=openssl \ |
---|
427 | --prefix=openssl-$(VERSION) - |\ |
---|
428 | gzip --best >../$(TARFILE).gz; \ |
---|
429 | ls -l ../$(TARFILE).gz |
---|
430 | |
---|
431 | dist: |
---|
432 | $(PERL) Configure dist |
---|
433 | @$(MAKE) dist_pem_h |
---|
434 | @$(MAKE) SDIRS='${SDIRS}' clean |
---|
435 | @$(MAKE) tar |
---|
436 | |
---|
437 | dist_pem_h: |
---|
438 | (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) |
---|
439 | |
---|
440 | install: all install_docs |
---|
441 | @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ |
---|
442 | $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ |
---|
443 | $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ |
---|
444 | $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ |
---|
445 | $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ |
---|
446 | $(INSTALL_PREFIX)$(OPENSSLDIR)/private \ |
---|
447 | $(INSTALL_PREFIX)$(OPENSSLDIR)/lib |
---|
448 | @for i in $(EXHEADER) ;\ |
---|
449 | do \ |
---|
450 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
---|
451 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
---|
452 | done; |
---|
453 | @for i in $(DIRS) ;\ |
---|
454 | do \ |
---|
455 | if echo "$$i" | grep -v '^\.'; then \ |
---|
456 | (cd $$i; echo "installing $$i..."; \ |
---|
457 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \ |
---|
458 | fi; \ |
---|
459 | done |
---|
460 | @for i in $(LIBS) ;\ |
---|
461 | do \ |
---|
462 | if [ -f "$$i" ]; then \ |
---|
463 | ( echo installing $$i; \ |
---|
464 | cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ |
---|
465 | $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \ |
---|
466 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \ |
---|
467 | fi \ |
---|
468 | done |
---|
469 | |
---|
470 | install_docs: |
---|
471 | @$(PERL) $(TOP)/util/mkdir-p.pl \ |
---|
472 | $(INSTALL_PREFIX)$(MANDIR)/man1 \ |
---|
473 | $(INSTALL_PREFIX)$(MANDIR)/man3 \ |
---|
474 | $(INSTALL_PREFIX)$(MANDIR)/man5 \ |
---|
475 | $(INSTALL_PREFIX)$(MANDIR)/man7 |
---|
476 | @echo installing man 1 and man 5 |
---|
477 | @for i in doc/apps/*.pod; do \ |
---|
478 | fn=`basename $$i .pod`; \ |
---|
479 | sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; \ |
---|
480 | (cd `dirname $$i`; \ |
---|
481 | $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \ |
---|
482 | --release=$(VERSION) `basename $$i`) \ |
---|
483 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \ |
---|
484 | done |
---|
485 | @echo installing man 3 and man 7 |
---|
486 | @for i in doc/crypto/*.pod doc/ssl/*.pod; do \ |
---|
487 | fn=`basename $$i .pod`; \ |
---|
488 | sec=`[ "$$fn" = "des_modes" ] && echo 7 || echo 3`; \ |
---|
489 | (cd `dirname $$i`; \ |
---|
490 | $(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \ |
---|
491 | --release=$(VERSION) `basename $$i`) \ |
---|
492 | > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \ |
---|
493 | done |
---|
494 | |
---|
495 | shlib: all |
---|
496 | if [ ! -d shlib_dir ] ; then mkdir shlib_dir ; else rm -f shlib_dir/* ; fi |
---|
497 | cd shlib_dir ; ar -x ../libcrypto.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libcrypto.so.0.9 \ |
---|
498 | -o ./libcrypto.so.0.9.4 && rm *.o |
---|
499 | cd shlib_dir ; ar -x ../libssl.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libssl.so.0.9 \ |
---|
500 | -o ./libssl.so.0.9.4 && rm *.o |
---|
501 | |
---|
502 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
---|