2 # SSLeay/crypto/Makefile
8 INCLUDE= -I. -I../include
9 INCLUDES= -I.. -I../../include
12 OPENSSLDIR= /usr/local/ssl
13 INSTALLTOP= /usr/local/ssl
14 MAKE= make -f Makefile.ssl
15 MAKEDEPEND= $(TOP)/util/domd $(TOP)
16 MAKEFILE= Makefile.ssl
23 CFLAGS= $(INCLUDE) $(CFLAG)
28 SDIRS= md2 md5 sha mdc2 hmac ripemd \
29 des rc2 rc4 rc5 idea bf cast \
31 buffer bio stack lhash rand err objects \
32 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
34 GENERAL=Makefile README crypto-lib.com install.com
36 LIB= $(TOP)/libcrypto.a
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
42 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h
43 HEADER= cryptlib.h buildinf.h $(EXHEADER)
45 ALL= $(GENERAL) $(SRC) $(HEADER)
48 @(cd ..; $(MAKE) DIRS=$(DIR) all)
50 all: buildinf.h lib subdirs
52 buildinf.h: ../Makefile.ssl
53 ( echo "#ifndef MK1MF_BUILD"; \
54 echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
55 echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
56 echo " #define PLATFORM \"$(PLATFORM)\""; \
57 echo " #define DATE \"`date`\""; \
58 echo "#endif" ) >buildinf.h
62 (cd pkcs7 && make testapps)
67 (cd $$i && echo "making all in crypto/$$i..." && \
68 $(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; \
72 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
75 (cd $$i; echo "making 'files' in crypto/$$i..."; \
76 $(MAKE) PERL='${PERL}' files ); \
80 @$(TOP)/util/point.sh Makefile.ssl Makefile
81 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
82 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
83 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
84 @$(TOP)/util/point.sh Makefile.ssl Makefile
85 @for i in $(SDIRS); do \
86 (cd $$i; echo "making links in crypto/$$i..."; \
87 $(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 ); \
91 $(AR) $(LIB) $(LIBOBJ)
98 (cd $$i; echo "making libs in crypto/$$i..."; \
99 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
103 @for i in $(SDIRS) ;\
105 (cd $$i; echo "making tests in crypto/$$i..."; \
106 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
110 @for i in $(EXHEADER) ;\
112 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
113 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
115 @for i in $(SDIRS) ;\
117 (cd $$i; echo "making install in crypto/$$i..."; \
118 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
122 @for i in $(SDIRS) ;\
124 (cd $$i; echo "making lint in crypto/$$i..."; \
125 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
129 if [ ! -e buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
130 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
131 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
132 @for i in $(SDIRS) ;\
134 (cd $$i; echo "making depend in crypto/$$i..."; \
135 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
139 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
140 @for i in $(SDIRS) ;\
142 (cd $$i; echo "making clean in crypto/$$i..."; \
143 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
147 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
148 mv -f Makefile.new $(MAKEFILE)
149 @for i in $(SDIRS) ;\
151 (cd $$i; echo "making dclean in crypto/$$i..."; \
152 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
155 # DO NOT DELETE THIS LINE -- make depend depends on it.
157 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
158 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
159 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
160 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
161 cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
162 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
163 cryptlib.o: ../include/openssl/stack.h cryptlib.h
164 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
165 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
166 cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
167 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
168 cversion.o: ../include/openssl/stack.h buildinf.h cryptlib.h
169 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
170 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
171 ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h
172 ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
173 ex_data.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
174 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
175 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
176 mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
177 mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
178 mem.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
179 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
180 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
181 tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h
182 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
183 tmdiff.o: ../include/openssl/stack.h ../include/openssl/tmdiff.h cryptlib.h