Commit | Line | Data |
---|---|---|
d0aeaf5a | 1 | # |
a096d51a | 2 | # Copyright (c) 1987 Regents of the University of California. |
9d85c861 | 3 | # All rights reserved. |
d0aeaf5a | 4 | # |
9d85c861 | 5 | # Redistribution and use in source and binary forms are permitted |
a399f6c8 KB |
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. | |
9d85c861 | 16 | # |
e3419641 | 17 | # @(#)Makefile 5.10 (Berkeley) 9/29/88 |
23b5fe52 | 18 | # |
dfc1084e | 19 | # Ownerships {see note at the top of lpd.c} |
23b5fe52 BJ |
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 | # | |
a096d51a KB |
24 | CFLAGS= -O |
25 | LIBDIR= /usr/lib | |
26 | BINDIR= /usr/ucb | |
27 | SPLDIR= /usr/spool/lpd | |
a096d51a KB |
28 | DAEMON= daemon |
29 | SPGRP= daemon | |
30 | LIBC= /lib/libc.a | |
31 | L1SRCS= lpd.c printjob.c recvjob.c displayq.c rmjob.c startdaemon.c \ | |
32 | lpdchar.c common.c printcap.c | |
33 | L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ | |
34 | lpdchar.o common.o printcap.o | |
35 | L2SRCS= lpr.c startdaemon.c printcap.c | |
36 | L2OBJS= lpr.o startdaemon.o printcap.o | |
37 | L3SRCS= lpq.c displayq.c common.c printcap.c | |
38 | L3OBJS= lpq.o displayq.o common.o printcap.o | |
39 | L4SRCS= lprm.c rmjob.c startdaemon.c common.c printcap.c | |
40 | L4OBJS= lprm.o rmjob.o startdaemon.o common.o printcap.o | |
41 | L5SRCS= lpc.c cmds.c cmdtab.c startdaemon.c common.c printcap.c | |
42 | L5OBJS= lpc.o cmds.o cmdtab.o startdaemon.o common.o printcap.o | |
43 | L6SRCS= lptest.c | |
44 | L6OBJS= lptest.o | |
45 | L7SRCS= pac.c printcap.c | |
46 | L7OBJS= pac.o printcap.o | |
47 | SRCS= 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 | |
50 | OBJS= ${L1OBJS} ${L2OBJS} ${L3OBJS} ${L4OBJS} ${L5OBJS} ${L6OBJS} ${L7OBJS} | |
7b9555fa KB |
51 | MAN1= lpq.0 lpr.0 lprm.0 lptest.0 |
52 | MAN8= lpc.0 lpd.0 pac.0 | |
53 | MAN= ${MAN1} ${MAN8} | |
511e7d02 | 54 | ALL= lpd lpr lpq lprm lpc lptest pac |
23b5fe52 | 55 | |
7b9555fa | 56 | all: ${ALL} FILTERS VFILTERS |
23b5fe52 | 57 | |
7b9555fa | 58 | lpd: ${L1OBJS} ${LIBC} |
a096d51a | 59 | ${CC} -o $@ ${L1OBJS} |
23b5fe52 | 60 | |
7b9555fa | 61 | lpr: ${L2OBJS} ${LIBC} |
a096d51a | 62 | ${CC} -o $@ ${L2OBJS} |
23b5fe52 | 63 | |
7b9555fa | 64 | lpq: ${L3OBJS} ${LIBC} |
a096d51a | 65 | ${CC} -o $@ ${L3OBJS} |
23b5fe52 | 66 | |
7b9555fa | 67 | lprm: ${L4OBJS} ${LIBC} |
a096d51a | 68 | ${CC} -o $@ ${L4OBJS} |
84ee0e94 | 69 | |
7b9555fa | 70 | lpc: ${L5OBJS} ${LIBC} |
a096d51a | 71 | ${CC} -o $@ ${L5OBJS} |
dfc1084e | 72 | |
a096d51a KB |
73 | lptest: ${L6OBJS} ${LIBC} |
74 | ${CC} ${CFLAGS} -o $@ ${L6OBJS} | |
511e7d02 | 75 | |
a096d51a KB |
76 | pac: ${L7OBJS} ${LIBC} |
77 | ${CC} -o $@ ${L7OBJS} | |
fdaeefb7 | 78 | |
c32a6a12 BJ |
79 | FILTERS: |
80 | cd filters; make ${MFLAGS} | |
81 | ||
20eaf556 KB |
82 | VFILTERS: |
83 | cd vfilters; make ${MFLAGS} | |
84 | ||
7b9555fa | 85 | clean: |
a096d51a KB |
86 | rm -f ${OBJS} core ${ALL} |
87 | cd filters; make ${MFLAGS} clean | |
20eaf556 | 88 | cd vfilters; make ${MFLAGS} clean |
a096d51a | 89 | |
7b9555fa KB |
90 | cleandir: clean |
91 | rm -f ${MAN} tags .depend | |
92 | cd filters; make ${MFLAGS} clean | |
93 | cd vfilters; make ${MFLAGS} clean | |
94 | ||
95 | depend: ${SRCS} | |
a096d51a | 96 | mkdep ${CFLAGS} ${SRCS} |
20eaf556 KB |
97 | cd filters; make ${MFLAGS} depend |
98 | cd vfilters; make ${MFLAGS} depend | |
a096d51a | 99 | |
7b9555fa KB |
100 | install: ${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 | |
a096d51a KB |
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} | |
7b9555fa KB |
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 | |
818256af | 113 | cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install |
20eaf556 | 114 | cd vfilters; make ${MFLAGS} DESTDIR=${DESTDIR} install |
23b5fe52 | 115 | |
7b9555fa | 116 | lint: ${SRCS} |
a096d51a KB |
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 | ||
7b9555fa | 125 | tags: ${SRCS} |
a096d51a KB |
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 |