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)
25 ASFLAGS= $(INCLUDE) $(ASFLAG)
31 md2 md4 md5 sha mdc2 hmac ripemd \
32 des rc2 rc4 rc5 idea bf cast \
33 bn ec rsa dsa ecdsa ecdh dh dso engine aes \
34 buffer bio stack lhash rand err \
35 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
38 GENERAL=Makefile README crypto-lib.com install.com
40 LIB= $(TOP)/libcrypto.a
41 SHARED_LIB= libcrypto$(SHLIB_EXT)
42 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
43 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 $(CPUID_OBJ)
47 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
49 HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
51 ALL= $(GENERAL) $(SRC) $(HEADER)
54 @(cd ..; $(MAKE) DIRS=$(DIR) all)
58 buildinf.h: ../Makefile.ssl
59 ( echo "#ifndef MK1MF_BUILD"; \
60 echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
61 echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
62 echo ' #define PLATFORM "$(PLATFORM)"'; \
63 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
64 echo '#endif' ) >buildinf.h
66 x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
67 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
68 amd64cpuid.s: amd64cpuid.pl
69 $(PERL) amd64cpuid.pl $@
70 ia64cpuid.s: ia64cpuid.S
71 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
74 if echo ${SDIRS} | fgrep ' des '; \
75 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
76 if echo ${SDIRS} | fgrep ' pkcs7 '; \
77 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
82 (cd $$i && echo "making all in crypto/$$i..." && \
83 $(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; \
87 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
90 (cd $$i && echo "making 'files' in crypto/$$i..." && \
91 $(MAKE) PERL='${PERL}' files ); \
95 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
96 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
97 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
98 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
99 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
100 @for i in $(SDIRS); do \
101 (cd $$i && echo "making links in crypto/$$i..." && \
102 $(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 ); \
106 $(AR) $(LIB) $(LIBOBJ)
107 $(RANLIB) $(LIB) || echo Never mind.
110 shared: buildinf.h lib subdirs
111 if [ -n "$(SHARED_LIBS)" ]; then \
112 (cd ..; $(MAKE) $(SHARED_LIB)); \
116 @for i in $(SDIRS) ;\
118 (cd $$i && echo "making libs in crypto/$$i..." && \
119 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
123 @for i in $(SDIRS) ;\
125 (cd $$i && echo "making tests in crypto/$$i..." && \
126 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
130 @for i in $(EXHEADER) ;\
132 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
133 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
135 @for i in $(SDIRS) ;\
137 (cd $$i && echo "making install in crypto/$$i..." && \
138 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
142 @for i in $(SDIRS) ;\
144 (cd $$i && echo "making lint in crypto/$$i..." && \
145 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
149 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
150 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
151 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
152 @for i in $(SDIRS) ;\
154 (cd $$i && echo "making depend in crypto/$$i..." && \
155 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
159 rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
160 @for i in $(SDIRS) ;\
162 (cd $$i && echo "making clean in crypto/$$i..." && \
163 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
167 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
168 mv -f Makefile.new $(MAKEFILE)
169 @for i in $(SDIRS) ;\
171 (cd $$i && echo "making dclean in crypto/$$i..." && \
172 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
175 # DO NOT DELETE THIS LINE -- make depend depends on it.
177 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
178 cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
179 cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
180 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
181 cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
182 cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
183 cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
184 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
185 cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
186 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
187 cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
188 cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
189 cryptlib.o: cryptlib.h
190 cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
191 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
192 cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
193 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
194 cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
195 cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
196 cversion.o: cryptlib.h cversion.c
197 ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
198 ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
199 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
200 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
201 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
202 ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
203 ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
205 mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
206 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
207 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
208 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
209 mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
210 mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
212 mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
213 mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
214 mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
215 mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
216 mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
217 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
218 mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
219 mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
220 mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
221 mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
223 o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
224 o_dir.o: LPdir_unix.c o_dir.c o_dir.h
225 o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
227 o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
229 tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
230 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
231 tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
232 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
233 tmdiff.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
234 tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
235 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h tmdiff.c
236 uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
237 uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
238 uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
239 uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c