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