no-copy-libafs-builds-20021015
[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 srcdir=@srcdir@
26 include @TOP_OBJDIR@/src/config/Makefile.config
27
28 LDFLAGS = ${XLDFLAGS}
29
30 OBJS = \
31         des.o \
32         cbc_encrypt.o \
33         pcbc_encrypt.o \
34         cksum.o \
35         new_rnd_key.o \
36         key_sched.o \
37         debug_decl.o \
38         quad_cksum.o \
39         key_parity.o \
40         weak_key.o \
41         read_pssword.o \
42         strng_to_key.o \
43         misc.o \
44         crypt.o \
45         util.o
46
47 all: \
48         ${TOP_LIBDIR}/libdes.a \
49         ${TOP_INCDIR}/des.h \
50         ${TOP_INCDIR}/des_prototypes.h \
51         ${TOP_INCDIR}/des_conf.h \
52         ${TOP_INCDIR}/mit-cpyright.h \
53         ${TOP_INCDIR}/des_odd.h
54
55 #
56 # Build rules
57 #
58 .c.o:
59         ${CC} -c -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_OBJDIR}/src/config ${XCFLAGS} $<
60
61 libdes.a: ${OBJS} AFS_component_version_number.o
62         $(RM) -f libdes.a
63         $(AR) crv libdes.a ${OBJS} AFS_component_version_number.o
64         $(RANLIB) libdes.a
65
66 make_ip: make_ip.o misc.o main.o
67         ${CC} make_ip.o misc.o main.o ${LDFLAGS} -o make_ip
68
69 make_fp: make_fp.o misc.o main.o
70         ${CC} make_fp.o misc.o main.o ${LDFLAGS} -o make_fp
71
72 make_odd: make_odd.o misc.o main.o
73         ${CC} make_odd.o misc.o main.o ${LDFLAGS} -o make_odd
74
75 make_s_table: make_s_table.o misc.o main.o 
76         ${CC} make_s_table.o misc.o main.o ${LDFLAGS} -o make_s_table
77
78 make_p_table: make_p_table.o misc.o main.o 
79         ${CC} make_p_table.o misc.o main.o ${LDFLAGS} -o make_p_table
80
81 make_keyperm: make_keyperm.o misc.o main.o 
82         ${CC} make_keyperm.o misc.o main.o ${LDFLAGS} -o make_keyperm
83
84 make_e: make_e.o misc.o main.o 
85         ${CC} make_e.o misc.o main.o ${LDFLAGS} -o make_e
86
87 make_p: make_p.o misc.o main.o 
88         ${CC} make_p.o misc.o main.o ${LDFLAGS} -o make_p
89
90 make_s: make_s.o misc.o main.o 
91         ${CC} make_s.o misc.o main.o ${LDFLAGS} -o make_s
92
93 #
94 # Table/code generation targets
95 #
96 odd.h: make_odd
97         ./make_odd odd.h
98
99 s_table.h: make_s_table
100         ./make_s_table s_table.h
101
102 p_table.h: make_p_table
103         ./make_p_table p_table.h
104
105 key_perm.h: make_keyperm
106         ./make_keyperm key_perm.h
107
108 ip.c: make_ip
109         ./make_ip ip.c
110
111 p.c: make_p
112         ./make_p p.c
113
114 s.c: make_s
115         ./make_s s.c
116
117 fp.c: make_fp
118         ./make_fp fp.c
119
120 #
121 # Dependency rules
122 #
123 INCLS=des.h des_prototypes.h mit-cpyright.h des_conf.h des_internal.h conf.h
124
125 make_keyperm.o: make_keyperm.c ${INCLS}
126 make_ip.o: make_ip.c tables.h ${INCLS}
127 make_fp.o: make_fp.c tables.h ${INCLS}
128 make_p.o: make_p.c tables.h ${INCLS}
129 make_s.o: make_s.c s_table.h ${INCLS}
130 make_s_table.o: make_s_table.c tables.h ${INCLS}
131 make_p_table.o: make_p_table.c tables.h ${INCLS}
132 make_odd.o: make_odd.c ${INCLS}
133 misc.o: misc.c AFS_component_version_number.c ${INCLS}
134 main.o: main.c AFS_component_version_number.c ${INCLS}
135 key_sched.o: key_sched.c key_perm.h odd.h ${INCLS}
136 key_test.o: key_test.c ${INCLS}
137 testit.o: testit.c ${INCLS}
138 des.o: s_table.h p_table.h ip.c p.c fp.c ${INCLS}
139 cbc_encrypt.o: cbc_encrypt.c ${INCLS}
140 verify.o: verify.c ${INCLS}
141 read_pssword.o: read_pssword.c ${INCLS}
142 pcbc_encrypt.o: pcbc_encrypt.c ${INCLS}
143 cksum.o: cksum.c ${INCLS}
144 quad_cksum.o: quad_cksum.c ${INCLS}
145 key_parity.o: key_parity.c odd.h ${INCLS}
146 weak_key.o: weak_key.c ${INCLS}
147 new_rnd_key.o: new_rnd_key.c ${INCLS}
148 util.o: util.c ${INCLS}
149 strng_to_key.o: strng_to_key.c ${INCLS}
150 debug_decl.o: debug_decl.c ${INCLS}
151 make_e.o: make_e.c ${INCLS}
152
153 #
154 # Install targets
155 #
156 install:  \
157         ${DESTDIR}${libdir}/libdes.a \
158         ${DESTDIR}${includedir}/des.h \
159         ${DESTDIR}${includedir}/des_prototypes.h \
160         ${DESTDIR}${includedir}/des_conf.h \
161         ${DESTDIR}${includedir}/mit-cpyright.h \
162         ${DESTDIR}${includedir}/des_odd.h
163
164 ${DEST}/lib/libdes.a: libdes.a
165         ${INSTALL} $? $@
166
167 ${DEST}/include/des.h: des.h
168         ${INSTALL} $? $@
169
170 ${DEST}/include/des_prototypes.h: des_prototypes.h
171         ${INSTALL} $? $@
172
173 ${DEST}/include/des_conf.h: des_conf.h
174         ${INSTALL} $? $@
175
176 ${DEST}/include/mit-cpyright.h: mit-cpyright.h
177         ${INSTALL} $? $@
178
179 ${DEST}/include/des_odd.h: odd.h
180         ${INSTALL} $? $@
181
182 #
183 # Misc. targets
184 #
185 test: libdes.a
186         cd test; $(MAKE)
187
188 clean:
189         $(RM) -f *.a *.s *.o *.b core *~ *.com *.ld
190         $(RM) -f make_fp make_ip make_keyperm make_odd make_p \
191                 make_p_table make_s_table key_perm.h p_table.h \
192                 s_table.h odd.h p.c s.c fp.c ip.c AFS_component_version_number.c
193         cd test; $(MAKE) clean
194
195 include ../config/Makefile.version
196
197 ${DESTDIR}${libdir}/libdes.a: libdes.a
198         ${INSTALL} $? $@
199
200 ${TOP_LIBDIR}/libdes.a: libdes.a
201         ${INSTALL} $? $@
202
203 ${DESTDIR}${includedir}/des.h: des.h
204         ${INSTALL} $? $@
205
206 ${TOP_INCDIR}/des.h: des.h
207         ${INSTALL} $? $@
208
209 ${DESTDIR}${includedir}/des_prototypes.h: des_prototypes.h
210         ${INSTALL} $? $@
211
212 ${TOP_INCDIR}/des_prototypes.h: des_prototypes.h
213         ${INSTALL} $? $@
214
215 ${DESTDIR}${includedir}/des_conf.h: des_conf.h
216         ${INSTALL} $? $@
217
218 ${TOP_INCDIR}/des_conf.h: des_conf.h
219         ${INSTALL} $? $@
220
221 ${DESTDIR}${includedir}/mit-cpyright.h: mit-cpyright.h
222         ${INSTALL} $? $@
223
224 ${TOP_INCDIR}/mit-cpyright.h: mit-cpyright.h
225         ${INSTALL} $? $@
226
227 ${DESTDIR}${includedir}/des_odd.h: odd.h
228         ${INSTALL} $? $@
229
230 ${TOP_INCDIR}/des_odd.h: odd.h
231         ${INSTALL} $? $@
232
233 dest:  \
234         ${DEST}/lib/libdes.a \
235         ${DEST}/include/des.h \
236         ${DEST}/include/des_prototypes.h \
237         ${DEST}/include/des_conf.h \
238         ${DEST}/include/mit-cpyright.h \
239         ${DEST}/include/des_odd.h
240