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 TOP_INCDIR=@TOP_INCDIR@
27 TOP_LIBDIR=@TOP_LIBDIR@
29 exec_prefix=@exec_prefix@
32 libexecdir=@libexecdir@
34 includedir=@includedir@
36 afssrvbindir=@afssrvbindir@
37 afssrvsbindir=@afssrvsbindir@
38 afssrvlibexecdir=@afssrvlibexecdir@
39 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
40 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
41 TOP_SRCDIR=@TOP_SRCDIR@
42 SYS_NAME=@AFS_SYSNAME@
45 include ../config/Makefile.${SYS_NAME}
47 UKERNELDIR=../libuafs/
68 all: ukinstall ${TOP_LIBDIR}/libdes.a ${TOP_INCDIR}/des.h ${TOP_INCDIR}/des_conf.h ${TOP_INCDIR}/mit-cpyright.h ${TOP_INCDIR}/des_odd.h
74 ${CC} -c -I. -I${TOP_INCDIR} -I${TOP_SRCDIR}/config ${XCFLAGS} $<
76 libdes.a: ${OBJS} AFS_component_version_number.o
78 ar r libdes.a ${OBJS} AFS_component_version_number.o
81 make_ip: make_ip.o misc.o main.o
82 ${CC} make_ip.o misc.o main.o ${LDFLAGS} -o make_ip
84 make_fp: make_fp.o misc.o main.o
85 ${CC} make_fp.o misc.o main.o ${LDFLAGS} -o make_fp
87 make_odd: make_odd.o misc.o main.o
88 ${CC} make_odd.o misc.o main.o ${LDFLAGS} -o make_odd
90 make_s_table: make_s_table.o misc.o main.o
91 ${CC} make_s_table.o misc.o main.o ${LDFLAGS} -o make_s_table
93 make_p_table: make_p_table.o misc.o main.o
94 ${CC} make_p_table.o misc.o main.o ${LDFLAGS} -o make_p_table
96 make_keyperm: make_keyperm.o misc.o main.o
97 ${CC} make_keyperm.o misc.o main.o ${LDFLAGS} -o make_keyperm
99 make_e: make_e.o misc.o main.o
100 ${CC} make_e.o misc.o main.o ${LDFLAGS} -o make_e
102 make_p: make_p.o misc.o main.o
103 ${CC} make_p.o misc.o main.o ${LDFLAGS} -o make_p
105 make_s: make_s.o misc.o main.o
106 ${CC} make_s.o misc.o main.o ${LDFLAGS} -o make_s
109 # Table/code generation targets
114 s_table.h: make_s_table
115 ./make_s_table s_table.h
117 p_table.h: make_p_table
118 ./make_p_table p_table.h
120 key_perm.h: make_keyperm
121 ./make_keyperm key_perm.h
138 INCLS=des.h mit-cpyright.h des_conf.h des_internal.h conf.h
140 make_keyperm.o: make_keyperm.c ${INCLS}
141 make_ip.o: make_ip.c tables.h ${INCLS}
142 make_fp.o: make_fp.c tables.h ${INCLS}
143 make_p.o: make_p.c tables.h ${INCLS}
144 make_s.o: make_s.c s_table.h ${INCLS}
145 make_s_table.o: make_s_table.c tables.h ${INCLS}
146 make_p_table.o: make_p_table.c tables.h ${INCLS}
147 make_odd.o: make_odd.c ${INCLS}
148 misc.o: misc.c AFS_component_version_number.c ${INCLS}
149 main.o: main.c AFS_component_version_number.c ${INCLS}
150 key_sched.o: key_sched.c key_perm.h odd.h ${INCLS}
151 key_test.o: key_test.c ${INCLS}
152 testit.o: testit.c ${INCLS}
153 des.o: s_table.h p_table.h ip.c p.c fp.c ${INCLS}
154 cbc_encrypt.o: cbc_encrypt.c ${INCLS}
155 verify.o: verify.c ${INCLS}
156 read_pssword.o: read_pssword.c ${INCLS}
157 pcbc_encrypt.o: pcbc_encrypt.c ${INCLS}
158 cksum.o: cksum.c ${INCLS}
159 quad_cksum.o: quad_cksum.c ${INCLS}
160 key_parity.o: key_parity.c odd.h ${INCLS}
161 weak_key.o: weak_key.c ${INCLS}
162 new_rnd_key.o: new_rnd_key.c ${INCLS}
163 util.o: util.c ${INCLS}
164 strng_to_key.o: strng_to_key.c ${INCLS}
165 debug_decl.o: debug_decl.c ${INCLS}
166 make_e.o: make_e.c ${INCLS}
171 install: ${DESTDIR}${libdir}/libdes.a ${DESTDIR}${includedir}/des.h ${DESTDIR}${includedir}/des_conf.h ${DESTDIR}${includedir}/mit-cpyright.h ${DESTDIR}${includedir}/des_odd.h
173 ${DEST}/lib/libdes.a: libdes.a
176 ${DEST}/include/des.h: des.h
179 ${DEST}/include/des_conf.h: des_conf.h
182 ${DEST}/include/mit-cpyright.h: mit-cpyright.h
185 ${DEST}/include/des_odd.h: odd.h
189 ${UKERNELDIR}/des/libdes.a \
190 ${UKERNELDIR}/des/des.h \
191 ${UKERNELDIR}/des/mit-cpyright.h
196 ${UKERNELDIR}/des/libdes.a: libdes.a
199 ${UKERNELDIR}/des/des.h: des.h
202 ${UKERNELDIR}/des/mit-cpyright.h: mit-cpyright.h
212 $(RM) -f *.a *.s *.o *.b core *~ *.com *.ld
213 $(RM) -f make_fp make_ip make_keyperm make_odd make_p \
214 make_p_table make_s_table key_perm.h p_table.h \
215 s_table.h odd.h p.c s.c fp.c ip.c AFS_component_version_number.c
216 cd test; $(MAKE) clean
218 include ../config/Makefile.version
220 ${DESTDIR}${libdir}/libdes.a: libdes.a
223 ${TOP_LIBDIR}/libdes.a: libdes.a
226 ${DESTDIR}${includedir}/des.h: des.h
229 ${TOP_INCDIR}/des.h: des.h
232 ${DESTDIR}${includedir}/des_conf.h: des_conf.h
235 ${TOP_INCDIR}/des_conf.h: des_conf.h
238 ${DESTDIR}${includedir}/mit-cpyright.h: mit-cpyright.h
241 ${TOP_INCDIR}/mit-cpyright.h: mit-cpyright.h
244 ${DESTDIR}${includedir}/des_odd.h: odd.h
247 ${TOP_INCDIR}/des_odd.h: odd.h
250 dest: ${DEST}/lib/libdes.a ${DEST}/include/des.h ${DEST}/include/des_conf.h ${DEST}/include/mit-cpyright.h ${DEST}/include/des_odd.h