2 # SSLeay/crypto/Makefile
8 INCLUDE= -I. -I$(TOP) -I../include
9 INCLUDES= -I.. -I../.. -I../../include
12 OPENSSLDIR= /usr/local/ssl
13 INSTALLTOP= /usr/local/ssl
14 MAKE= make -f Makefile.ssl
15 MAKEDEPPROG= makedepend
16 MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
17 MAKEFILE= Makefile.ssl
24 CFLAGS= $(INCLUDE) $(CFLAG)
30 md2 md4 md5 sha mdc2 hmac ripemd \
31 des rc2 rc4 rc5 idea bf cast \
32 bn ec rsa dsa ecdsa ecdh dh dso engine aes \
33 buffer bio stack lhash rand err \
34 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
37 GENERAL=Makefile README crypto-lib.com install.com
39 LIB= $(TOP)/libcrypto.a
40 SHARED_LIB= libcrypto$(SHLIB_EXT)
41 LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c
42 LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o
46 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
48 HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
50 ALL= $(GENERAL) $(SRC) $(HEADER)
53 @(cd ..; $(MAKE) DIRS=$(DIR) all)
57 buildinf.h: ../Makefile.ssl
58 ( echo "#ifndef MK1MF_BUILD"; \
59 echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
60 echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
61 echo ' #define PLATFORM "$(PLATFORM)"'; \
62 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
63 echo '#endif' ) >buildinf.h
66 if echo ${SDIRS} | fgrep ' des '; \
67 then cd des && $(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}' des; fi
68 if echo ${SDIRS} | fgrep ' pkcs7 '; \
69 then cd pkcs7 && $(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}' testapps; fi
74 (cd $$i && echo "making all in crypto/$$i..." && \
75 $(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; \
79 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
82 (cd $$i && echo "making 'files' in crypto/$$i..." && \
83 $(MAKE) PERL='${PERL}' files ); \
87 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
88 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
89 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
90 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
91 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
92 @for i in $(SDIRS); do \
93 (cd $$i && echo "making links in crypto/$$i..." && \
94 $(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 ); \
98 $(AR) $(LIB) $(LIBOBJ)
99 $(RANLIB) $(LIB) || echo Never mind.
102 shared: buildinf.h lib subdirs
103 if [ -n "$(SHARED_LIBS)" ]; then \
104 (cd ..; $(MAKE) $(SHARED_LIB)); \
108 @for i in $(SDIRS) ;\
110 (cd $$i && echo "making libs in crypto/$$i..." && \
111 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
115 @for i in $(SDIRS) ;\
117 (cd $$i && echo "making tests in crypto/$$i..." && \
118 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
122 @for i in $(EXHEADER) ;\
124 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
125 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
127 @for i in $(SDIRS) ;\
129 (cd $$i && echo "making install in crypto/$$i..." && \
130 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
134 @for i in $(SDIRS) ;\
136 (cd $$i && echo "making lint in crypto/$$i..." && \
137 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
141 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
142 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
143 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
144 @for i in $(SDIRS) ;\
146 (cd $$i && echo "making depend in crypto/$$i..." && \
147 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
151 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
152 @for i in $(SDIRS) ;\
154 (cd $$i && echo "making clean in crypto/$$i..." && \
155 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
159 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
160 mv -f Makefile.new $(MAKEFILE)
161 @for i in $(SDIRS) ;\
163 (cd $$i && echo "making dclean in crypto/$$i..." && \
164 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
167 # DO NOT DELETE THIS LINE -- make depend depends on it.
169 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
170 cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
171 cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
172 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
173 cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
174 cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
175 cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
176 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
177 cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
178 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
179 cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
180 cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
181 cryptlib.o: cryptlib.h
182 cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
183 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
184 cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
185 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
186 cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
187 cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
188 cversion.o: cryptlib.h cversion.c
189 ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
190 ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
191 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
192 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
193 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
194 ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
195 ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
197 mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
198 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
199 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
200 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
201 mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
202 mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
204 mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
205 mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
206 mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
207 mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
208 mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
209 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
210 mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
211 mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
212 mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
213 mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
215 o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
216 o_dir.o: LPdir_unix.c o_dir.c o_dir.h
217 o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
219 o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
221 tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
222 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
223 tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
224 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
225 tmdiff.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
226 tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
227 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h tmdiff.c
228 uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
229 uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
230 uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
231 uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c