#
# Warning: the cpp used on this machine replaces
# all newlines and multiple tabs/spaces in a macro
# expansion with a single space.  Imake tries to
# compensate for this, but is not always
# successful.
#

#
# This makefile is automatically generated by imake... do not modify
# or you may lose your changes when imake generates makefiles again.
# Ignore this message if you are not using imake.
#
#	$Source: /mit/kerberos/src/util/imake.includes/RCS/Imake.template,v $
#	$Author: steiner $
#	$Header: Imake.template,v 4.3 88/12/09 15:41:52 steiner Exp $
#

NEWTOP=../../.
BUILDTOP=../../.

DEPEND=$(BUILDTOP)/util/makedepend/makedepend

IMAKE=$(BUILDTOP)/util/imake/imake -I$(BUILDTOP)/util/imake.includes

INCLUDE= -I$(BUILDTOP)/include
CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
LINTFLAGS=$(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)

#	$Source: /afs/athena.mit.edu/astaff/project/kerberos/src/util/imake.includes/RCS/config.Imakefile,v $
#	$Author: qjb $
#	$Header: /afs/athena.mit.edu/astaff/project/kerberos/src/util/imake.includes/RCS/config.Imakefile,v 4.23 89/12/30 20:01:17 qjb Exp $
#

GLOBAL_CDEFS= -DBSD42 -DATHENA_COMPAT -DATHENA -DKERBEROS -DVFS \
	-D SYSLOG42 -D SunOS=41 \
	$(NOENCFLAG) $(DBMFLAG) $(SHMFLAG)

SRCTOP=/mit/kerberos/src

DESTDIR=

USRDIR= /usr/local
SVRDIR= /usr/local/etc
DAEMDIR= /usr/local/sbin
PROGDIR=/usr/local/athena
LIBDIR= /usr/local/athena/lib
USRLIB= /usr/local/lib
LINTLIBDIR = /usr/lib/lint
BINDIR= /usr/local/bin
UCBDIR= /usr/ucb
INCLDIR= /usr/include
MANDIR= /usr/local/man
ETCDIR= /etc
SLASHBINDIR= /bin

LINTLIBFLAG=-C

KRB_LIB=$(BUILDTOP)/lib/krb/libkrb.a
KRB_LIBDEP=$(KRB_LIB)
KRB_LINTLIB=$(BUILDTOP)/lib/krb/llib-lkrb.ln
KADM_LIB=$(BUILDTOP)/lib/kadm/libkadm.a
KADM_LIBDEP=$(KADM_LIB)
ACL_LIB=$(BUILDTOP)/lib/acl/libacl.a
ACL_LIBDEP=$(ACL_LIB)

NOENCFLAG=
DES_LIB=$(BUILDTOP)/lib/des/libdes.a
DES_LIBDEP=$(DES_LIB)
DES_LINTLIB=$(BUILDTOP)/lib/des/llib-ldes.ln

DBMFLAG=-DNDBM
KDB_LIB=$(BUILDTOP)/lib/kdb/libkdb.a
KDB_LIBDEP=$(KDB_LIB)

SHMFLAG=

COMPILE_ET= $(BUILDTOP)/util/et/compile_et

COM_ERR = $(BUILDTOP)/util/et/libcom_err.a

COM_ERR_DEP = $(COM_ERR)

MAKE_COMMANDS= $(BUILDTOP)/util/ss/make_commands

SS_LIB = $(BUILDTOP)/util/ss/libss.a

SS_LIBDEP = $(SS_LIB)

ARCHIVE= ar cru

RANLIB= ranlib

INSTALLFILE= install -c -m 444

INSTALLLIB= install -c -m 444

INSTALLPROG= install -c -m 555

INSTALLRAW= install

INSTALLSUID= install -c -m 4555 -o root

LD=ld

AS=as

LINT=lint

CC=gcc

CCRO=gcc -fshared-data

HCC=$(CC)

CPP=$(CC) -E

DBG=-O

HCFLAGS=$(CFLAGS)

TAGGER=etags

MAKE=make
RM=rm -f
MV=mv
CP=cp
LN=ln -s
LPR=lpr -p
CHMOD=chmod

DEF_UID = 113

#	$Source: /afs/athena.mit.edu/astaff/project/kerberos/src/util/imake.includes/RCS/Imake.rules,v $
#	$Author: qjb $
#	$Header: /afs/athena.mit.edu/astaff/project/kerberos/src/util/imake.includes/RCS/Imake.rules,v 4.15 89/09/26 14:34:51 qjb Exp $
#

# $Source: /mit/kerberos/src/lib/des/RCS/Imakefile,v $
# $Author: jtkohl $
# $Header: Imakefile,v 4.1 89/01/22 13:05:52 jtkohl Exp $
#
# Copyright 1987 by the Massachusetts Institute of Technology.
#
# For copying and distribution information,
# please see the file <mit-copyright.h>.
#
# Imakefile for DES library
#

OLDSRCS=
OLDOBJS=

DESSRCS= key_sched.c des.c cbc_encrypt.c pcbc_encrypt.c debug_decl.c \
	cksum.c quad_cksum.c random_key.c read_password.c \
	string_to_key.c weak_key.c key_parity.c new_rnd_key.c util.c $(OLDSRCS)

SRCS=   des_internal.h make_key_perm.c make_ip.c make_fp.c make_e.c make_p.c make_s.c \
	make_s_table.c make_p_table.c make_odd.c misc.c \
	key_test.c testit.c verify.c epc_encrypt.c \
	cbc_noop.c enc.c ${DESSRCS}

DESOBJS= key_sched.o des.o cbc_encrypt.o pcbc_encrypt.o debug_decl.o \
	cksum.o quad_cksum.o random_key.o read_password.o \
	string_to_key.o weak_key.o key_parity.o new_rnd_key.o util.o $(OLDOBJS)

SRCDIR=$(SRCTOP)/lib/des
CODE=$(SRCS) Imakefile tables.h des.vaxasm

.c.o:
	$(CC) -c $(CFLAGS) $*.c
	-$(LD) -x -r -o a.out $*.o
	$(MV) a.out $*.o

all:: libdes.a
all:: llib-ldes.ln

libdes.a: $(DESOBJS)
	$(RM) $@.bak
	-$(MV) $@ $@.bak
	$(ARCHIVE) $@ $(DESOBJS)
	$(RANLIB) $@

lint:: llib-ldes.ln

llib-ldes.ln: $(DESSRCS)
	$(LINT) $(LINTLIBFLAG)des $(LINTFLAGS) $(DESSRCS)

clean::
	$(RM) libdes.a
	$(RM) llib-ldes.ln
	$(RM) $(DESOBJS)

install::
	$(INSTALLRAW) -c -m 644 libdes.a $(DESTDIR)$(LIBDIR)/libdes.a
	$(RANLIB) -t $(DESTDIR)$(LIBDIR)/libdes.a
	$(CHMOD) 444 $(DESTDIR)$(LIBDIR)/libdes.a
	$(INSTALLFILE) llib-ldes.ln $(DESTDIR)$(LINTLIBDIR)/llib-ldes.ln

dbg_prt.o: dbg_prt.c
	$(CCRO) -c $(CFLAGS) dbg_prt.c
	-$(LD) -x -r -o a.out $*.o
	$(MV) a.out $*.o

des.o: des.c
	$(CCRO) -c $(CFLAGS) des.c
	-$(LD) -x -r -o a.out $*.o
	$(MV) a.out $*.o

key_sched.o: key_sched.c
	$(CCRO) -c $(CFLAGS) key_sched.c
	-$(LD) -x -r -o a.out $*.o
	$(MV) a.out $*.o

misc.o: misc.c
	$(HCC) $(HCFLAGS) -c misc.c

clean::
	$(RM) misc.o

make_key_perm: make_key_perm.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

key_perm.h: make_key_perm
	./make_key_perm key_perm.h

clean::
	$(RM) key_perm.h make_key_perm make_key_perm.o

depend:: key_perm.h

make_odd: make_odd.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

odd.h: make_odd
	./make_odd odd.h

clean::
	$(RM) odd.h make_odd make_odd.o

depend:: odd.h

make_p_table: make_p_table.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

p_table.h: make_p_table
	./make_p_table p_table.h

clean::
	$(RM) p_table.h make_p_table make_p_table.o

depend:: p_table.h

make_s_table: make_s_table.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

s_table.h: make_s_table
	./make_s_table s_table.h

clean::
	$(RM) s_table.h make_s_table make_s_table.o

depend:: s_table.h

make_p: make_p.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

p.c: make_p
	./make_p p.c

clean::
	$(RM) p.c make_p make_p.o

depend:: p.c

make_fp: make_fp.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

fp.c: make_fp
	./make_fp fp.c

clean::
	$(RM) fp.c make_fp make_fp.o

depend:: fp.c

make_ip: make_ip.c misc.o
	$(HCC) $(HCFLAGS) -o $@ $@.c misc.o

ip.c: make_ip
	./make_ip ip.c

clean::
	$(RM) ip.c make_ip make_ip.o

depend:: ip.c

misc.o: des_internal.h
make_s_table: tables.h des_internal.h
make_p_table: tables.h des_internal.h
make_key_perm: des_internal.h
make_s: s_table.h des_internal.h

all:: verify

verify: verify.c libdes.a
	$(CC) $(CFLAGS) -o $@ $@.c libdes.a

clean::
	$(RM) verify verify.o

all:: key_test

key_test: key_test.c libdes.a
	$(CC) $(CFLAGS) -o $@ $@.c libdes.a

clean::
	$(RM) key_test key_test.o

all:: testit

testit: testit.c libdes.a
	$(CC) $(CFLAGS) -o $@ $@.c libdes.a

clean::
	$(RM) testit testit.o

depend:: $(SRCS)
	@echo "### Now computing dependencies"
	@$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)

clean::
	$(RM) *~ \#* *.bak $(TAGSFILE)

tags::
	$(TAGGER) *.c *.h

Makefile::
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(IMAKE) -DNEW_TOP=$(NEWTOP) -s Makefile

print:: ${CODE}
	${LPR} ${CODE}

src:: ${CODE}

${CODE}:
	$(RM) $@
	-$(LN) ${SRCDIR}/$@ $@

install::

Makefiles::

# DO NOT DELETE THIS LINE

des_internal.o: ../.././include/conf.h ../.././include/mit-copyright.h
des_internal.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
make_key_perm.o: ../.././include/mit-copyright.h /usr/include/stdio.h
make_key_perm.o: /usr/include/errno.h /usr/include/sys/errno.h des_internal.h
make_key_perm.o: ../.././include/conf.h ../.././include/osconf.h
make_key_perm.o: ../.././include/conf-bsdm68k.h
make_ip.o: ../.././include/mit-copyright.h /usr/include/stdio.h
make_ip.o: des_internal.h ../.././include/conf.h ../.././include/osconf.h
make_ip.o: ../.././include/conf-bsdm68k.h tables.h
make_fp.o: ../.././include/mit-copyright.h /usr/include/stdio.h
make_fp.o: des_internal.h ../.././include/conf.h ../.././include/osconf.h
make_fp.o: ../.././include/conf-bsdm68k.h tables.h
make_e.o: /usr/include/stdio.h des_internal.h ../.././include/conf.h
make_e.o: ../.././include/mit-copyright.h ../.././include/osconf.h
make_e.o: ../.././include/conf-bsdm68k.h tables.h
make_p.o: ../.././include/mit-copyright.h /usr/include/stdio.h des_internal.h
make_p.o: ../.././include/conf.h ../.././include/osconf.h
make_p.o: ../.././include/conf-bsdm68k.h tables.h
make_s.o: ../.././include/mit-copyright.h /usr/include/stdio.h des_internal.h
make_s.o: ../.././include/conf.h ../.././include/osconf.h
make_s.o: ../.././include/conf-bsdm68k.h s_table.h
make_s_table.o: ../.././include/mit-copyright.h /usr/include/stdio.h
make_s_table.o: des_internal.h ../.././include/conf.h
make_s_table.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
make_s_table.o: tables.h
make_p_table.o: ../.././include/mit-copyright.h /usr/include/stdio.h
make_p_table.o: des_internal.h ../.././include/conf.h
make_p_table.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
make_p_table.o: tables.h
make_odd.o: ../.././include/mit-copyright.h /usr/include/stdio.h
misc.o: ../.././include/mit-copyright.h /usr/include/stdio.h des_internal.h
misc.o: ../.././include/conf.h ../.././include/osconf.h
misc.o: ../.././include/conf-bsdm68k.h
key_test.o: ../.././include/mit-copyright.h /usr/include/stdio.h
key_test.o: /usr/include/errno.h /usr/include/sys/errno.h
key_test.o: ../.././include/des.h
testit.o: ../.././include/mit-copyright.h /usr/include/stdio.h
testit.o: /usr/include/errno.h /usr/include/sys/errno.h ../.././include/des.h
verify.o: ../.././include/mit-copyright.h /usr/include/stdio.h
verify.o: /usr/include/errno.h /usr/include/sys/errno.h ../.././include/des.h
epc_encrypt.o: ../.././include/mit-copyright.h ../.././include/des.h
epc_encrypt.o: /usr/include/stdio.h /usr/include/strings.h
cbc_noop.o: ../.././include/mit-copyright.h /usr/include/stdio.h
cbc_noop.o: ../.././include/des.h
enc.o: ../.././include/mit-copyright.h ../.././include/des.h
enc.o: /usr/include/stdio.h
key_sched.o: ../.././include/mit-copyright.h des_internal.h
key_sched.o: ../.././include/conf.h ../.././include/osconf.h
key_sched.o: ../.././include/conf-bsdm68k.h /usr/include/stdio.h
key_sched.o: ../.././include/des.h key_perm.h
des.o: ../.././include/mit-copyright.h /usr/include/stdio.h
des.o: ../.././include/des.h des_internal.h ../.././include/conf.h
des.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h s_table.h
des.o: p_table.h ip.c p.c fp.c
cbc_encrypt.o: ../.././include/mit-copyright.h /usr/include/stdio.h
cbc_encrypt.o: ../.././include/des.h
pcbc_encrypt.o: ../.././include/mit-copyright.h /usr/include/stdio.h
pcbc_encrypt.o: ../.././include/des.h des_internal.h ../.././include/conf.h
pcbc_encrypt.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
debug_decl.o: ../.././include/mit-copyright.h
cksum.o: ../.././include/mit-copyright.h /usr/include/stdio.h
cksum.o: /usr/include/strings.h ../.././include/des.h des_internal.h
cksum.o: ../.././include/conf.h ../.././include/osconf.h
cksum.o: ../.././include/conf-bsdm68k.h
quad_cksum.o: ../.././include/mit-copyright.h /usr/include/stdio.h
quad_cksum.o: /usr/include/errno.h /usr/include/sys/errno.h
quad_cksum.o: ../.././include/des.h des_internal.h ../.././include/conf.h
quad_cksum.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
random_key.o: ../.././include/mit-copyright.h /usr/include/stdio.h
random_key.o: ../.././include/des.h des_internal.h ../.././include/conf.h
random_key.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
random_key.o: /usr/include/sys/time.h /usr/include/sys/time.h
read_password.o: ../.././include/mit-copyright.h ../.././include/des.h
read_password.o: ../.././include/conf.h ../.././include/osconf.h
read_password.o: ../.././include/conf-bsdm68k.h /usr/include/stdio.h
read_password.o: /usr/include/strings.h /usr/include/sys/ioctl.h
read_password.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h
read_password.o: /usr/include/sys/ttold.h /usr/include/sys/ioccom.h
read_password.o: /usr/include/sys/ttycom.h /usr/include/sys/filio.h
read_password.o: /usr/include/sys/sockio.h /usr/include/signal.h
read_password.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
read_password.o: /usr/include/setjmp.h
string_to_key.o: ../.././include/mit-copyright.h /usr/include/stdio.h
string_to_key.o: ../.././include/des.h des_internal.h ../.././include/conf.h
string_to_key.o: ../.././include/osconf.h ../.././include/conf-bsdm68k.h
weak_key.o: ../.././include/des.h ../.././include/mit-copyright.h
weak_key.o: des_internal.h ../.././include/conf.h ../.././include/osconf.h
weak_key.o: ../.././include/conf-bsdm68k.h
key_parity.o: ../.././include/mit-copyright.h ../.././include/des.h
key_parity.o: des_internal.h ../.././include/conf.h ../.././include/osconf.h
key_parity.o: ../.././include/conf-bsdm68k.h odd.h
new_rnd_key.o: ../.././include/mit-copyright.h ../.././include/des.h
new_rnd_key.o: des_internal.h ../.././include/conf.h ../.././include/osconf.h
new_rnd_key.o: ../.././include/conf-bsdm68k.h /usr/include/sys/time.h
new_rnd_key.o: /usr/include/sys/time.h
util.o: ../.././include/mit-copyright.h /usr/include/stdio.h
util.o: ../.././include/des.h
