convert-all-makefiles-to-makefile-ins-20010802
[openafs.git] / src / des / Makefile.in
1 #
2 # Copyright 1987 by the Massachusetts Institute of Technology.
3 #
4 # For copying and distribution information,
5 # please see the file <mit-cpyright.h>.
6 #
7 # Makefile for BSD DES library
8 #
9 # First define machine type, compiler, and object file suffix
10 # Could be for VAX or PC-DOS
11 #
12 # Some of these files are cross compiled on the vax for the pc8086,
13 # using the MIT LCS cross-compilation environment
14 # Others are always executed on the vax(host).
15 #
16 # A machine, e.g. Vax, pc8086, IBM experimental workstation, is 
17 # described in terms of defines for its word length
18 # (BITS32 or BITS16), byte ordering (LSBFIRST or MSBFIRST) and 
19 # operating system (BSDUNIX or CROSSMSDOS).
20 #
21 # Make sure these are properly defined for any new machine types.
22 # target machine for run-time code (may cross-compile),
23 # override as needed 
24
25 DESTDIR=@DESTDIR@
26 SRCDIR=@SRCDIR@
27 TOP_SRCDIR=@TOP_SRCDIR@
28 SYS_NAME=@AFS_SYSNAME@
29
30 SHELL = /bin/sh
31 include ../config/Makefile.${SYS_NAME}
32
33 UKERNELDIR=../libuafs/
34 SRC     =.
35 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
36
37 UKSRCS=des.h mit-cpyright.h
38
39 K_INC   = ${SRCDIR}include
40 DBG     =
41 GPROF   =
42 # by default do not try to hide entry points
43 F_CC    = -c ${GPROF} ${DBG} ${XCFLAGS}
44 F_CPP   = -I${K_INC} -I. -I${TOP_SRCDIR}/config 
45 MK_STR  = "     \$${CC} -I\$${SRC} \$${F_CPP} \$${F_CC}" -I${TOP_SRCDIR}/config 
46 LDFLAGS = ${XLDFLAGS}
47
48 # dont use optimizer, since it pessimizes on uvax2,
49 # somehow -pg makes it faster.
50
51 TAGS    = /bin/ctags
52
53 DES_LIB  = libdes.a
54 DEP_LIBS = ${DES_LIB} ${NDES_LIB}
55 LIBS     = ${DEP_LIBS} ${XLIBS}
56 LLIB     = llib-ldes.ln
57
58 SRCHOST = \
59         ${SRC}/make_keyperm.c \
60         ${SRC}/make_ip.c \
61         ${SRC}/make_fp.c \
62         ${SRC}/make_p.c \
63         ${SRC}/make_s.c \
64         ${SRC}/make_s_table.c \
65         ${SRC}/make_p_table.c \
66         ${SRC}/make_odd.c \
67         ${SRC}/misc.c
68
69 OBJHOST = \
70         make_keyperm.o \
71         make_ip.o \
72         make_fp.o \
73         make_e.o \
74         make_p.o \
75         make_s.o \
76         make_s_table.o \
77         make_p_table.o \
78         make_odd.o \
79         misc.o
80
81 SRCTARG = \
82         ${SRC}/key_sched.c \
83         ${SRC}/des.c \
84         ${SRC}/cbc_encrypt.c \
85         ${SRC}/read_pssword.c \
86         ${SRC}/pcbc_encrypt.c \
87         ${SRC}/cksum.c \
88         ${SRC}/quad_cksum.c \
89         ${SRC}/new_rnd_key.c \
90         ${SRC}/key_parity.c \
91         ${SRC}/weak_key.c \
92         ${SRC}/util.c \
93         ${SRC}/strng_to_key.c \
94         ${SRC}/debug_decl.c
95
96 OBJTARG = \
97         key_sched.o \
98         des.o \
99         cbc_encrypt.o \
100         read_pssword.o \
101         pcbc_encrypt.o \
102         cksum.o \
103         quad_cksum.o \
104         key_parity.o \
105         weak_key.o \
106         new_rnd_key.o \
107         util.o \
108         strng_to_key.o \
109         debug_decl.o
110
111 CFILES  = ${SRCHOST} ${SRCTARG}
112 OBJECTS = ${OBJHOST} ${OBJTARG}
113
114 CODE    = ${CFILES} ${SRC}/Makefile
115
116 # Generated files
117 GFILES  = \
118         key_perm.h \
119         p_table.h \
120         s_table.h \
121         odd.h \
122         p.c \
123         s.c \
124         fp.c \
125         ip.c
126
127 # Programs to create generated files
128 GPROGS  = \
129         make_keyperm \
130         make_p_table \
131         make_s_table \
132         make_odd \
133         make_p \
134         make_s \
135         make_fp \
136         make_ip
137
138 XGPROGS = \
139         misc \
140         make_e
141
142 # Library component lists.
143
144 TARGOBJS = \
145         des.o \
146         cbc_encrypt.o \
147         pcbc_encrypt.o \
148         cksum.o \
149         new_rnd_key.o \
150         key_sched.o \
151         debug_decl.o \
152         quad_cksum.o \
153         key_parity.o \
154         weak_key.o \
155         read_pssword.o \
156         strng_to_key.o \
157         misco.o \
158         ${CRYPT_OBJ} \
159         util.o
160
161
162 include ../config/Makefile.version
163
164 # This is required to get compiler flags, but not use CFLAGS.
165 AFS_component_version_number.o: AFS_component_version_number.c
166         $(CC) ${XCFLAGS} -c AFS_component_version_number.c
167
168 noversion: install
169
170 all:    ${GFILES} ${CFILES} ${DEP_LIBS}
171
172 gprogs: ${GPROGS}
173
174 test: 
175         cd test; $(MAKE)
176
177 system: install
178
179 kinstall:
180         @echo No $@ source here.
181
182 ukinstall webinstall: all ${UKSRCS}
183         set ${UKERNELDIR}des; $(MKDIR_IF_NEEDED)
184         ${INSTALL} ${UKSRCS} ${UKERNELDIR}des
185         ${INSTALL} libdes.a ${UKERNELDIR}des/libdes.a
186
187 ${DESTDIR}lib/libdes.a: libdes.a
188         ${INSTALL} $? $@
189
190 install install.noversion: all ukinstall ${DESTDIR}lib/libdes.a
191         ${INSTALL} des.h des_conf.h mit-cpyright.h ${DESTDIR}include
192         ${INSTALL} odd.h ${DESTDIR}include/des_odd.h
193
194 clean:
195         rm -f ${OBJECTS} ${DEP_LIBS} ${PROGS} ${GPROGS} ${GFILES} AFS_component_version_number.c misco.c
196         rm -f *.s *.o *.b core *~ *.com *.ld
197         rm -f tags TAGS ${LLIB}
198
199 tags:   ${CFILES}
200         rm -f tags; ${TAGS} ${CFILES}
201
202 print:  ${CODE}
203         lpr -p ${CODE}
204
205 src:    ${CODE}
206
207 ${CODE}:
208         (cd ${SRC}; co -q $@)
209
210 lint:   ${LLIB}
211
212 ${LLIB}: ${CFILES}
213         lint -I${K_INC} ${CFILES}
214
215 ${DES_LIB}: ${TARGOBJS} ${COMMONOBJS} AFS_component_version_number.o
216         rm -f ${DES_LIB}
217         ar r ${DES_LIB} ${TARGOBJS} ${COMMONOBJS} AFS_component_version_number.o
218         $(RANLIB) ${DES_LIB}
219
220 #       host system stuff
221 make_ip: make_ip.o misc.o
222         ${CC} make_ip.o misc.o ${LDFLAGS} -o make_ip
223 make_fp: make_fp.o misc.o
224         ${CC} make_fp.o misc.o ${LDFLAGS} -o make_fp
225 make_odd: make_odd.o misc.o
226         ${CC} ${LDFLAGS} make_odd.o -o make_odd misc.o
227 make_s_table: make_s_table.o misc.o     
228         ${CC} ${LDFLAGS} make_s_table.o misc.o -o make_s_table
229 make_p_table: make_p_table.o misc.o     
230         ${CC} ${LDFLAGS} make_p_table.o misc.o -o make_p_table
231 make_keyperm:   make_keyperm.o misc.o
232         ${CC} make_keyperm.o misc.o ${LDFLAGS} -o make_keyperm
233 make_e: make_e.o misc.o
234         ${CC} make_e.o misc.o ${LDFLAGS} -o make_e
235 make_p: make_p.o misc.o
236         ${CC} make_p.o misc.o ${LDFLAGS} -o make_p
237 make_s: make_s.o misc.o
238         ${CC} make_s.o misc.o ${LDFLAGS} -o make_s
239
240 odd.h:  make_odd
241         -./make_odd odd.h
242 s_table.h: make_s_table
243         -./make_s_table s_table.h
244 p_table.h: make_p_table
245         -./make_p_table p_table.h
246 key_perm.h: make_keyperm
247         -./make_keyperm key_perm.h
248 ip.c:   make_ip
249         -./make_ip ip.c
250 p.c:    make_p
251         -./make_p p.c
252 s.c:    make_s
253         -./make_s s.c
254 fp.c:   make_fp
255         -./make_fp fp.c
256
257 depend: ${CFILES} AFS_component_version_number.o
258         -${CC} -M ${F_CPP} ${CFILES} | \
259         sed -e ':loop' \
260         -e 't loop' | \
261         awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
262         else { if (length(rec $$2) > 70) { print rec; rec = $$0; } \
263                    else rec = rec " " $$2 } } \
264           END { print rec } ' > makedep
265         for file in ${OBJECTS} ; do \
266         echo "$$file:" >> makedep; \
267         echo ${MK_STR} "\$${SRC}/`basename $$file .o`.c" >> makedep; \
268         done
269         echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
270         echo '$$r makedep' >>eddep
271         echo 'w' >>eddep
272         cp Makefile Makefile.bak
273         ex - Makefile < eddep
274         rm eddep makedep
275         echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
276         echo -n '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
277         echo ' (see make depend above)' >> Makefile
278         make depend2 SRCDIR=${SRCDIR}
279
280 depend2: ${CFILES} ${GFILES}
281         ${CC} -M ${F_CPP} ${CFILES} | \
282         sed -e ':loop' \
283         -e 't loop' | \
284         awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
285         else { if (length(rec $$2) > 70) { print rec; rec = $$0; } \
286                    else rec = rec " " $$2 } } \
287           END { print rec } ' > makedep
288         for file in ${OBJECTS} ; do \
289         echo "$$file:" >> makedep; \
290         echo ${MK_STR} "\$${SRC}/`basename $$file .o`.c" >> makedep; \
291         done
292         echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
293         echo '$$r makedep' >>eddep
294         echo 'w' >>eddep
295         cp Makefile Makefile.bak
296         ex - Makefile < eddep
297         rm eddep makedep
298         echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
299         echo -n '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
300         echo ' (see make depend above)' >> Makefile
301
302 misc.o make_e.o: AFS_component_version_number.c
303 # DO NOT DELETE THIS LINE
304
305 make_keyperm.o: make_keyperm.c 
306 make_keyperm.o: 
307 make_ip.o: make_ip.c 
308 make_ip.o: tables.h
309 make_fp.o: make_fp.c 
310 make_fp.o: tables.h
311 make_p.o: make_p.c
312 make_p.o: conf.h tables.h
313 make_s.o: make_s.c ./s_table.h
314 make_s_table.o: make_s_table.c
315 make_s_table.o: tables.h
316 make_p_table.o: make_p_table.c 
317 make_p_table.o: conf.h
318 make_p_table.o: tables.h
319 make_odd.o: make_odd.c 
320 misc.o: misc.c des_internal.h
321 misc.o: conf.h
322 key_sched.o: key_sched.c
323 key_sched.o: conf.h 
324 key_sched.o: des.h des_internal.h
325 key_sched.o: mit-cpyright.h
326 key_sched.o: des_conf.h ./key_perm.h ./odd.h
327 key_test.o: key_test.c
328 key_test.o: des.h
329 key_test.o: mit-cpyright.h
330 key_test.o: des_conf.h
331 testit.o: testit.c
332 testit.o: des.h
333 testit.o: mit-cpyright.h
334 testit.o: des_conf.h
335 des.o: des.c des_internal.h
336 des.o: des.h
337 des.o: mit-cpyright.h
338 des.o: des_conf.h ./s_table.h ./p_table.h ./ip.c
339 des.o: ./p.c ./fp.c
340 cbc_encrypt.o: cbc_encrypt.c 
341 cbc_encrypt.o: des.h
342 cbc_encrypt.o: mit-cpyright.h
343 cbc_encrypt.o: des_conf.h
344 verify.o: verify.c 
345 verify.o: des.h
346 verify.o: mit-cpyright.h
347 verify.o: des_conf.h
348 read_pssword.o: read_pssword.c
349 read_pssword.o: des.h
350 read_pssword.o: mit-cpyright.h
351 read_pssword.o: des_conf.h 
352 pcbc_encrypt.o: pcbc_encrypt.c
353 pcbc_encrypt.o: des.h des_internal.h
354 pcbc_encrypt.o: mit-cpyright.h
355 pcbc_encrypt.o: des_conf.h
356 cksum.o: des.h
357 cksum.o: mit-cpyright.h
358 cksum.o: des_conf.h
359 quad_cksum.o: quad_cksum.c 
360 quad_cksum.o: des.h
361 quad_cksum.o: mit-cpyright.h
362 quad_cksum.o: des_conf.h
363 #random_key.o: random_key.c 
364 #random_key.o: des.h
365 #random_key.o: mit-cpyright.h
366 #random_key.o: des_conf.h 
367 key_parity.o: key_parity.c des.h odd.h
368 weak_key.o: weak_key.c des.h des_internal.h
369 new_rnd_key.o: des.h des_internal.h 
370 util.o: util.c
371 util.o: des.h
372 util.o: mit-cpyright.h
373 util.o: des_conf.h
374 strng_to_key.o: strng_to_key.c 
375 strng_to_key.o: des.h
376 strng_to_key.o: mit-cpyright.h
377 strng_to_key.o: des_conf.h ./odd.h
378 debug_decl.o: debug_decl.c
379 make_e.o: make_e.c
380 make_keyperm.o:
381         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_keyperm.c
382 make_ip.o:
383         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_ip.c
384 make_fp.o:
385         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_fp.c
386 make_p.o:
387         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_p.c
388 make_s.o:
389         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_s.c
390 make_s_table.o:
391         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_s_table.c
392 make_p_table.o:
393         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_p_table.c
394 make_odd.o:
395         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_odd.c
396 misc.o:
397         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/misc.c
398 misco.c: misc.c
399         -ln -s misc.c misco.c
400 misco.o: misco.c
401          ${CC} -I${SRC} ${F_CPP} ${F_CC} -o misco.o misco.c -DDONT_INCL_MAIN
402 key_sched.o:
403         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/key_sched.c
404 key_test.o:
405         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/key_test.c
406 testit.o:
407         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/testit.c
408 crypt.o:
409         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/crypt.c
410 des.o:
411         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/des.c
412 cbc_encrypt.o:
413         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/cbc_encrypt.c
414 verify.o:
415         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/verify.c
416 read_pssword.o:
417         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/read_pssword.c
418 pcbc_encrypt.o:
419         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/pcbc_encrypt.c
420 cksum.o:
421         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/cksum.c
422 quad_cksum.o:
423         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/quad_cksum.c
424 #random_key.o:
425 #       ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/random_key.c
426 key_parity.o:
427         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/key_parity.c
428 weak_key.o:
429         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/weak_key.c
430 new_rnd_key.o:
431         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/new_rnd_key.c
432 util.o:
433         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/util.c
434 strng_to_key.o:
435         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/strng_to_key.c
436 debug_decl.o:
437         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/debug_decl.c
438 make_e.o:
439         ${CC} -I${SRC} ${F_CPP} ${F_CC} ${SRC}/make_e.c
440 # DEPENDENCIES MUST END AT END OF FILE
441 # IF YOU PUT STUFF HERE IT WILL GO AWAY (see make depend above)