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 "/* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
54 echo "/* (Windows builds: auto-generated by Configure) */"; \
55 echo "#define CFLAGS \"$(CC) $(CFLAG)\""; \
56 echo "#define PLATFORM \"$(PLATFORM)\""; \
57 echo "#define DATE \"`date`\"" ) >buildinf.h
62 (cd $$i && echo "making all in crypto/$$i..." && \
63 $(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; \
67 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
70 (cd $$i; echo "making 'files' in crypto/$$i..."; \
71 $(MAKE) PERL='${PERL}' files ); \
75 @$(TOP)/util/point.sh Makefile.ssl Makefile
76 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
77 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
78 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
79 @$(TOP)/util/point.sh Makefile.ssl Makefile
80 @for i in $(SDIRS); do \
81 (cd $$i; echo "making links in crypto/$$i..."; \
82 $(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 ); \
86 $(AR) $(LIB) $(LIBOBJ)
93 (cd $$i; echo "making libs in crypto/$$i..."; \
94 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
100 (cd $$i; echo "making tests in crypto/$$i..."; \
101 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
105 @for i in $(EXHEADER) ;\
107 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
108 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
110 @for i in $(SDIRS) ;\
112 (cd $$i; echo "making install in crypto/$$i..."; \
113 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
117 @for i in $(SDIRS) ;\
119 (cd $$i; echo "making lint in crypto/$$i..."; \
120 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
124 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
125 @for i in $(SDIRS) ;\
127 (cd $$i; echo "making depend in crypto/$$i..."; \
128 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
132 rm -f buildinf.h date.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
133 @for i in $(SDIRS) ;\
135 (cd $$i; echo "making clean in crypto/$$i..."; \
136 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
140 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
141 mv -f Makefile.new $(MAKEFILE)
142 @for i in $(SDIRS) ;\
144 (cd $$i; echo "making dclean in crypto/$$i..."; \
145 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
148 # DO NOT DELETE THIS LINE -- make depend depends on it.
150 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
151 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
152 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
153 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
154 cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
155 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
156 cryptlib.o: ../include/openssl/stack.h cryptlib.h
157 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
158 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
159 cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
160 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
161 cversion.o: ../include/openssl/stack.h buildinf.h cryptlib.h
162 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
163 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
164 ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h
165 ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
166 ex_data.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
167 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
168 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
169 mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
170 mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
171 mem.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
172 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
173 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
174 tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h
175 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
176 tmdiff.o: ../include/openssl/stack.h ../include/openssl/tmdiff.h cryptlib.h