# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

#	Copyright 1988 Massachusetts Institute of Technology.
#
#	For copying and distribution information, see the file
#	"mit-copyright.h".
#
# 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/zephyr/src/config/RCS/Imake.template,v $
#	$Author: raeburn $
#	$Header: /mit/zephyr/src/config/RCS/Imake.template,v 1.6 1991/03/29 03:49:59 raeburn Exp $
#

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

#	Copyright 1988,1991 Massachusetts Institute of Technology.
#
#	For copying and distribution information, see the file
#	"mit-copyright.h".
#
#	$Source: /afs/athena.mit.edu/astaff/project/zephyr/src/config/RCS/config.Imakefile,v $
#	$Author: lwvanels $
#	$Zephyr: /mit/zephyr/src/config/RCS/config.Imakefile,v 1.31 91/03/29 03:56:07 raeburn Exp $
#

SRCTOP=/afs/athena.mit.edu/astaff/project/zephyr/src

IMAKE=imake -I$(BUILDTOP)/config -TImake.template

DESTDIR=

ATHINCDIR= /usr/athena/include
ETCDIR= /etc
CLIENTDIR= /usr/athena/bin
ETCATHDIR= /etc/athena
USRETCDIR= /usr/athena/etc

LIBDIR= /usr/athena/lib
LINTLIBDIR= /usr/lib/lint
MANDIR=/usr/athena/man
ACLDIR=/usr/athena/lib/zephyr

LINTLIBFLAG=-C

LDSTRIPFLAGS= -x -r

LDPROFSTRIPFLAGS= -X -r

GLOBAL_SYSLIBS=

X_CDEFS= -DX11

X11_LIB=-lX11
XAW_LIB=-lXaw
XT_LIB=-lXt
XMU_LIB=-lXmu

X11_LINTLIB=-lX11
XAW_LINTLIB=-lXaw
XT_LINTLIB=-lXt
XMU_LINTLIB=-lXmu

KRB_CDEFS=-DKERBEROS
KRB_LIB=-lkrb
KRB_LINTLIB=-lkrb
DES_LIB=-ldes
DES_LINTLIB=-ldes

HES_CDEFS=-DHESIOD
HES_LIB=-lhesiod
HES_LINTLIB=-lhesiod

GLOBAL_CDEFS = $(KRB_CDEFS) $(HES_CDEFS) $(X_CDEFS) $(X2_CDEFS) \
	  # foo

SS_LIB=-lss
SS_LINTLIB=-lss
COMERR_LIB=-lcom_err
COMERR_LINTLIB=-lcom_err
COMPILE_ET=compile_et
MAKE_COMMANDS=mk_cmds

DEPEND=makedepend

ARCHIVE= ar cru

RANLIB= ranlib

INSTALLFILE= install -c -m 444

INSTALLLIB= install -c -m 444

INSTALLPROG= install -c -s -m 555

INSTALLSCRIPT= install -c -m 555

INSTALLRAW= install

INSTALLSUID= install -c -m 4555 -o root

LD=ld

AS=as

LINT=lint

CC=gcc -pipe

DBG=-O -g -finline-functions

HCC=$(CC)

CPP=$(CC) -E

LDFLAGS =  -L/usr/athena/lib -L/usr/athena/X11/lib

HCFLAGS=$(CFLAGS)

TAGGER=etags -t

MAKE=make
RM=rm -f
MV=mv

CP=cp -p

LN=ln -s
LPR=lpr -p
CHMOD=chmod

INCLUDE= $(LINCLUDES) -I$(BUILDTOP)/include -I$(ATHINCDIR)

CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)

LINTFLAGS=  $(LLINTFLAGS) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)

#	Copyright 1988,1991 Massachusetts Institute of Technology.
#
#	For copying and distribution information, see the file
#	"mit-copyright.h".
#
#	$Source: /mit/zephyr/src/config/RCS/Imake.rules,v $
#	$Author: lwvanels $
#	$Zephyr: /mit/zephyr/src/config/RCS/Imake.rules,v 1.26 91/03/21 12:08:36 raeburn Exp $
#

.SUFFIXES: .o .s .c .C

ZEPHYR_LIB=$(BUILDTOP)/libs/libzephyr.a
ZEPHYR_LINTLIB=$(BUILDTOP)/libs/llib-lzephyr.ln
DYN_LIB=$(BUILDTOP)/libs/libdyn.a
DYN_LINTLIB=$(BUILDTOP)/libs/llib-ldyn.ln

#	Copyright 1988, 1991 Massachusetts Institute of Technology.
#
#	For copying and distribution information, see the file
#	"mit-copyright.h".
#
#	$Source: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/Imakefile,v $
#	$Author: jfc $
#	$Zephyr: /mit/zephyr/src/lib/RCS/Imakefile,v 1.13 91/03/29 03:37:38 raeburn Exp $
#

LINTLIBS= ${KRB_LINTLIB} ${DES_LINTLIB} ${COMERR_LINTLIB}

#dummy target so that 'make' does a make all.
all:: libzephyr.a

K_O= krb_err.o	ZFmtAuth.o
K_ET=krb_err.et
K_C=		ZFmtAuth.c

krb_err.h krb_err.o: krb_err.et
	$(RM) krb_err.c krb_err.h
	$(COMPILE_ET) krb_err.et
	$(CC) -c -pg $(CFLAGS) krb_err.c
	$(MV) krb_err.o profiled/krb_err.o
	@true
	$(CC) -c $(CFLAGS) krb_err.c
clean::
	$(RM) krb_err.o krb_err.h

RSRCS= ${SRCS} ${HDRS} ${KERR_ET} zephyr_err.et

HDRS= \
	../include/zephyr/zephyr.h \
	../include/zephyr/zephyr_conf.h \
	../include/zephyr/zephyr_paths.h \
	../include/zephyr/zephyr_internal.h

SRCS=	$(K_C) $(STRCASE_C) $(INET_NTOA_C) \
	ZAsyncLocate.c \
	ZCkAuth.c \
	ZCkIfNot.c \
	ZClosePort.c \
	ZCmpUID.c \
	ZCmpUIDP.c \
	ZFlsLocs.c \
	ZFlsSubs.c \
	ZFmtNotice.c \
	ZFmtList.c \
	ZFmtRaw.c \
	ZFmtRawLst.c \
	ZFmtSmRaw.c \
	ZFmtSmRLst.c \
	ZFreeNot.c \
	ZGetLocs.c \
	ZGetSender.c \
	ZGetSubs.c \
	ZGetWGPort.c \
	ZIfNotice.c \
	ZInit.c \
	ZLocations.c \
	ZMakeAscii.c \
	ZMkAuth.c \
	ZNewLocU.c \
	ZOpenPort.c \
	ZParseNot.c \
	ZPeekIfNot.c \
	ZPeekNot.c \
	ZPeekPkt.c \
	ZPending.c \
	ZReadAscii.c \
	ZRecvNot.c \
	ZRecvPkt.c \
	ZRetSubs.c \
	ZSendList.c \
	ZSendNot.c \
	ZSendPkt.c \
	ZSendRaw.c \
	ZSendRLst.c \
	ZSetDest.c \
	ZSetFD.c \
	ZSetSrv.c \
	ZSubs.c \
	ZVariables.c \
	ZWait4Not.c \
	Zinternal.c \
	acl_files.c

OLIST=	${K_O} ${STRCASE_O} ${INET_NTOA_O} \
	zephyr_err.o \
	ZAsyncLocate.o \
	ZCkAuth.o \
	ZCkIfNot.o \
	ZClosePort.o \
	ZCmpUID.o \
	ZCmpUIDP.o \
	ZFlsLocs.o \
	ZFlsSubs.o \
	ZFmtNotice.o \
	ZFmtList.o \
	ZFmtRaw.o \
	ZFmtRawLst.o \
	ZFmtSmRaw.o \
	ZFmtSmRLst.o \
	ZFreeNot.o \
	ZGetLocs.o \
	ZGetSender.o \
	ZGetSubs.o \
	ZGetWGPort.o \
	ZIfNotice.o \
	ZInit.o \
	ZLocations.o \
	ZMakeAscii.o \
	ZMkAuth.o \
	ZNewLocU.o \
	ZOpenPort.o \
	ZParseNot.o \
	ZPeekIfNot.o \
	ZPeekNot.o \
	ZPeekPkt.o \
	ZPending.o \
	ZReadAscii.o \
	ZRecvNot.o \
	ZRecvPkt.o \
	ZRetSubs.o \
	ZSendList.o \
	ZSendNot.o \
	ZSendPkt.o \
	ZSendRaw.o \
	ZSendRLst.o \
	ZSetDest.o \
	ZSetFD.o \
	ZSetSrv.o \
	ZSubs.o \
	ZVariables.o \
	ZWait4Not.o \
	Zinternal.o \
	acl_files.o

OTHERSRCS= zephyr_err.et ${K_ET}
SRCDIR= ${SRCTOP}/lib
CODE= ${SRCS} ${OTHERSRCS} Imakefile

llib-lzephyr.ln:: ${HDRS}
	@echo "Don't worry about the complaints about"
	@echo "possible pointer alignment problems, these are a result"
	@echo "of casting the return value of malloc()"
	@echo

.c.o:
	$(CC) -pg -c $(CFLAGS) $*.c
	-$(LD) $(LDPROFSTRIPFLAGS) -o profiled/$*.o $*.o
	$(CC) -c $(CFLAGS) $*.c
	-$(LD) $(LDSTRIPFLAGS) -o a.out $*.o
	$(MV) a.out $*.o

all:: libzephyr.a

clean::
	$(RM) ${OLIST}

libzephyr.a: ${OLIST}
	$(RM) $@
	$(ARCHIVE) $@ ${OLIST}
	$(RANLIB) $@
clean::
	$(RM) libzephyr.a

install::
	$(INSTALLRAW) -c -m 644 libzephyr.a $(DESTDIR)$(LIBDIR)/libzephyr.a
	$(RANLIB) $(DESTDIR)$(LIBDIR)/libzephyr.a
	$(CHMOD) 444 $(DESTDIR)$(LIBDIR)/libzephyr.a

all:: libzephyr_p.a

libzephyr_p.a: ${OLIST}
	$(RM) $@
	(cd profiled; $(ARCHIVE) ../$@ ${OLIST})
	$(RANLIB) $@

clean::
	$(RM) libzephyr_p.a
	$(RM) profiled/?*.o

install::
	$(INSTALLRAW) -c -m 644 libzephyr_p.a $(DESTDIR)$(LIBDIR)/libzephyr_p.a
	$(RANLIB) $(DESTDIR)$(LIBDIR)/libzephyr_p.a
	$(CHMOD) 444 $(DESTDIR)$(LIBDIR)/libzephyr_p.a

zephyr_err.h zephyr_err.o: zephyr_err.et
	$(RM) zephyr_err.c zephyr_err.h
	$(COMPILE_ET) zephyr_err.et
	$(CC) -c -pg $(CFLAGS) zephyr_err.c
	$(MV) zephyr_err.o profiled/zephyr_err.o
	@true
	$(CC) -c $(CFLAGS) zephyr_err.c
clean::
	$(RM) zephyr_err.o zephyr_err.h

all::
	$(RM) ../libs/libzephyr.a ../libs/libzephyr_p.a
	$(CP) libzephyr.a ../libs/libzephyr.a
	$(RANLIB) ../libs/libzephyr.a

	$(CP) libzephyr_p.a ../libs/libzephyr_p.a
	$(RANLIB) ../libs/libzephyr_p.a

depend:: krb_err.h
	-if cmp krb_err.h ../include/zephyr/krb_err.h >/dev/null 2>&1; then \
		echo ; \
	else \
		$(RM) ../include/zephyr/krb_err.h ; \
		$(CP) krb_err.h ../include/zephyr/krb_err.h; \
	fi

depend:: zephyr_err.h
	-if cmp zephyr_err.h ../include/zephyr/zephyr_err.h >/dev/null 2>&1; then \
		echo ; \
	else \
		$(RM) ../include/zephyr/zephyr_err.h ; \
		$(CP) zephyr_err.h ../include/zephyr/zephyr_err.h; \
	fi

IDIR=${DESTDIR}${ATHINCDIR}
SDIR=../include/zephyr
install::
	-mkdir ${IDIR}
	-mkdir ${IDIR}/zephyr
	install -c -m 0644 ${SDIR}/zephyr.h ${IDIR}/zephyr/zephyr.h
	install -c -m 0644 ${SDIR}/zephyr_conf.h ${IDIR}/zephyr/zephyr_conf.h
	install -c -m 0644 ${SDIR}/zephyr_paths.h ${IDIR}/zephyr/zephyr_paths.h
	install -c -m 0644 ${SDIR}/zephyr_internal.h ${IDIR}/zephyr/zephyr_internal.h
	install -c -m 0644 zephyr_err.h ${IDIR}/zephyr/zephyr_err.h

	install -c -m 0644 krb_err.h ${IDIR}/zephyr/krb_err.h

	install -c -m 0644 ${SDIR}/mit-copyright.h ${IDIR}/zephyr/mit-copyright.h

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

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

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

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

print:: $(CODE)
	$(LPR) $(CODE)

src:: ${CODE}
	touch src

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

install::

Makefiles::

llib-lzephyr.ln::
	cp llib-lzephyr.ln ../libs/llib-lzephyr.ln

# DO NOT DELETE THIS LINE

