/**/#	Copyright 1988 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: jtkohl $
/**/#	$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/Imakefile,v 1.8 89/10/19 17:37:16 jtkohl Exp $
/**/#
#define no_curdir_lint

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

#ifdef KERBEROS
RSRCS= ${SRCS} ${HDRS} krb_err.et zephyr_err.et
#else
RSRCS= ${SRCS} ${HDRS} zephyr_err.et
#endif
HDRS= \
	../include/zephyr/zephyr.h \
	../include/zephyr/zephyr_conf.h \
	../include/zephyr/zephyr_internal.h

SRCS=	\
	ZCheckAuthentication.c \
	ZCheckIfNotice.c \
	ZClosePort.c \
	ZCompareUID.c \
	ZCompareUIDPred.c \
	ZFlushLocations.c \
	ZFlushSubscriptions.c \
	ZFormatAuthenticNotice.c \
	ZFormatNotice.c \
	ZFormatNoticeList.c \
	ZFormatRawNotice.c \
	ZFormatRawNoticeList.c \
	ZFormatSmallRawNotice.c \
	ZFormatSmallRawNoticeList.c \
	ZFreeNotice.c \
	ZGetLocations.c \
	ZGetSender.c \
	ZGetSubscriptions.c \
	ZGetWGPort.c \
	ZIfNotice.c \
	ZInitialize.c \
	ZLocateUser.c \
	ZLocations.c \
	ZMakeAscii.c \
	ZMakeAuthentication.c \
	ZOpenPort.c \
	ZParseNotice.c \
	ZPeekIfNotice.c \
	ZPeekNotice.c \
	ZPeekPacket.c \
	ZPending.c \
	ZReadAscii.c \
	ZReceiveNotice.c \
	ZReceivePacket.c \
	ZRetrieveSubscriptions.c \
	ZSendList.c \
	ZSendNotice.c \
	ZSendPacket.c \
	ZSendRawNotice.c \
	ZSendRawList.c \
	ZSetDestAddr.c \
	ZSetFD.c \
	ZSetServerState.c \
	ZSubscriptions.c \
	ZVariables.c \
	Zinternal.c \
	acl_files.c \
	strcasecmp.c

#ifdef KERBEROS
OLIST=	\
	krb_err.o \
	zephyr_err.o \
	ZCheckAuthentication.o \
	ZCheckIfNotice.o \
	ZClosePort.o \
	ZCompareUID.o \
	ZCompareUIDPred.o \
	ZFlushLocations.o \
	ZFlushSubscriptions.o \
	ZFormatAuthenticNotice.o \
	ZFormatNotice.o \
	ZFormatNoticeList.o \
	ZFormatRawNotice.o \
	ZFormatRawNoticeList.o \
	ZFormatSmallRawNotice.o \
	ZFormatSmallRawNoticeList.o \
	ZFreeNotice.o \
	ZGetLocations.o \
	ZGetSender.o \
	ZGetSubscriptions.o \
	ZGetWGPort.o \
	ZIfNotice.o \
	ZInitialize.o \
	ZLocateUser.o \
	ZLocations.o \
	ZMakeAscii.o \
	ZMakeAuthentication.o \
	ZOpenPort.o \
	ZParseNotice.o \
	ZPeekIfNotice.o \
	ZPeekNotice.o \
	ZPeekPacket.o \
	ZPending.o \
	ZReadAscii.o \
	ZReceiveNotice.o \
	ZReceivePacket.o \
	ZRetrieveSubscriptions.o \
	ZSendList.o \
	ZSendNotice.o \
	ZSendPacket.o \
	ZSendRawNotice.o \
	ZSendRawList.o \
	ZSetDestAddr.o \
	ZSetFD.o \
	ZSetServerState.o \
	ZSubscriptions.o \
	ZVariables.o \
	Zinternal.o \
	acl_files.o
#else /* !KERBEROS */
OLIST=	\
	zephyr_err.o \
	ZCheckAuthentication.o \
	ZCheckIfNotice.o \
	ZClosePort.o \
	ZCompareUID.o \
	ZCompareUIDPred.o \
	ZFlushLocations.o \
	ZFlushSubscriptions.o \
	ZFormatAuthenticNotice.o \
	ZFormatNotice.o \
	ZFormatNoticeList.o \
	ZFormatRawNotice.o \
	ZFormatRawNoticeList.o \
	ZFormatSmallRawNotice.o \
	ZFormatSmallRawNoticeList.o \
	ZFreeNotice.o \
	ZGetLocations.o \
	ZGetSender.o \
	ZGetSubscriptions.o \
	ZGetWGPort.o \
	ZIfNotice.o \
	ZInitialize.o \
	ZLocateUser.o \
	ZLocations.o \
	ZMakeAscii.o \
	ZMakeAuthentication.o \
	ZOpenPort.o \
	ZParseNotice.o \
	ZPeekIfNotice.o \
	ZPeekNotice.o \
	ZPeekPacket.o \
	ZPending.o \
	ZReadAscii.o \
	ZReceiveNotice.o \
	ZReceivePacket.o \
	ZRetrieveSubscriptions.o \
	ZSendList.o \
	ZSendNotice.o \
	ZSendPacket.o \
	ZSendRawNotice.o \
	ZSendRawList.o \
	ZSetDestAddr.o \
	ZSetFD.o \
	ZSetServerState.o \
	ZSubscriptions.o \
	ZVariables.o \
	Zinternal.o \
	acl_files.o
#endif /* KERBEROS */

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

#ifdef KERBEROS
KRB_OTHERSRCS= krb_err.et
#endif /* KERBEROS */

OTHERSRCS= zephyr_err.et ${KRB_OTHERSRCS}
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

library_obj_rule()

install_library_target(zephyr,${OLIST},${SRCS},${LINTLIBS})

make_error_table(zephyr_err)
#ifdef KERBEROS
make_error_table(krb_err)
#endif

all::
	$(RM) ../libs/libzephyr.a ../libs/libzephyr_p.a
	$(CP) libzephyr.a ../libs/libzephyr.a
	$(RANLIB) ../libs/libzephyr.a
#ifdef PROFILED_LIBS
	$(CP) libzephyr_p.a ../libs/libzephyr_p.a
	$(RANLIB) ../libs/libzephyr_p.a
#endif
	

#ifdef KERBEROS
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
#endif /* KERBEROS */

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

install::
	-mkdir ${DESTDIR}/usr/include/zephyr
	install -c -m 0644 ../include/zephyr/zephyr.h ${DESTDIR}/usr/include/zephyr/zephyr.h
	install -c -m 0644 ../include/zephyr/zephyr_conf.h ${DESTDIR}/usr/include/zephyr/zephyr_conf.h
	install -c -m 0644 ../include/zephyr/zephyr_internal.h ${DESTDIR}/usr/include/zephyr/zephyr_internal.h
	install -c -m 0644 zephyr_err.h ${DESTDIR}/usr/include/zephyr/zephyr_err.h
#ifdef KERBEROS
	install -c -m 0644 krb_err.h ${DESTDIR}/usr/include/zephyr/krb_err.h
#endif /* KERBEROS */
	install -c -m 0644 ../include/zephyr/mit-copyright.h ${DESTDIR}/usr/include/zephyr/mit-copyright.h

/* this is to install the lint lib  This must end */
/* up in the resulting Makefile AFTER the other lint lib stuff. */
#define last_licks()							@@\
llib-lzephyr.ln::							@@\
	cp llib-lzephyr.ln ../libs/llib-lzephyr.ln
