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