/* 
 * $Id: Imakefile,v 1.3 95/08/05 19:41:54 ghudson Exp Locker: svalente $
 *
 * Copyright (c) 1983 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)Makefile	5.3 (Berkeley) 5/7/86
 *
 * Copyright (c) 1990, 19910 MIT Project Athena.
 */



#
# makefile for line printer spooling system
#
# Ownerships {see note at the top of lpd.c}
# ROOT		a user that can access any and all files
# DAEMON	someone special
# SPGRP		the group id of the spooling programs
#
#if (defined(_AIX) && defined(i386)) || defined(_IBMR2)
MACHL=-lbsd
#endif

#if defined linux
MACHD = -I/usr/include/bsd
#endif

#if defined __hp9000s800
MACHL = -lBSD
#endif

DEFINES= -DHESIOD -DKERBEROS -DZEPHYR -DPQUOTA -DLACL -I../quota -DPOSIX $(MACHD) /* -DVFS */
LIBS= -L/usr/athena/lib -lhesiod -lzephyr -lcom_err -lkrb -ldes $(MACHL)


CXREF=ctags -x
ROOT=root
DAEMON=daemon

#if defined(_IBMR2)
SPGRP=printq
#else
SPGRP=daemon
#endif

#ifdef _IBMR2
LIBDIR=$(ATHETCDIR)
BINDIR=$(ATHBINDIR)
USRETCDIR=$(ATHETCDIR)
#else
LIBDIR=/usr/athena/lib
BINDIR=/usr/athena/bin
USRETCDIR=/usr/athena/etc
#endif

SRCS=	lpd.c lpr.c lpq.c lprm.c pac.c lpd.c cmds.c cmdtab.c \
	printjob.c recvjob.c displayq.c rmjob.c \
	startdaemon.c common.c printcap.c lpdchar.c tcp_conn.c

#include "Ilpr.rules"

#define ISUBDIRS man /* filters quota transcript-v2.1 */

/*
LPRGSimpleProgram(lpd,lpd.o lpdchar.o printjob.o recvjob.o tcp_conn.o \
	displayq.o rmjob.o common.o printcap.o, $(LIBS),$(LIBDIR))
*/
LPRSimpleProgram(lpr,lpr.o netsend.o printcap.o common.o startdaemon.o,\
	$(LIBS),$(BINDIR))
LPRSimpleProgram(lpq,lpq.o displayq.o printcap.o common.o startdaemon.o,\
	$(LIBS) -ltermcap,$(BINDIR))
LPRSimpleProgram(lprm,lprm.o rmjob.o printcap.o common.o startdaemon.o,\
	$(LIBS),$(BINDIR))
LPRGSimpleProgram(lpc,lpc.o cmds.o cmdtab.o printcap.o common.o startdaemon.o,\
	$(LIBS),$(USRETCDIR))

saber_lpr:
	/**/#load lpr.c printcap.c netsend.c common.c $(LIBS)

#ifndef _IBMR2
SimpleProgram(lptest,lptest.c,,$(BINDIR))
SimpleProgram(pac,pac.o printcap.o,$(LIBS),$(USRETCDIR))

#if !defined(linux) && !defined(__NetBSD__)
install_script(print.sh,,/usr/ucb/print)
#endif
install_script(makespools,,/etc/athena/makespools)

install::
	-rm -f ${DESTDIR}${BINDIR}/lpr.ucb
	-ln -s lpr ${DESTDIR}${BINDIR}/lpr.ucb
	@echo  To build spooling directories:
	@echo makespools ${DESTDIR} 775 ${DAEMON} ${SPGRP}
#endif

/* Specify that should trust all hosts on 18.xx.xx.xx */
SpecialObject(lpd.o,lpd.c,-DWS)

/* Dependencies */
lpd.o lpr.o lpq.o lprm.o pac.o: lp.h lp.local.h
recvjob.o printjob.o displayq.o rmjob.o common.o cmds.o: lp.h lp.local.h
startdaemon.o: lp.local.h
lpc.o cmdtab.o: lpc.h
