Fool-proofing Makefiles
[openssl.git] / crypto / des / Makefile
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 MAKEDEPPROG=    makedepend
12 MAKEDEPEND=     $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
13 MAKEFILE=       Makefile
14 AR=             ar r
15 RANLIB=         ranlib
16 DES_ENC=        des_enc.o fcrypt_b.o
17 # or use
18 #DES_ENC=       dx86-elf.o yx86-elf.o
19
20 CFLAGS= $(INCLUDES) $(CFLAG)
21 ASFLAGS= $(INCLUDES) $(ASFLAG)
22 AFLAGS= $(ASFLAGS)
23
24 GENERAL=Makefile
25 TEST=destest.c
26 APPS=
27
28 LIB=$(TOP)/libcrypto.a
29 LIBSRC= cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
30         ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
31         fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \
32         qud_cksm.c rand_key.c rpc_enc.c  set_key.c  \
33         des_enc.c fcrypt_b.c \
34         xcbc_enc.c \
35         str2key.c  cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.c des_old2.c \
36         read2pwd.c
37
38 LIBOBJ= set_key.o  ecb_enc.o  cbc_enc.o \
39         ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o  ofb64ede.o \
40         enc_read.o enc_writ.o ofb64enc.o \
41         ofb_enc.o  str2key.o  pcbc_enc.o qud_cksm.o rand_key.o \
42         ${DES_ENC} \
43         fcrypt.o xcbc_enc.o rpc_enc.o  cbc_cksm.o \
44         ede_cbcm_enc.o des_old.o des_old2.o read2pwd.o
45
46 SRC= $(LIBSRC)
47
48 EXHEADER= des.h des_old.h
49 HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER)
50
51 ALL=    $(GENERAL) $(SRC) $(HEADER)
52
53 top:
54         (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
55
56 all:    lib
57
58 lib:    $(LIBOBJ)
59         $(AR) $(LIB) $(LIBOBJ)
60         $(RANLIB) $(LIB) || echo Never mind.
61         @touch lib
62
63 des: des.o cbc3_enc.o lib
64         $(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
65
66 des_enc-sparc.S:        asm/des_enc.m4
67         m4 -B 8192 asm/des_enc.m4 > des_enc-sparc.S
68
69 # ELF
70 dx86-elf.s:     asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
71         (cd asm; $(PERL) des-586.pl elf $(CFLAGS) > ../$@)
72 yx86-elf.s:     asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
73         (cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > ../$@)
74 # COFF
75 dx86-cof.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
76         (cd asm; $(PERL) des-586.pl coff $(CFLAGS) > ../$@)
77 yx86-cof.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
78         (cd asm; $(PERL) crypt586.pl coff $(CFLAGS) > ../$@)
79 # a.out
80 dx86-out.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
81         (cd asm; $(PERL) des-586.pl a.out $(CFLAGS) > ../$@)
82 yx86-out.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
83         (cd asm; $(PERL) crypt586.pl a.out $(CFLAGS) > ../$@)
84
85 files:
86         $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
87
88 links:
89         @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
90         @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
91         @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
92
93 install:
94         @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
95         @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
96         do  \
97         (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
98         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
99         done;
100
101 tags:
102         ctags $(SRC)
103
104 tests:
105
106 lint:
107         lint -DLINT $(INCLUDES) $(SRC)>fluff
108
109 depend:
110         $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
111
112 dclean:
113         $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
114         mv -f Makefile.new $(MAKEFILE)
115
116 clean:
117         rm -f *.s *.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
118
119 # DO NOT DELETE THIS LINE -- make depend depends on it.
120
121 cbc_cksm.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
122 cbc_cksm.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
123 cbc_cksm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
124 cbc_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
125 cbc_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
126 cbc_cksm.o: cbc_cksm.c des_locl.h
127 cbc_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
128 cbc_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
129 cbc_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
130 cbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
131 cbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
132 cbc_enc.o: cbc_enc.c des_locl.h ncbc_enc.c
133 cfb64ede.o: ../../e_os.h ../../include/openssl/des.h
134 cfb64ede.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
135 cfb64ede.o: ../../include/openssl/opensslconf.h
136 cfb64ede.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
137 cfb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
138 cfb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
139 cfb64ede.o: cfb64ede.c des_locl.h
140 cfb64enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
141 cfb64enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
142 cfb64enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
143 cfb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
144 cfb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
145 cfb64enc.o: cfb64enc.c des_locl.h
146 cfb_enc.o: ../../e_os.h ../../include/openssl/des.h
147 cfb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
148 cfb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/ossl_typ.h
149 cfb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
150 cfb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
151 cfb_enc.o: ../../include/openssl/ui_compat.h cfb_enc.c des_locl.h
152 des_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
153 des_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
154 des_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
155 des_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
156 des_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
157 des_enc.o: des_enc.c des_locl.h ncbc_enc.c
158 des_old.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
159 des_old.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
160 des_old.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
161 des_old.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
162 des_old.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
163 des_old.o: ../../include/openssl/ui_compat.h des_old.c
164 des_old2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
165 des_old2.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
166 des_old2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
167 des_old2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
168 des_old2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
169 des_old2.o: ../../include/openssl/ui_compat.h des_old2.c
170 ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
171 ecb3_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
172 ecb3_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
173 ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
174 ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
175 ecb3_enc.o: des_locl.h ecb3_enc.c
176 ecb_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
177 ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
178 ecb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
179 ecb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
180 ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
181 ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
182 ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c
183 ecb_enc.o: spr.h
184 ede_cbcm_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
185 ede_cbcm_enc.o: ../../include/openssl/e_os2.h
186 ede_cbcm_enc.o: ../../include/openssl/opensslconf.h
187 ede_cbcm_enc.o: ../../include/openssl/ossl_typ.h
188 ede_cbcm_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
189 ede_cbcm_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
190 ede_cbcm_enc.o: ../../include/openssl/ui_compat.h des_locl.h ede_cbcm_enc.c
191 enc_read.o: ../../e_os.h ../../include/openssl/bio.h
192 enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
193 enc_read.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
194 enc_read.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
195 enc_read.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
196 enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
197 enc_read.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
198 enc_read.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
199 enc_read.o: ../../include/openssl/ui_compat.h ../cryptlib.h des_locl.h
200 enc_read.o: enc_read.c
201 enc_writ.o: ../../e_os.h ../../include/openssl/bio.h
202 enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
203 enc_writ.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
204 enc_writ.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
205 enc_writ.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
206 enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
207 enc_writ.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
208 enc_writ.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
209 enc_writ.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
210 enc_writ.o: ../cryptlib.h des_locl.h enc_writ.c
211 fcrypt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
212 fcrypt.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
213 fcrypt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
214 fcrypt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
215 fcrypt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
216 fcrypt.o: des_locl.h fcrypt.c
217 fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
218 fcrypt_b.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
219 fcrypt_b.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
220 fcrypt_b.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
221 fcrypt_b.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
222 fcrypt_b.o: des_locl.h fcrypt_b.c
223 ofb64ede.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
224 ofb64ede.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
225 ofb64ede.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
226 ofb64ede.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
227 ofb64ede.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
228 ofb64ede.o: des_locl.h ofb64ede.c
229 ofb64enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
230 ofb64enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
231 ofb64enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
232 ofb64enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
233 ofb64enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
234 ofb64enc.o: des_locl.h ofb64enc.c
235 ofb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
236 ofb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
237 ofb_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
238 ofb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
239 ofb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
240 ofb_enc.o: des_locl.h ofb_enc.c
241 pcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
242 pcbc_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
243 pcbc_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
244 pcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
245 pcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
246 pcbc_enc.o: des_locl.h pcbc_enc.c
247 qud_cksm.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
248 qud_cksm.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
249 qud_cksm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
250 qud_cksm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
251 qud_cksm.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
252 qud_cksm.o: des_locl.h qud_cksm.c
253 rand_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
254 rand_key.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
255 rand_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
256 rand_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
257 rand_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
258 rand_key.o: ../../include/openssl/ui_compat.h rand_key.c
259 read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
260 read2pwd.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
261 read2pwd.o: ../../include/openssl/opensslconf.h
262 read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
263 read2pwd.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
264 read2pwd.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
265 read2pwd.o: ../../include/openssl/ui_compat.h read2pwd.c
266 rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
267 rpc_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
268 rpc_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
269 rpc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
270 rpc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
271 rpc_enc.o: des_locl.h des_ver.h rpc_des.h rpc_enc.c
272 set_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
273 set_key.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
274 set_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
275 set_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
276 set_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
277 set_key.o: des_locl.h set_key.c
278 str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
279 str2key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
280 str2key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
281 str2key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
282 str2key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
283 str2key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
284 str2key.o: des_locl.h str2key.c
285 xcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
286 xcbc_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
287 xcbc_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
288 xcbc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
289 xcbc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
290 xcbc_enc.o: des_locl.h xcbc_enc.c