Complete integration of SPARC assembler DES implementation. Tested on Solaris
[openssl.git] / crypto / des / Makefile.ssl
1 #
2 # SSLeay/crypto/des/Makefile
3 #
4
5 DIR=    des
6 TOP=    ../..
7 CC=     cc
8 CPP=    $(CC) -E
9 INCLUDES=-I$(TOP) -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 AR=             ar r
19 RANLIB=         ranlib
20 DES_ENC=        des_enc.o fcrypt_b.o
21 # or use
22 #DES_ENC=       dx86-elf.o yx86-elf.o
23
24 CFLAGS= $(INCLUDES) $(CFLAG)
25
26 # We let the C compiler driver to take care of .s files. This is done in
27 # order to be excused from maintaining a separate set of architecture
28 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
29 # gcc, then the driver will automatically translate it to -xarch=v8plus
30 # and pass it down to assembler.
31 AS=$(CC) -c
32 ASFLAGS=$(CFLAGS)
33
34 GENERAL=Makefile
35 TEST=destest.c
36 APPS=
37
38 LIB=$(TOP)/libcrypto.a
39 LIBSRC= cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
40         ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
41         fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \
42         qud_cksm.c rand_key.c rpc_enc.c  set_key.c  \
43         des_enc.c fcrypt_b.c \
44         xcbc_enc.c \
45         str2key.c  cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \
46         read2pwd.c
47
48 LIBOBJ= set_key.o  ecb_enc.o  cbc_enc.o \
49         ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o  ofb64ede.o \
50         enc_read.o enc_writ.o ofb64enc.o \
51         ofb_enc.o  str2key.o  pcbc_enc.o qud_cksm.o rand_key.o \
52         ${DES_ENC} \
53         fcrypt.o xcbc_enc.o rpc_enc.o  cbc_cksm.o \
54         ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o
55
56 SRC= $(LIBSRC)
57
58 EXHEADER= des.h des_old.h
59 HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER)
60
61 ALL=    $(GENERAL) $(SRC) $(HEADER)
62
63 top:
64         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
65
66 all:    lib
67
68 lib:    $(LIBOBJ)
69         $(AR) $(LIB) $(LIBOBJ)
70         $(RANLIB) $(LIB) || echo Never mind.
71         @touch lib
72
73 des: des.o cbc3_enc.o lib
74         $(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
75
76 asm/des_enc-sparc.S:    asm/des_enc.m4
77         m4 -B 8192 asm/des_enc.m4 > asm/des_enc-sparc.S
78
79 # elf
80 asm/dx86-elf.o: asm/dx86unix.cpp
81         $(CPP) -DELF    \
82                 `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
83                 -x c asm/dx86unix.cpp | as -o asm/dx86-elf.o
84
85 asm/yx86-elf.o: asm/yx86unix.cpp
86         $(CPP) -DELF    \
87                 `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
88                 -x c asm/yx86unix.cpp | as -o asm/yx86-elf.o
89
90 # solaris
91 asm/dx86-sol.o: asm/dx86unix.cpp
92         $(CC) -E -DSOL  \
93                 `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
94                 asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
95         as -o asm/dx86-sol.o asm/dx86-sol.s
96         rm -f asm/dx86-sol.s
97
98 asm/yx86-sol.o: asm/yx86unix.cpp
99         $(CC) -E -DSOL  \
100                 `(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
101                 asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
102         as -o asm/yx86-sol.o asm/yx86-sol.s
103         rm -f asm/yx86-sol.s
104
105 # a.out
106 asm/dx86-out.o: asm/dx86unix.cpp
107         $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o
108
109 asm/yx86-out.o: asm/yx86unix.cpp
110         $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
111
112 # bsdi
113 asm/dx86bsdi.o: asm/dx86unix.cpp
114         $(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
115
116 asm/yx86bsdi.o: asm/yx86unix.cpp
117         $(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
118
119 asm/dx86unix.cpp: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
120         (cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
121
122 asm/yx86unix.cpp: asm/crypt586.pl ../perlasm/x86asm.pl
123         (cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
124
125 files:
126         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
127
128 links:
129         @$(TOP)/util/point.sh Makefile.ssl Makefile
130         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
131         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
132         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
133
134 install: installs
135
136 installs:
137         @for i in $(EXHEADER) ; \
138         do  \
139         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
140         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
141         done;
142
143 tags:
144         ctags $(SRC)
145
146 tests:
147
148 lint:
149         lint -DLINT $(INCLUDES) $(SRC)>fluff
150
151 depend:
152         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
153
154 dclean:
155         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
156         mv -f Makefile.new $(MAKEFILE)
157
158 clean:
159         rm -f asm/dx86unix.cpp asm/yx86unix.cpp *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
160
161 # DO NOT DELETE THIS LINE -- make depend depends on it.
162
163 cbc_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
164 cbc_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
165 cbc_cksm.o: ../../include/openssl/opensslconf.h
166 cbc_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
167 cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
168 cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
169 cbc_cksm.o: cbc_cksm.c des_locl.h
170 cbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
171 cbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
172 cbc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
173 cbc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
174 cbc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
175 cbc_enc.o: ../../include/openssl/ui_compat.h cbc_enc.c des_locl.h ncbc_enc.c
176 cfb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
177 cfb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
178 cfb64ede.o: ../../include/openssl/opensslconf.h
179 cfb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
180 cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
181 cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
182 cfb64ede.o: cfb64ede.c des_locl.h
183 cfb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
184 cfb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
185 cfb64enc.o: ../../include/openssl/opensslconf.h
186 cfb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
187 cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
188 cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
189 cfb64enc.o: cfb64enc.c des_locl.h
190 cfb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
191 cfb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
192 cfb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
193 cfb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
194 cfb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
195 cfb_enc.o: ../../include/openssl/ui_compat.h cfb_enc.c des_locl.h
196 des_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
197 des_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
198 des_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
199 des_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
200 des_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
201 des_enc.o: ../../include/openssl/ui_compat.h des_enc.c des_locl.h ncbc_enc.c
202 des_old.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
203 des_old.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
204 des_old.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
205 des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
206 des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
207 des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
208 des_old.o: ../../include/openssl/ui_compat.h des_old.c
209 des_old2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
210 des_old2.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
211 des_old2.o: ../../include/openssl/opensslconf.h
212 des_old2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
213 des_old2.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
214 des_old2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
215 des_old2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
216 des_old2.o: des_old2.c
217 ecb3_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
218 ecb3_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
219 ecb3_enc.o: ../../include/openssl/opensslconf.h
220 ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
221 ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
222 ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
223 ecb3_enc.o: des_locl.h ecb3_enc.c
224 ecb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
225 ecb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
226 ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
227 ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
228 ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
229 ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c
230 ecb_enc.o: spr.h
231 ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
232 ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
233 ede_cbcm_enc.o: ../../include/openssl/opensslconf.h
234 ede_cbcm_enc.o: ../../include/openssl/opensslv.h
235 ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
236 ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
237 ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c
238 enc_read.o: ../../e_os.h ../../include/openssl/bio.h
239 enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
240 enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
241 enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
242 enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
243 enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
244 enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
245 enc_read.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
246 enc_read.o: ../cryptlib.h des_locl.h enc_read.c
247 enc_writ.o: ../../e_os.h ../../include/openssl/bio.h
248 enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
249 enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
250 enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
251 enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
252 enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
253 enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
254 enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
255 enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
256 enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c
257 fcrypt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
258 fcrypt.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
259 fcrypt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
260 fcrypt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
261 fcrypt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
262 fcrypt.o: ../../include/openssl/ui_compat.h des_locl.h fcrypt.c
263 fcrypt_b.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
264 fcrypt_b.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
265 fcrypt_b.o: ../../include/openssl/opensslconf.h
266 fcrypt_b.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
267 fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
268 fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
269 fcrypt_b.o: des_locl.h fcrypt_b.c
270 ofb64ede.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
271 ofb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
272 ofb64ede.o: ../../include/openssl/opensslconf.h
273 ofb64ede.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
274 ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
275 ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
276 ofb64ede.o: des_locl.h ofb64ede.c
277 ofb64enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
278 ofb64enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
279 ofb64enc.o: ../../include/openssl/opensslconf.h
280 ofb64enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
281 ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
282 ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
283 ofb64enc.o: des_locl.h ofb64enc.c
284 ofb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
285 ofb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
286 ofb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
287 ofb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
288 ofb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
289 ofb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ofb_enc.c
290 pcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
291 pcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
292 pcbc_enc.o: ../../include/openssl/opensslconf.h
293 pcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
294 pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
295 pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
296 pcbc_enc.o: des_locl.h pcbc_enc.c
297 qud_cksm.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
298 qud_cksm.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
299 qud_cksm.o: ../../include/openssl/opensslconf.h
300 qud_cksm.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
301 qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
302 qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
303 qud_cksm.o: des_locl.h qud_cksm.c
304 rand_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
305 rand_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
306 rand_key.o: ../../include/openssl/opensslconf.h
307 rand_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
308 rand_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
309 rand_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
310 rand_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
311 rand_key.o: rand_key.c
312 read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
313 read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
314 read2pwd.o: ../../include/openssl/opensslconf.h
315 read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
316 read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
317 read2pwd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
318 read2pwd.o: read2pwd.c
319 rpc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
320 rpc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
321 rpc_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
322 rpc_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
323 rpc_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
324 rpc_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h rpc_des.h
325 rpc_enc.o: rpc_enc.c
326 set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
327 set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
328 set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
329 set_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
330 set_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
331 set_key.o: ../../include/openssl/ui_compat.h des_locl.h set_key.c
332 str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
333 str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
334 str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
335 str2key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
336 str2key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
337 str2key.o: ../../include/openssl/ui_compat.h des_locl.h str2key.c
338 xcbc_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
339 xcbc_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
340 xcbc_enc.o: ../../include/openssl/opensslconf.h
341 xcbc_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
342 xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
343 xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
344 xcbc_enc.o: des_locl.h xcbc_enc.c