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