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 MAKEDEPPROG= makedepend
15 MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
23 CFLAGS= $(INCLUDE) $(CFLAG)
28 SDIRS= md2 md5 sha mdc2 hmac ripemd \
29 des rc2 rc4 rc5 idea bf cast \
30 bn ec rsa dsa dh dso engine aes \
31 buffer bio stack lhash rand err objects \
32 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
34 GENERAL=Makefile README crypto-lib.com install.com
36 LIB= $(TOP)/libcrypto.a
37 SHARED_LIB= libcrypto$(SHLIB_EXT)
38 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
39 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
43 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
45 HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h $(EXHEADER)
47 ALL= $(GENERAL) $(SRC) $(HEADER)
50 @(cd ..; $(MAKE) DIRS=$(DIR) all)
54 buildinf.h: ../Makefile
55 ( echo "#ifndef MK1MF_BUILD"; \
56 echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
57 echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
58 echo ' #define PLATFORM "$(PLATFORM)"'; \
59 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
60 echo '#endif' ) >buildinf.h
63 if echo ${SDIRS} | fgrep ' des '; \
64 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
65 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
70 (cd $$i && echo "making all in crypto/$$i..." && \
71 $(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; \
75 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
78 (cd $$i && echo "making 'files' in crypto/$$i..." && \
79 $(MAKE) PERL='${PERL}' files ); \
83 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
84 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
85 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
86 @for i in $(SDIRS); do \
87 (cd $$i && echo "making links in crypto/$$i..." && \
88 $(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 ); \
92 $(AR) $(LIB) $(LIBOBJ)
93 $(RANLIB) $(LIB) || echo Never mind.
96 shared: buildinf.h lib subdirs
97 if [ -n "$(SHARED_LIBS)" ]; then \
98 (cd ..; $(MAKE) $(SHARED_LIB)); \
102 @for i in $(SDIRS) ;\
104 (cd $$i && echo "making libs in crypto/$$i..." && \
105 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
109 @for i in $(SDIRS) ;\
111 (cd $$i && echo "making tests in crypto/$$i..." && \
112 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
116 @headerlist="$(EXHEADER)"; for i in $$headerlist ;\
118 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
119 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
121 @for i in $(SDIRS) ;\
123 (cd $$i && echo "making install in crypto/$$i..." && \
124 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
128 @for i in $(SDIRS) ;\
130 (cd $$i && echo "making lint in crypto/$$i..." && \
131 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
135 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
136 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
137 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
138 @for i in $(SDIRS) ;\
140 (cd $$i && echo "making depend in crypto/$$i..." && \
141 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' DEPFLAG='${DEPFLAG}' MAKEDEPPROG='${MAKEDEPPROG}' KRB5_INCLUDES='${KRB5_INCLUDES}' PERL='${PERL}' depend ); \
145 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
146 @for i in $(SDIRS) ;\
148 (cd $$i && echo "making clean in crypto/$$i..." && \
149 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
153 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
154 mv -f Makefile.new $(MAKEFILE)
155 @for i in $(SDIRS) ;\
157 (cd $$i && echo "making dclean in crypto/$$i..." && \
158 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
161 # DO NOT DELETE THIS LINE -- make depend depends on it.
163 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
164 cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
165 cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
166 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
167 cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cpt_err.c
168 cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
169 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
170 cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
171 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
172 cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
173 cryptlib.o: ../include/openssl/symhacks.h cryptlib.c cryptlib.h
174 cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
175 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
176 cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
177 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
178 cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
179 cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c
180 ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
181 ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
182 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
183 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
184 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
185 ex_data.o: ../include/openssl/safestack.h ../include/openssl/stack.h
186 ex_data.o: ../include/openssl/symhacks.h cryptlib.h ex_data.c
187 mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
188 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
189 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
190 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
191 mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h
192 mem.o: ../include/openssl/symhacks.h cryptlib.h mem.c
193 mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
194 mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
195 mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
196 mem_clr.o: ../include/openssl/symhacks.h mem_clr.c
197 mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
198 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
199 mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
200 mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
201 mem_dbg.o: ../include/openssl/safestack.h ../include/openssl/stack.h
202 mem_dbg.o: ../include/openssl/symhacks.h cryptlib.h mem_dbg.c
203 o_str.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_str.c
205 o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
207 tmdiff.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
208 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
209 tmdiff.o: ../include/openssl/err.h ../include/openssl/lhash.h
210 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
211 tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
212 tmdiff.o: ../include/openssl/symhacks.h ../include/openssl/tmdiff.h cryptlib.h
214 uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
215 uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
216 uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
217 uid.o: ../include/openssl/symhacks.h uid.c