# set this to be the directory holding your plp sources
# if you're building frontend for plp
PLPDIR=/home/Alceste/stef/PLP/plp-4.0.7/src

# object files needed to read printcap file for PLP
PLP_PCAP=${PLPDIR}/printcap.o ${PLPDIR}/global.o ${PLPDIR}/utils.o ${PLPDIR}/lockfile.o ${PLPDIR}/errormsg.o ${PLPDIR}/parse.o ${PLPDIR}/sendmail.o ${PLPDIR}/mailaddr.o

PLPFLAGS=-DPLP -I${PLPDIR}

CFLAGS=-g -DEUCS -I.

lpd: lprf

lprf: lprfront.c printer_auth.o getcode.o check_files.o printcap.o 
	${CC} $(CFLAGS)  lprfront.c  -o lprf printer_auth.o getcode.o check_files.o -DCHARGE printcap.o 

plp: lprfront.c printer_auth.o getcode.o check_files.o $(PCAP.O) 
	${CC} $(CFLAGS) ${PLPFLAGS} lprfront.c  -o lprf printer_auth.o getcode.o check_files.o  -DCHARGE $(PLP_PCAP) ${PLPDIR}/libplp.a -lsocket -lnsl

clean:
	rm -f lprf lprf.o lprf.s core *.o

install:
	install -c  -o root -g daemon -m 6751 -s ./lprf /usr/local/bin/lpr

print:
	pr *.c /usr/include/local/banner.h Makefile | lpr

lint: lprfront.c printer_auth.c getcode.c printcap.c check_files.c
	lint lprfront.c printcap.c printer_auth.c getcode.c check_files.c -DCHARGE 

shar:
	shar Makefile lprfront.doc check_files.c getcode.c lprfront.c parse-args.c parse.c printer_auth.c printcap.c local >frontend.shar

tar:
	tar chvf lprf.tar Makefile lprfront.doc check_files.c getcode.c lprfront.c parse-args.c parse.c printer_auth.c printcap.c local 
