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)\" "
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 comp
34 GENERAL=Makefile README
36 LIB= $(TOP)/libcrypto.a
37 LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c $(ERRC).c
38 LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o $(ERRC).o
42 EXHEADER= crypto.h cryptall.h tmdiff.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 $$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}' all ) || exit 1; \
63 perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
66 (cd $$i; echo "making 'files' in $$i..."; \
72 $(TOP)/util/point.sh Makefile.ssl Makefile
73 $(TOP)/util/mklink.sh ../include $(HEADER)
74 $(TOP)/util/mklink.sh ../test $(TEST)
75 $(TOP)/util/mklink.sh ../apps $(APPS)
76 $(TOP)/util/point.sh Makefile.ssl Makefile
79 (cd $$i; echo "making links in $$i..."; \
84 $(AR) $(LIB) $(LIBOBJ)
85 sh $(TOP)/util/ranlib.sh $(LIB)
91 (cd $$i; echo "making libs in $$i..."; \
92 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
98 (cd $$i; echo "making tests in $$i..."; \
99 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
103 @for i in $(EXHEADER) ;\
105 (cp $$i $(INSTALLTOP)/include/$$i; \
106 chmod 644 $(INSTALLTOP)/include/$$i ); \
108 @for i in $(SDIRS) ;\
110 (cd $$i; echo "making install in $$i..."; \
111 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
115 @for i in $(SDIRS) ;\
117 (cd $$i; echo "making lint in $$i..."; \
118 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
122 $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC)
123 @for i in $(SDIRS) ;\
125 (cd $$i; echo "making depend in $$i..."; \
126 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' depend ); \
130 /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
131 @for i in $(SDIRS) ;\
133 (cd $$i; echo "making clean in $$i..."; \
134 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
138 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
139 mv -f Makefile.new $(MAKEFILE)
140 @for i in $(SDIRS) ;\
142 (cd $$i; echo "making dclean in $$i..."; \
143 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
146 errors: errgen $(ERRC).c
148 $(ERRC).c: $(ERR).err
149 perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
150 perl err/err_genc.pl -s $(ERR).h $(ERRC).c
153 perl ./err/err_code.pl -conf err/ssleay.ec *.c */*.c ../ssl/*.c ../rsaref/*.c
154 @for i in $(SDIRS) ;\
156 (cd $$i; echo "making errors in $$i..."; \
161 # DO NOT DELETE THIS LINE -- make depend depends on it.
163 cpt_err.o: ../include/err.h ../include/stack.h crypto.h
164 cryptlib.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
165 cryptlib.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h date.h
166 cversion.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
167 cversion.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h date.h
168 ex_data.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
169 ex_data.o: ../include/err.h ../include/lhash.h ../include/stack.h cryptlib.h
171 mem.o: ../include/bio.h ../include/buffer.h ../include/e_os.h ../include/err.h
172 mem.o: ../include/lhash.h ../include/stack.h cryptlib.h crypto.h
173 tmdiff.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
174 tmdiff.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h tmdiff.h