2 # SSLeay/crypto/Makefile
8 INCLUDE= -I. -I../include
9 INCLUDES= -I.. -I../../include
11 INSTALLTOP= /usr/local/ssl
12 MAKE= make -f Makefile.ssl
13 MAKEDEPEND= $(TOP)/util/domd $(TOP)
14 MAKEFILE= Makefile.ssl
21 CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS="\"$(CC) $(CFLAG)\"" -DPLATFORM="\"$(PLATFORM)\""
26 SDIRS= md2 md5 sha mdc2 hmac ripemd \
27 des rc2 rc4 rc5 idea bf cast \
29 buffer bio stack lhash rand err objects \
30 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
33 GENERAL=Makefile README
35 LIB= $(TOP)/libcrypto.a
36 LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c $(ERRC).c
37 LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o $(ERRC).o
41 EXHEADER= crypto.h cryptall.h tmdiff.h opensslv.h opensslconf.h
42 HEADER= cryptlib.h date.h $(EXHEADER)
44 ALL= $(GENERAL) $(SRC) $(HEADER)
47 @(cd ..; $(MAKE) DIRS=$(DIR) all)
49 all: date.h lib subdirs
51 date.h: ../Makefile.ssl
52 echo "#define DATE \"`date`\"" >date.h
57 (cd $$i && echo "making all in crypto/$$i..." && \
58 $(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; \
62 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
65 (cd $$i; echo "making 'files' in crypto/$$i..."; \
70 @$(TOP)/util/point.sh Makefile.ssl Makefile
71 @$(TOP)/util/mklink.sh ../include/openssl $(EXHEADER)
72 @$(TOP)/util/mklink.sh ../test $(TEST)
73 @$(TOP)/util/mklink.sh ../apps $(APPS)
74 @$(TOP)/util/point.sh Makefile.ssl Makefile
75 @for i in $(SDIRS); do \
76 (cd $$i; echo "making links in crypto/$$i..."; \
77 $(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}' links ); \
81 $(AR) $(LIB) $(LIBOBJ)
88 (cd $$i; echo "making libs in crypto/$$i..."; \
89 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
95 (cd $$i; echo "making tests in crypto/$$i..."; \
96 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
100 @for i in $(EXHEADER) ;\
102 (cp $$i $(INSTALLTOP)/include/openssl/$$i; \
103 chmod 644 $(INSTALLTOP)/include/openssl/$$i ); \
105 @for i in $(SDIRS) ;\
107 (cd $$i; echo "making install in crypto/$$i..."; \
108 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
112 @for i in $(SDIRS) ;\
114 (cd $$i; echo "making lint in crypto/$$i..."; \
115 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
119 $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC)
120 @for i in $(SDIRS) ;\
122 (cd $$i; echo "making depend in crypto/$$i..."; \
123 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' depend ); \
127 rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
128 @for i in $(SDIRS) ;\
130 (cd $$i; echo "making clean in crypto/$$i..."; \
131 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
135 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
136 mv -f Makefile.new $(MAKEFILE)
137 @for i in $(SDIRS) ;\
139 (cd $$i; echo "making dclean in crypto/$$i..."; \
140 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
143 # DO NOT DELETE THIS LINE -- make depend depends on it.
145 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
146 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/stack.h
147 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
148 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
149 cryptlib.o: ../include/openssl/err.h ../include/openssl/opensslv.h
150 cryptlib.o: ../include/openssl/stack.h cryptlib.h
151 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
152 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
153 cversion.o: ../include/openssl/err.h ../include/openssl/opensslv.h
154 cversion.o: ../include/openssl/stack.h cryptlib.h
155 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
156 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
157 ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
158 ex_data.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
159 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
160 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
161 mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
162 mem.o: ../include/openssl/opensslv.h ../include/openssl/stack.h cryptlib.h
163 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
164 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
165 tmdiff.o: ../include/openssl/err.h ../include/openssl/opensslv.h
166 tmdiff.o: ../include/openssl/stack.h ../include/openssl/tmdiff.h cryptlib.h