1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 5.10 (Berkeley) 09/29/88 18# 19# Ownerships {see note at the top of lpd.c} 20# ROOT a user that can access any and all files 21# DAEMON someone special 22# SPGRP the group id of the spooling programs 23# 24CFLAGS= -O 25LIBDIR= /usr/lib 26BINDIR= /usr/ucb 27SPLDIR= /usr/spool/lpd 28DAEMON= daemon 29SPGRP= daemon 30LIBC= /lib/libc.a 31L1SRCS= lpd.c printjob.c recvjob.c displayq.c rmjob.c startdaemon.c \ 32 lpdchar.c common.c printcap.c 33L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ 34 lpdchar.o common.o printcap.o 35L2SRCS= lpr.c startdaemon.c printcap.c 36L2OBJS= lpr.o startdaemon.o printcap.o 37L3SRCS= lpq.c displayq.c common.c printcap.c 38L3OBJS= lpq.o displayq.o common.o printcap.o 39L4SRCS= lprm.c rmjob.c startdaemon.c common.c printcap.c 40L4OBJS= lprm.o rmjob.o startdaemon.o common.o printcap.o 41L5SRCS= lpc.c cmds.c cmdtab.c startdaemon.c common.c printcap.c 42L5OBJS= lpc.o cmds.o cmdtab.o startdaemon.o common.o printcap.o 43L6SRCS= lptest.c 44L6OBJS= lptest.o 45L7SRCS= pac.c printcap.c 46L7OBJS= pac.o printcap.o 47SRCS= lpd.c lpr.c lpq.c lprm.c pac.c lpd.c cmds.c cmdtab.c printjob.c \ 48 recvjob.c displayq.c rmjob.c startdaemon.c common.c printcap.c \ 49 lpdchar.c 50OBJS= ${L1OBJS} ${L2OBJS} ${L3OBJS} ${L4OBJS} ${L5OBJS} ${L6OBJS} ${L7OBJS} 51MAN1= lpq.0 lpr.0 lprm.0 lptest.0 52MAN8= lpc.0 lpd.0 pac.0 53MAN= ${MAN1} ${MAN8} 54ALL= lpd lpr lpq lprm lpc lptest pac 55 56all: ${ALL} FILTERS VFILTERS 57 58lpd: ${L1OBJS} ${LIBC} 59 ${CC} -o $@ ${L1OBJS} 60 61lpr: ${L2OBJS} ${LIBC} 62 ${CC} -o $@ ${L2OBJS} 63 64lpq: ${L3OBJS} ${LIBC} 65 ${CC} -o $@ ${L3OBJS} 66 67lprm: ${L4OBJS} ${LIBC} 68 ${CC} -o $@ ${L4OBJS} 69 70lpc: ${L5OBJS} ${LIBC} 71 ${CC} -o $@ ${L5OBJS} 72 73lptest: ${L6OBJS} ${LIBC} 74 ${CC} ${CFLAGS} -o $@ ${L6OBJS} 75 76pac: ${L7OBJS} ${LIBC} 77 ${CC} -o $@ ${L7OBJS} 78 79FILTERS: 80 cd filters; make ${MFLAGS} 81 82VFILTERS: 83 cd vfilters; make ${MFLAGS} 84 85clean: 86 rm -f ${OBJS} core ${ALL} 87 cd filters; make ${MFLAGS} clean 88 cd vfilters; make ${MFLAGS} clean 89 90cleandir: clean 91 rm -f ${MAN} tags .depend 92 cd filters; make ${MFLAGS} clean 93 cd vfilters; make ${MFLAGS} clean 94 95depend: ${SRCS} 96 mkdep ${CFLAGS} ${SRCS} 97 cd filters; make ${MFLAGS} depend 98 cd vfilters; make ${MFLAGS} depend 99 100install: ${MAN} 101 install -s -o root -g ${SPGRP} -m 6711 lpd ${DESTDIR}/${LIBDIR}/lpd 102 install -s -o root -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr 103 install -s -o root -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq 104 install -s -o root -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm 105 install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/etc/lpc 106 install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest 107 install -s -o bin -g bin -m 755 pac ${DESTDIR}/etc/pac 108 /etc/chown ${DAEMON} ${DESTDIR}/${SPLDIR} 109 chgrp ${SPGRP} ${DESTDIR}/${SPLDIR} 110 chmod 775 ${DESTDIR}/${SPLDIR} 111 install -c -o bin -g bin -m 444 ${MAN1} ${DESTDIR}/usr/man/cat1 112 install -c -o bin -g bin -m 444 ${MAN8} ${DESTDIR}/usr/man/cat8 113 cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install 114 cd vfilters; make ${MFLAGS} DESTDIR=${DESTDIR} install 115 116lint: ${SRCS} 117 lint ${CFLAGS} ${L1SRCS} 118 lint ${CFLAGS} ${L2SRCS} 119 lint ${CFLAGS} ${L3SRCS} 120 lint ${CFLAGS} ${L4SRCS} 121 lint ${CFLAGS} ${L5SRCS} 122 lint ${CFLAGS} ${L6SRCS} 123 lint ${CFLAGS} ${L7SRCS} 124 125tags: ${SRCS} 126 ctags ${L1SRCS} 127 ctags -a ${L2SRCS} 128 ctags -a ${L3SRCS} 129 ctags -a ${L4SRCS} 130 ctags -a ${L5SRCS} 131 ctags -a ${L6SRCS} 132 ctags -a ${L7SRCS} 133 sort -o tags tags 134