2 # SSLeay/crypto/Makefile
8 INCLUDE= -I. -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 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 mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c
38 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o
42 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h symhacks.h
43 HEADER= cryptlib.h buildinf.h md32_common.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
61 if echo ${SDIRS} | fgrep ' des '; \
62 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
63 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
68 (cd $$i && echo "making all in crypto/$$i..." && \
69 $(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; \
73 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
76 (cd $$i; echo "making 'files' in crypto/$$i..."; \
77 $(MAKE) PERL='${PERL}' files ); \
81 @$(TOP)/util/point.sh Makefile.ssl Makefile
82 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
83 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
84 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
85 @$(TOP)/util/point.sh Makefile.ssl Makefile
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 @echo You may get an error following this line. Please ignore.
100 (cd $$i; echo "making libs in crypto/$$i..."; \
101 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
105 @for i in $(SDIRS) ;\
107 (cd $$i; echo "making tests in crypto/$$i..."; \
108 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
112 @for i in $(EXHEADER) ;\
114 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
115 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
117 @for i in $(SDIRS) ;\
119 (cd $$i; echo "making install in crypto/$$i..."; \
120 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
124 @for i in $(SDIRS) ;\
126 (cd $$i; echo "making lint in crypto/$$i..."; \
127 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
131 if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
132 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
133 if [ ! -s buildinf.h ]; then rm buildinf.h; fi
134 @for i in $(SDIRS) ;\
136 (cd $$i; echo "making depend in crypto/$$i..."; \
137 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
141 rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
142 @for i in $(SDIRS) ;\
144 (cd $$i; echo "making clean in crypto/$$i..."; \
145 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
149 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
150 mv -f Makefile.new $(MAKEFILE)
151 @for i in $(SDIRS) ;\
153 (cd $$i; echo "making dclean in crypto/$$i..."; \
154 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
157 # DO NOT DELETE THIS LINE -- make depend depends on it.
159 cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
160 cpt_err.o: ../include/openssl/err.h ../include/openssl/lhash.h
161 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
162 cpt_err.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
163 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
164 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
165 cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
166 cryptlib.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
167 cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
168 cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
169 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
170 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
171 cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
172 cversion.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
173 cversion.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
174 cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
175 cversion.o: cryptlib.h
176 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
177 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
178 ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h
179 ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
180 ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
181 ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
182 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
183 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
184 mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
185 mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
186 mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
187 mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
188 mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h
189 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
190 mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h
191 mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
192 mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
193 mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
194 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
195 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
196 tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h
197 tmdiff.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
198 tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
199 tmdiff.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
200 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h
201 uid.o: ../include/openssl/crypto.h ../include/openssl/opensslv.h
202 uid.o: ../include/openssl/safestack.h ../include/openssl/stack.h
203 uid.o: ../include/openssl/symhacks.h