1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. The Berkeley software License Agreement 4# specifies the terms and conditions for redistribution. 5# 6# @(#)Makefile 5.6 (Berkeley) 06/21/87 7# 8# makefile for line printer spooling system 9# 10# Ownerships {see note at the top of lpd.c} 11# ROOT a user that can access any and all files 12# DAEMON someone special 13# SPGRP the group id of the spooling programs 14# 15CFLAGS= -O 16LIBDIR= /usr/lib 17BINDIR= /usr/ucb 18SPLDIR= /usr/spool/lpd 19ROOT= root 20DAEMON= daemon 21SPGRP= daemon 22LIBC= /lib/libc.a 23L1SRCS= lpd.c printjob.c recvjob.c displayq.c rmjob.c startdaemon.c \ 24 lpdchar.c common.c printcap.c 25L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ 26 lpdchar.o common.o printcap.o 27L2SRCS= lpr.c startdaemon.c printcap.c 28L2OBJS= lpr.o startdaemon.o printcap.o 29L3SRCS= lpq.c displayq.c common.c printcap.c 30L3OBJS= lpq.o displayq.o common.o printcap.o 31L4SRCS= lprm.c rmjob.c startdaemon.c common.c printcap.c 32L4OBJS= lprm.o rmjob.o startdaemon.o common.o printcap.o 33L5SRCS= lpc.c cmds.c cmdtab.c startdaemon.c common.c printcap.c 34L5OBJS= lpc.o cmds.o cmdtab.o startdaemon.o common.o printcap.o 35L6SRCS= lptest.c 36L6OBJS= lptest.o 37L7SRCS= pac.c printcap.c 38L7OBJS= pac.o printcap.o 39SRCS= lpd.c lpr.c lpq.c lprm.c pac.c lpd.c cmds.c cmdtab.c printjob.c \ 40 recvjob.c displayq.c rmjob.c startdaemon.c common.c printcap.c \ 41 lpdchar.c 42OBJS= ${L1OBJS} ${L2OBJS} ${L3OBJS} ${L4OBJS} ${L5OBJS} ${L6OBJS} ${L7OBJS} 43ALL= lpd lpr lpq lprm lpc lptest pac 44 45all: ${ALL} FILTERS 46 47lpd: ${L1OBJS} ${LIBC} 48 ${CC} -o $@ ${L1OBJS} 49 50lpr: ${L2OBJS} ${LIBC} 51 ${CC} -o $@ ${L2OBJS} 52 53lpq: ${L3OBJS} ${LIBC} 54 ${CC} -o $@ ${L3OBJS} 55 56lprm: ${L4OBJS} ${LIBC} 57 ${CC} -o $@ ${L4OBJS} 58 59lpc: ${L5OBJS} ${LIBC} 60 ${CC} -o $@ ${L5OBJS} 61 62lptest: ${L6OBJS} ${LIBC} 63 ${CC} ${CFLAGS} -o $@ ${L6OBJS} 64 65pac: ${L7OBJS} ${LIBC} 66 ${CC} -o $@ ${L7OBJS} 67 68FILTERS: 69 cd filters; make ${MFLAGS} 70 71clean: FRC 72 rm -f ${OBJS} core ${ALL} 73 cd filters; make ${MFLAGS} clean 74 75depend: FRC 76 mkdep ${CFLAGS} ${SRCS} 77 78install: FRC 79 install -s -o ${ROOT} -g ${SPGRP} -m 6711 lpd ${DESTDIR}/${LIBDIR}/lpd 80 install -s -o ${ROOT} -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr 81 install -s -o ${ROOT} -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq 82 install -s -o ${ROOT} -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm 83 install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/etc/lpc 84 install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest 85 install -s -o bin -g bin -m 755 pac ${DESTDIR}/etc/pac 86 /etc/chown ${DAEMON} ${DESTDIR}/${SPLDIR} 87 chgrp ${SPGRP} ${DESTDIR}/${SPLDIR} 88 chmod 775 ${DESTDIR}/${SPLDIR} 89 cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install 90 91lint: FRC 92 lint ${CFLAGS} ${L1SRCS} 93 lint ${CFLAGS} ${L2SRCS} 94 lint ${CFLAGS} ${L3SRCS} 95 lint ${CFLAGS} ${L4SRCS} 96 lint ${CFLAGS} ${L5SRCS} 97 lint ${CFLAGS} ${L6SRCS} 98 lint ${CFLAGS} ${L7SRCS} 99 100tags: FRC 101 ctags ${L1SRCS} 102 ctags -a ${L2SRCS} 103 ctags -a ${L3SRCS} 104 ctags -a ${L4SRCS} 105 ctags -a ${L5SRCS} 106 ctags -a ${L6SRCS} 107 ctags -a ${L7SRCS} 108 sort -o tags tags 109 110FRC: 111 112# DO NOT DELETE THIS LINE -- mkdep uses it. 113# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 114 115lpd.o: lpd.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 116lpd.o: /usr/include/sys/types.h /usr/include/signal.h 117lpd.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 118lpd.o: /usr/include/sys/dir.h /usr/include/sys/stat.h /usr/include/sys/socket.h 119lpd.o: /usr/include/sys/un.h /usr/include/netinet/in.h /usr/include/netdb.h 120lpd.o: /usr/include/pwd.h /usr/include/syslog.h /usr/include/signal.h 121lpd.o: /usr/include/sys/wait.h /usr/include/sgtty.h /usr/include/sys/ioctl.h 122lpd.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 123lpd.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 124lpd.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 125lpr.o: lpr.c /usr/include/stdio.h /usr/include/sys/types.h 126lpr.o: /usr/include/sys/file.h /usr/include/sys/stat.h /usr/include/pwd.h 127lpr.o: /usr/include/grp.h /usr/include/signal.h /usr/include/ctype.h 128lpr.o: /usr/include/syslog.h lp.local.h /usr/include/a.out.h 129lpr.o: /usr/include/sys/exec.h /usr/include/ar.h 130lpq.o: lpq.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 131lpq.o: /usr/include/sys/types.h /usr/include/signal.h 132lpq.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 133lpq.o: /usr/include/sys/dir.h /usr/include/sys/stat.h /usr/include/sys/socket.h 134lpq.o: /usr/include/sys/un.h /usr/include/netinet/in.h /usr/include/netdb.h 135lpq.o: /usr/include/pwd.h /usr/include/syslog.h /usr/include/signal.h 136lpq.o: /usr/include/sys/wait.h /usr/include/sgtty.h /usr/include/sys/ioctl.h 137lpq.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 138lpq.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 139lpq.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 140lprm.o: lprm.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 141lprm.o: /usr/include/sys/types.h /usr/include/signal.h 142lprm.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 143lprm.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 144lprm.o: /usr/include/sys/socket.h /usr/include/sys/un.h 145lprm.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 146lprm.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 147lprm.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 148lprm.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 149lprm.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 150lprm.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 151pac.o: pac.c /usr/include/stdio.h lp.local.h /usr/include/a.out.h 152pac.o: /usr/include/sys/exec.h /usr/include/ar.h 153lpd.o: lpd.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 154lpd.o: /usr/include/sys/types.h /usr/include/signal.h 155lpd.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 156lpd.o: /usr/include/sys/dir.h /usr/include/sys/stat.h /usr/include/sys/socket.h 157lpd.o: /usr/include/sys/un.h /usr/include/netinet/in.h /usr/include/netdb.h 158lpd.o: /usr/include/pwd.h /usr/include/syslog.h /usr/include/signal.h 159lpd.o: /usr/include/sys/wait.h /usr/include/sgtty.h /usr/include/sys/ioctl.h 160lpd.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 161lpd.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 162lpd.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 163cmds.o: cmds.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 164cmds.o: /usr/include/sys/types.h /usr/include/signal.h 165cmds.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 166cmds.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 167cmds.o: /usr/include/sys/socket.h /usr/include/sys/un.h 168cmds.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 169cmds.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 170cmds.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 171cmds.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 172cmds.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 173cmds.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 174cmds.o: /usr/include/sys/time.h /usr/include/time.h 175cmdtab.o: cmdtab.c lpc.h 176printjob.o: printjob.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 177printjob.o: /usr/include/sys/types.h /usr/include/signal.h 178printjob.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 179printjob.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 180printjob.o: /usr/include/sys/socket.h /usr/include/sys/un.h 181printjob.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 182printjob.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 183printjob.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 184printjob.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 185printjob.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 186printjob.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 187recvjob.o: recvjob.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 188recvjob.o: /usr/include/sys/types.h /usr/include/signal.h 189recvjob.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 190recvjob.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 191recvjob.o: /usr/include/sys/socket.h /usr/include/sys/un.h 192recvjob.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 193recvjob.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 194recvjob.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 195recvjob.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 196recvjob.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 197recvjob.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 198recvjob.o: /usr/include/sys/fs.h 199displayq.o: displayq.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 200displayq.o: /usr/include/sys/types.h /usr/include/signal.h 201displayq.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 202displayq.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 203displayq.o: /usr/include/sys/socket.h /usr/include/sys/un.h 204displayq.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 205displayq.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 206displayq.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 207displayq.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 208displayq.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 209displayq.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 210rmjob.o: rmjob.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 211rmjob.o: /usr/include/sys/types.h /usr/include/signal.h 212rmjob.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 213rmjob.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 214rmjob.o: /usr/include/sys/socket.h /usr/include/sys/un.h 215rmjob.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 216rmjob.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 217rmjob.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 218rmjob.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 219rmjob.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 220rmjob.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 221startdaemon.o: startdaemon.c /usr/include/stdio.h /usr/include/sys/types.h 222startdaemon.o: /usr/include/sys/socket.h /usr/include/sys/un.h lp.local.h 223startdaemon.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 224common.o: common.c lp.h /usr/include/stdio.h /usr/include/sys/param.h 225common.o: /usr/include/sys/types.h /usr/include/signal.h 226common.o: /usr/include/machine/machparam.h /usr/include/sys/file.h 227common.o: /usr/include/sys/dir.h /usr/include/sys/stat.h 228common.o: /usr/include/sys/socket.h /usr/include/sys/un.h 229common.o: /usr/include/netinet/in.h /usr/include/netdb.h /usr/include/pwd.h 230common.o: /usr/include/syslog.h /usr/include/signal.h /usr/include/sys/wait.h 231common.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h 232common.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h 233common.o: /usr/include/ctype.h /usr/include/errno.h lp.local.h 234common.o: /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/ar.h 235printcap.o: printcap.c /usr/include/ctype.h /usr/include/stdio.h 236lpdchar.o: lpdchar.c lp.local.h /usr/include/a.out.h /usr/include/sys/exec.h 237lpdchar.o: /usr/include/ar.h 238 239# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 240