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 \
33 asn1 conf txt_db pkcs7 comp
35 GENERAL=Makefile README
37 LIB= $(TOP)/libcrypto.a
38 LIBSRC= cryptlib.c mem.c cversion.c ex_data.c tmdiff.c $(ERRC).c
39 LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o $(ERRC).o
43 EXHEADER= crypto.h cryptall.h tmdiff.h
44 HEADER= cryptlib.h date.h $(EXHEADER)
46 ALL= $(GENERAL) $(SRC) $(HEADER)
49 @(cd ..; $(MAKE) DIRS=$(DIR) all)
51 all: date.h lib subdirs
53 date.h: ../Makefile.ssl
54 echo "#define DATE \"`date`\"" >date.h
59 (cd $$i && echo "making all in $$i..." && \
60 $(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; \
64 perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
67 (cd $$i; echo "making 'files' in $$i..."; \
73 $(TOP)/util/point.sh Makefile.ssl Makefile
74 $(TOP)/util/mklink.sh ../include $(HEADER)
75 $(TOP)/util/mklink.sh ../test $(TEST)
76 $(TOP)/util/mklink.sh ../apps $(APPS)
77 $(TOP)/util/point.sh Makefile.ssl Makefile
80 (cd $$i; echo "making links in $$i..."; \
85 $(AR) $(LIB) $(LIBOBJ)
86 sh $(TOP)/util/ranlib.sh $(LIB)
92 (cd $$i; echo "making libs in $$i..."; \
93 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
99 (cd $$i; echo "making tests in $$i..."; \
100 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
104 @for i in $(EXHEADER) ;\
106 (cp $$i $(INSTALLTOP)/include/$$i; \
107 chmod 644 $(INSTALLTOP)/include/$$i ); \
109 @for i in $(SDIRS) ;\
111 (cd $$i; echo "making install in $$i..."; \
112 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
116 @for i in $(SDIRS) ;\
118 (cd $$i; echo "making lint in $$i..."; \
119 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
123 $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC)
124 @for i in $(SDIRS) ;\
126 (cd $$i; echo "making depend in $$i..."; \
127 $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' depend ); \
131 /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
132 @for i in $(SDIRS) ;\
134 (cd $$i; echo "making clean in $$i..."; \
135 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
139 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
140 mv -f Makefile.new $(MAKEFILE)
141 @for i in $(SDIRS) ;\
143 (cd $$i; echo "making dclean in $$i..."; \
144 $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
147 errors: errgen $(ERRC).c
149 $(ERRC).c: $(ERR).err
150 perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h
151 perl err/err_genc.pl -s $(ERR).h $(ERRC).c
154 perl ./err/err_code.pl -conf err/ssleay.ec *.c */*.c ../ssl/*.c ../rsaref/*.c
155 @for i in $(SDIRS) ;\
157 (cd $$i; echo "making errors in $$i..."; \
162 # DO NOT DELETE THIS LINE -- make depend depends on it.
164 cpt_err.o: ../include/err.h ../include/stack.h crypto.h
165 cryptlib.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
166 cryptlib.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h date.h
167 cversion.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
168 cversion.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h date.h
169 ex_data.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
170 ex_data.o: ../include/err.h ../include/lhash.h ../include/stack.h cryptlib.h
172 mem.o: ../include/bio.h ../include/buffer.h ../include/e_os.h ../include/err.h
173 mem.o: ../include/lhash.h ../include/stack.h cryptlib.h crypto.h
174 tmdiff.o: ../include/bio.h ../include/buffer.h ../include/e_os.h
175 tmdiff.o: ../include/err.h ../include/stack.h cryptlib.h crypto.h tmdiff.h