]>
Commit | Line | Data |
---|---|---|
d02b48c6 RE |
1 | # |
2 | # SSLeay/crypto/Makefile | |
3 | # | |
4 | ||
5 | DIR= crypto | |
6 | TOP= .. | |
7 | CC= cc | |
8 | INCLUDE= -I. -I../include | |
9 | INCLUDES= -I.. -I../../include | |
10 | CFLAG= -g | |
e5f3045f BM |
11 | INSTALL_PREFIX= |
12 | OPENSSLDIR= /usr/local/ssl | |
d02b48c6 RE |
13 | INSTALLTOP= /usr/local/ssl |
14 | MAKE= make -f Makefile.ssl | |
8039257d | 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) |
d02b48c6 | 16 | MAKEFILE= Makefile.ssl |
bb8f3c58 | 17 | RM= rm -f |
d02b48c6 RE |
18 | AR= ar r |
19 | ||
d02b48c6 RE |
20 | PEX_LIBS= |
21 | EX_LIBS= | |
22 | ||
d10f052b | 23 | CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\"" |
d02b48c6 | 24 | |
58964a49 | 25 | |
d02b48c6 RE |
26 | LIBS= |
27 | ||
58964a49 RE |
28 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ |
29 | des rc2 rc4 rc5 idea bf cast \ | |
d02b48c6 RE |
30 | bn rsa dsa dh \ |
31 | buffer bio stack lhash rand err objects \ | |
8d8c7266 | 32 | evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp |
d02b48c6 | 33 | |
7d7d2cbc | 34 | GENERAL=Makefile README crypto-lib.com install.com |
d02b48c6 RE |
35 | |
36 | LIB= $(TOP)/libcrypto.a | |
73934800 DSH |
37 | LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c cpt_err.c |
38 | LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o cpt_err.o | |
d02b48c6 RE |
39 | |
40 | SRC= $(LIBSRC) | |
41 | ||
a75b81ad | 42 | EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h |
61f5b6f3 | 43 | HEADER= cryptlib.h date.h $(EXHEADER) |
d02b48c6 RE |
44 | |
45 | ALL= $(GENERAL) $(SRC) $(HEADER) | |
46 | ||
47 | top: | |
48 | @(cd ..; $(MAKE) DIRS=$(DIR) all) | |
49 | ||
50 | all: date.h lib subdirs | |
51 | ||
651d0aff | 52 | date.h: ../Makefile.ssl |
47c389e7 | 53 | echo "#define DATE \"`date`\"" >date.h |
d02b48c6 RE |
54 | |
55 | subdirs: | |
56 | @for i in $(SDIRS) ;\ | |
57 | do \ | |
bb8f3c58 | 58 | (cd $$i && echo "making all in crypto/$$i..." && \ |
1a01cad3 | 59 | $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ |
d02b48c6 RE |
60 | done; |
61 | ||
62 | files: | |
99aab161 | 63 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO |
d02b48c6 RE |
64 | @for i in $(SDIRS) ;\ |
65 | do \ | |
bb8f3c58 | 66 | (cd $$i; echo "making 'files' in crypto/$$i..."; \ |
5a9bab32 | 67 | $(MAKE) PERL='${PERL}' files ); \ |
d02b48c6 RE |
68 | done; |
69 | ||
70 | links: | |
bb8f3c58 | 71 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
1314c344 BM |
72 | @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) |
73 | @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST) | |
74 | @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS) | |
bb8f3c58 RE |
75 | @$(TOP)/util/point.sh Makefile.ssl Makefile |
76 | @for i in $(SDIRS); do \ | |
77 | (cd $$i; echo "making links in crypto/$$i..."; \ | |
6dc08dd6 | 78 | $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PERL='${PERL}' links ); \ |
d02b48c6 RE |
79 | done; |
80 | ||
81 | lib: $(LIBOBJ) | |
82 | $(AR) $(LIB) $(LIBOBJ) | |
99aab161 | 83 | $(RANLIB) $(LIB) |
d02b48c6 RE |
84 | @touch lib |
85 | ||
86 | libs: | |
87 | @for i in $(SDIRS) ;\ | |
88 | do \ | |
bb8f3c58 | 89 | (cd $$i; echo "making libs in crypto/$$i..."; \ |
e5f3045f | 90 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ |
d02b48c6 RE |
91 | done; |
92 | ||
93 | tests: | |
94 | @for i in $(SDIRS) ;\ | |
95 | do \ | |
bb8f3c58 | 96 | (cd $$i; echo "making tests in crypto/$$i..."; \ |
d02b48c6 RE |
97 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ |
98 | done; | |
99 | ||
100 | install: | |
101 | @for i in $(EXHEADER) ;\ | |
102 | do \ | |
e5f3045f BM |
103 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
104 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | |
d02b48c6 RE |
105 | done; |
106 | @for i in $(SDIRS) ;\ | |
107 | do \ | |
bb8f3c58 | 108 | (cd $$i; echo "making install in crypto/$$i..."; \ |
d02b48c6 RE |
109 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ |
110 | done; | |
111 | ||
112 | lint: | |
113 | @for i in $(SDIRS) ;\ | |
114 | do \ | |
bb8f3c58 | 115 | (cd $$i; echo "making lint in crypto/$$i..."; \ |
d02b48c6 RE |
116 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ |
117 | done; | |
118 | ||
119 | depend: | |
f5d7a031 | 120 | $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC) |
d02b48c6 RE |
121 | @for i in $(SDIRS) ;\ |
122 | do \ | |
bb8f3c58 | 123 | (cd $$i; echo "making depend in crypto/$$i..."; \ |
f5d7a031 | 124 | $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \ |
d02b48c6 RE |
125 | done; |
126 | ||
127 | clean: | |
bb8f3c58 | 128 | rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
d02b48c6 RE |
129 | @for i in $(SDIRS) ;\ |
130 | do \ | |
bb8f3c58 | 131 | (cd $$i; echo "making clean in crypto/$$i..."; \ |
d02b48c6 RE |
132 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ |
133 | done; | |
134 | ||
135 | dclean: | |
99aab161 | 136 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
d02b48c6 RE |
137 | mv -f Makefile.new $(MAKEFILE) |
138 | @for i in $(SDIRS) ;\ | |
139 | do \ | |
bb8f3c58 | 140 | (cd $$i; echo "making dclean in crypto/$$i..."; \ |
d10c5c22 | 141 | $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ |
d02b48c6 RE |
142 | done; |
143 | ||
d02b48c6 | 144 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
6242bb9c | 145 | |
bf57da07 BM |
146 | cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h |
147 | cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h | |
17e3dd1c BM |
148 | cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h |
149 | cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
150 | cryptlib.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | |
151 | cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h | |
152 | cryptlib.o: date.h | |
153 | cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h | |
154 | cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
155 | cversion.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | |
156 | cversion.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h | |
157 | cversion.o: date.h | |
158 | ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h | |
159 | ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
160 | ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
161 | ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
162 | ex_data.o: ../include/openssl/stack.h cryptlib.h | |
163 | mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h | |
164 | mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
165 | mem.o: ../include/openssl/err.h ../include/openssl/lhash.h | |
166 | mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | |
167 | mem.o: ../include/openssl/stack.h cryptlib.h | |
168 | tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h | |
169 | tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | |
170 | tmdiff.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | |
171 | tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/stack.h | |
172 | tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h |