Update test suite so that 'make test' succeeds in 'no-rsa' configuration.
[openssl.git] / crypto / Makefile.ssl
1 #
2 # SSLeay/crypto/Makefile
3 #
4
5 DIR=            crypto
6 TOP=            ..
7 CC=             cc
8 INCLUDE=        -I. -I../include
9 INCLUDES=       -I.. -I../../include
10 CFLAG=          -g
11 INSTALL_PREFIX=
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
17 RM=             rm -f
18 AR=             ar r
19
20 PEX_LIBS=
21 EX_LIBS=
22  
23 CFLAGS= $(INCLUDE) $(CFLAG)
24
25
26 LIBS=
27
28 SDIRS=  md2 md5 sha mdc2 hmac ripemd \
29         des rc2 rc4 rc5 idea bf cast \
30         bn rsa dsa dh \
31         buffer bio stack lhash rand err objects \
32         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
33
34 GENERAL=Makefile README crypto-lib.com install.com
35
36 LIB= $(TOP)/libcrypto.a
37 LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c
38 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o
39
40 SRC= $(LIBSRC)
41
42 EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h
43 HEADER= cryptlib.h buildinf.h $(EXHEADER)
44
45 ALL=    $(GENERAL) $(SRC) $(HEADER)
46
47 top:
48         @(cd ..; $(MAKE) DIRS=$(DIR) all)
49
50 all: buildinf.h lib subdirs
51
52 buildinf.h: ../Makefile.ssl
53         ( echo "#ifndef MK1MF_BUILD"; \
54         echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
55         echo "  #define CFLAGS \"$(CC) $(CFLAG)\""; \
56         echo "  #define PLATFORM \"$(PLATFORM)\""; \
57         echo "  #define DATE \"`date`\""; \
58         echo "#endif" ) >buildinf.h
59
60 testapps:
61         if echo ${SDIRS} | fgrep ' des '; \
62         then cd des && $(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}' des; fi
63         cd pkcs7 && $(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}' testapps
64
65 subdirs:
66         @for i in $(SDIRS) ;\
67         do \
68         (cd $$i && echo "making all in crypto/$$i..." && \
69         $(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; \
70         done;
71
72 files:
73         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
74         @for i in $(SDIRS) ;\
75         do \
76         (cd $$i; echo "making 'files' in crypto/$$i..."; \
77         $(MAKE) PERL='${PERL}' files ); \
78         done;
79
80 links:
81         @$(TOP)/util/point.sh Makefile.ssl Makefile
82         @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
83         @$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
84         @$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
85         @$(TOP)/util/point.sh Makefile.ssl Makefile
86         @for i in $(SDIRS); do \
87         (cd $$i; echo "making links in crypto/$$i..."; \
88         $(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 ); \
89         done;
90
91 lib:    $(LIBOBJ)
92         $(AR) $(LIB) $(LIBOBJ)
93         $(RANLIB) $(LIB)
94         @touch lib
95
96 libs:
97         @for i in $(SDIRS) ;\
98         do \
99         (cd $$i; echo "making libs in crypto/$$i..."; \
100         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \
101         done;
102
103 tests:
104         @for i in $(SDIRS) ;\
105         do \
106         (cd $$i; echo "making tests in crypto/$$i..."; \
107         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \
108         done;
109
110 install:
111         @for i in $(EXHEADER) ;\
112         do \
113         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
114         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
115         done;
116         @for i in $(SDIRS) ;\
117         do \
118         (cd $$i; echo "making install in crypto/$$i..."; \
119         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}'  INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \
120         done;
121
122 lint:
123         @for i in $(SDIRS) ;\
124         do \
125         (cd $$i; echo "making lint in crypto/$$i..."; \
126         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \
127         done;
128
129 depend:
130         if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
131         $(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
132         if [ ! -s buildinf.h ]; then rm buildinf.h; fi
133         @for i in $(SDIRS) ;\
134         do \
135         (cd $$i; echo "making depend in crypto/$$i..."; \
136         $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
137         done;
138
139 clean:
140         rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
141         @for i in $(SDIRS) ;\
142         do \
143         (cd $$i; echo "making clean in crypto/$$i..."; \
144         $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \
145         done;
146
147 dclean:
148         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
149         mv -f Makefile.new $(MAKEFILE)
150         @for i in $(SDIRS) ;\
151         do \
152         (cd $$i; echo "making dclean in crypto/$$i..."; \
153         $(MAKE) PERL='${PERL}' CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \
154         done;
155
156 # DO NOT DELETE THIS LINE -- make depend depends on it.
157
158 cpt_err.o: ../include/openssl/crypto.h ../include/openssl/err.h
159 cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
160 cpt_err.o: ../include/openssl/stack.h
161 cryptlib.o: ../include/openssl/bio.h ../include/openssl/buffer.h
162 cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
163 cryptlib.o: ../include/openssl/e_os2.h ../include/openssl/err.h
164 cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
165 cryptlib.o: ../include/openssl/safestack.h ../include/openssl/stack.h
166 cryptlib.o: cryptlib.h
167 cversion.o: ../include/openssl/bio.h ../include/openssl/buffer.h
168 cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
169 cversion.o: ../include/openssl/e_os2.h ../include/openssl/err.h
170 cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
171 cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h
172 cversion.o: buildinf.h cryptlib.h
173 ex_data.o: ../include/openssl/bio.h ../include/openssl/buffer.h
174 ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
175 ex_data.o: ../include/openssl/e_os2.h ../include/openssl/err.h
176 ex_data.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
177 ex_data.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
178 ex_data.o: ../include/openssl/stack.h cryptlib.h
179 mem.o: ../include/openssl/bio.h ../include/openssl/buffer.h
180 mem.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
181 mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
182 mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
183 mem.o: ../include/openssl/safestack.h ../include/openssl/stack.h cryptlib.h
184 mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h
185 mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
186 mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h
187 mem_dbg.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
188 mem_dbg.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
189 mem_dbg.o: ../include/openssl/stack.h cryptlib.h
190 tmdiff.o: ../include/openssl/bio.h ../include/openssl/buffer.h
191 tmdiff.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
192 tmdiff.o: ../include/openssl/e_os2.h ../include/openssl/err.h
193 tmdiff.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
194 tmdiff.o: ../include/openssl/safestack.h ../include/openssl/stack.h
195 tmdiff.o: ../include/openssl/tmdiff.h cryptlib.h