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) -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\""
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
43 HEADER= cryptlib.h date.h $(EXHEADER)
45 ALL= $(GENERAL) $(SRC) $(HEADER)
48 @(cd ..; $(MAKE) DIRS=$(DIR) all)
50 all: date.h lib subdirs
52 date.h: ../Makefile.ssl
53 echo "#define DATE \"`date`\"" >date.h
58 (cd $$i && echo "making all in crypto/$$i..." && \
59 $(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; \
63 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
66 (cd $$i; echo "making 'files' in crypto/$$i..."; \
67 $(MAKE) PERL='${PERL}' files ); \
71 @$(TOP)/util/point.sh Makefile.ssl Makefile
72 @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
73 @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
74 @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
75 @$(TOP)/util/point.sh Makefile.ssl Makefile
76 @for i in $(SDIRS); do \
77 (cd $$i; echo "making links in crypto/$$i..."; \
78 $(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 ); \
82 $(AR) $(LIB) $(LIBOBJ)
89 (cd $$i; echo "making libs in crypto/$$i..."; \
90 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
96 (cd $$i; echo "making tests in crypto/$$i..."; \
97 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
101 @for i in $(EXHEADER) ;\
103 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
104 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
106 @for i in $(SDIRS) ;\
108 (cd $$i; echo "making install in crypto/$$i..."; \
109 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
113 @for i in $(SDIRS) ;\
115 (cd $$i; echo "making lint in crypto/$$i..."; \
116 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
120 $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
121 @for i in $(SDIRS) ;\
123 (cd $$i; echo "making depend in crypto/$$i..."; \
124 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
128 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
129 @for i in $(SDIRS) ;\
131 (cd $$i; echo "making clean in crypto/$$i..."; \
132 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
136 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
137 mv -f Makefile.new $(MAKEFILE)
138 @for i in $(SDIRS) ;\
140 (cd $$i; echo "making dclean in crypto/$$i..."; \
141 $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
144 # DO NOT DELETE THIS LINE -- make depend depends on it.
146 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
147 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
148 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
149 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
150 cryptlib.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
151 cryptlib.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
153 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
154 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
155 cversion.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
156 cversion.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
158 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
159 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
160 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
161 ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
162 ex_data.o: ../include/openssl/stack.h cryptlib.h
163 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
164 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
165 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
166 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
167 mem.o: ../include/openssl/stack.h cryptlib.h
168 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
169 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
170 tmdiff.o: ../include/openssl/err.h ../include/openssl/opensslconf.h
171 tmdiff.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
172 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h