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