2 # Copyright 1987 by the Massachusetts Institute of Technology.
4 # For copying and distribution information,
5 # please see the file <mit-cpyright.h>.
7 # Makefile for BSD DES library
9 # First define machine type, compiler, and object file suffix
10 # Could be for VAX or PC-DOS
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).
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).
21 # Make sure these are properly defined for any new machine types.
22 # target machine for run-time code (may cross-compile),
26 include @TOP_OBJDIR@/src/config/Makefile.config
28 INSTALL_DATA = @INSTALL_DATA@
29 INSTALL_PROGRAM = @INSTALL_PROGRAM@
30 INSTALL_SCRIPT = @INSTALL_SCRIPT@
50 ${TOP_LIBDIR}/libdes.a \
52 ${TOP_INCDIR}/des/stats.h \
53 ${TOP_INCDIR}/des_prototypes.h \
54 ${TOP_INCDIR}/des_conf.h \
55 ${TOP_INCDIR}/mit-cpyright.h \
56 ${TOP_INCDIR}/des_odd.h
67 ${TOP_INCDIR}/mit-cpyright.h \
68 ${TOP_INCDIR}/des/stats.h
70 ${TOP_LIBDIR}/libdes.a: libdes.a
73 ${TOP_INCDIR}/des.h: des.h
76 ${TOP_INCDIR}/des/stats.h: stats.h
79 ${TOP_INCDIR}/des_prototypes.h: des_prototypes.h
82 ${TOP_INCDIR}/des_conf.h: des_conf.h
85 ${TOP_INCDIR}/mit-cpyright.h: mit-cpyright.h
88 ${TOP_INCDIR}/des_odd.h: odd.h
94 libdes.a: ${OBJS} AFS_component_version_number.o
96 $(AR) crv libdes.a ${OBJS} AFS_component_version_number.o
99 make_ip: make_ip.o misc.o main.o
100 ${CC} make_ip.o misc.o main.o ${LDFLAGS} -o make_ip
102 make_fp: make_fp.o misc.o main.o
103 ${CC} make_fp.o misc.o main.o ${LDFLAGS} -o make_fp
105 make_odd: make_odd.o misc.o main.o
106 ${CC} make_odd.o misc.o main.o ${LDFLAGS} -o make_odd
108 make_s_table: make_s_table.o misc.o main.o
109 ${CC} make_s_table.o misc.o main.o ${LDFLAGS} -o make_s_table
111 make_p_table: make_p_table.o misc.o main.o
112 ${CC} make_p_table.o misc.o main.o ${LDFLAGS} -o make_p_table
114 make_keyperm: make_keyperm.o misc.o main.o
115 ${CC} make_keyperm.o misc.o main.o ${LDFLAGS} -o make_keyperm
117 make_e: make_e.o misc.o main.o
118 ${CC} make_e.o misc.o main.o ${LDFLAGS} -o make_e
120 make_p: make_p.o misc.o main.o
121 ${CC} make_p.o misc.o main.o ${LDFLAGS} -o make_p
123 make_s: make_s.o misc.o main.o
124 ${CC} make_s.o misc.o main.o ${LDFLAGS} -o make_s
126 crypt.o: ${srcdir}/crypt.c
127 case ${SYS_NAME} in \
129 ${CCOBJ} -c ${COMMON_INCL} -o crypt.o ${srcdir}/crypt.c ;;\
131 ${CCOBJ} -c ${CFLAGS} -o crypt.o ${srcdir}/crypt.c ;;\
134 # Table/code generation targets
139 s_table.h: make_s_table
140 ./make_s_table s_table.h
142 p_table.h: make_p_table
143 ./make_p_table p_table.h
145 key_perm.h: make_keyperm
146 ./make_keyperm key_perm.h
163 INCLS=des.h des_prototypes.h mit-cpyright.h des_conf.h des_internal.h conf.h
165 make_keyperm.o: make_keyperm.c ${INCLS}
166 make_ip.o: make_ip.c tables.h ${INCLS}
167 make_fp.o: make_fp.c tables.h ${INCLS}
168 make_p.o: make_p.c tables.h ${INCLS}
169 make_s.o: make_s.c s_table.h ${INCLS}
170 make_s_table.o: make_s_table.c tables.h ${INCLS}
171 make_p_table.o: make_p_table.c tables.h ${INCLS}
172 make_odd.o: make_odd.c ${INCLS}
173 misc.o: misc.c AFS_component_version_number.c ${INCLS}
174 main.o: main.c AFS_component_version_number.c ${INCLS}
175 key_sched.o: key_sched.c key_perm.h odd.h ${INCLS}
176 key_test.o: key_test.c ${INCLS}
177 testit.o: testit.c ${INCLS}
178 des.o: s_table.h p_table.h ip.c p.c fp.c ${INCLS}
179 cbc_encrypt.o: cbc_encrypt.c ${INCLS}
180 verify.o: verify.c ${INCLS}
181 read_pssword.o: read_pssword.c ${INCLS}
182 pcbc_encrypt.o: pcbc_encrypt.c ${INCLS}
183 cksum.o: cksum.c ${INCLS}
184 quad_cksum.o: quad_cksum.c ${INCLS}
185 key_parity.o: key_parity.c odd.h ${INCLS}
186 weak_key.o: weak_key.c ${INCLS}
187 new_rnd_key.o: new_rnd_key.c ${INCLS}
188 util.o: util.c ${INCLS}
189 strng_to_key.o: strng_to_key.c ${INCLS}
190 debug_decl.o: debug_decl.c ${INCLS}
191 make_e.o: make_e.c ${INCLS}
196 install: libdes.a des.h des_prototypes.h des_conf.h mit-cpyright.h odd.h
197 ${INSTALL} -d ${DESTDIR}${libdir}
198 ${INSTALL} -d ${DESTDIR}${includedir}
199 ${INSTALL_DATA} libdes.a ${DESTDIR}${libdir}/libdes.a
200 ${INSTALL_DATA} des.h ${DESTDIR}${includedir}/des.h
201 ${INSTALL_DATA} des_prototypes.h ${DESTDIR}${includedir}/des_prototypes.h
202 ${INSTALL_DATA} des_conf.h ${DESTDIR}${includedir}/des_conf.h
203 ${INSTALL_DATA} mit-cpyright.h ${DESTDIR}${includedir}/mit-cpyright.h
204 ${INSTALL_DATA} odd.h ${DESTDIR}${includedir}/des_odd.h
206 dest: libdes.a des.h des_prototypes.h des_conf.h mit-cpyright.h odd.h
207 ${INSTALL} -d ${DEST}/lib
208 ${INSTALL} -d ${DEST}/include
209 ${INSTALL_DATA} libdes.a ${DEST}/lib/libdes.a
210 ${INSTALL_DATA} des.h ${DEST}/include/des.h
211 ${INSTALL_DATA} des_prototypes.h ${DEST}/include/des_prototypes.h
212 ${INSTALL_DATA} des_conf.h ${DEST}/include/des_conf.h
213 ${INSTALL_DATA} mit-cpyright.h ${DEST}/include/mit-cpyright.h
214 ${INSTALL_DATA} odd.h ${DEST}/include/des_odd.h
223 $(RM) -f *.a *.s *.o *.b core *~ *.com *.ld
224 $(RM) -f make_fp make_ip make_keyperm make_odd make_p \
225 make_p_table make_s_table key_perm.h p_table.h \
226 s_table.h odd.h p.c s.c fp.c ip.c AFS_component_version_number.c
227 cd test; $(MAKE) clean
229 include ../config/Makefile.version