1 | # $Source: /afs/dev.mit.edu/source/repository/athena/bin/lpr/Makefile,v $ |
---|
2 | # $Author: epeisach $ |
---|
3 | # $Locker: $ |
---|
4 | # $Header: /afs/dev.mit.edu/source/repository/athena/bin/lpr/Makefile,v 1.17 1990-11-16 15:07:52 epeisach Exp $ |
---|
5 | # |
---|
6 | # |
---|
7 | # Copyright (c) 1983 Regents of the University of California. |
---|
8 | # All rights reserved. The Berkeley software License Agreement |
---|
9 | # specifies the terms and conditions for redistribution. |
---|
10 | # |
---|
11 | # @(#)Makefile 5.3 (Berkeley) 5/7/86 |
---|
12 | # |
---|
13 | # makefile for line printer spooling system |
---|
14 | # |
---|
15 | # Ownerships {see note at the top of lpd.c} |
---|
16 | # ROOT a user that can access any and all files |
---|
17 | # DAEMON someone special |
---|
18 | # SPGRP the group id of the spooling programs |
---|
19 | # |
---|
20 | DESTDIR= |
---|
21 | |
---|
22 | CFLAGS=-O -DVFS -DHESIOD -DKERBEROS -DZEPHYR -DPQUOTA -DLACL `./cppflags` -Iquota |
---|
23 | LIBS= -L/usr/athena/lib -lhesiod -lzephyr -lcom_err -lkrb -ldes `./libflags` |
---|
24 | LIBDIR=/usr/lib |
---|
25 | BINDIR=/usr/ucb |
---|
26 | SPOOLDIR=/usr/spool/lpd |
---|
27 | CXREF=/usr/ucb/ctags -x |
---|
28 | ROOT=root |
---|
29 | DAEMON=daemon |
---|
30 | SPGRP=daemon |
---|
31 | OPERATOR=OPERATOR |
---|
32 | LN=ln -s |
---|
33 | CC=cc |
---|
34 | |
---|
35 | # OP_GID is the group ID for group operator |
---|
36 | OP_GID = 28 |
---|
37 | SRCS= lpd.c lpr.c lpq.c lprm.c pac.c lpd.c cmds.c cmdtab.c \ |
---|
38 | printjob.c recvjob.c displayq.c rmjob.c \ |
---|
39 | startdaemon.c common.c printcap.c lpdchar.c tcp_conn.c |
---|
40 | |
---|
41 | ALL= cppflags libflags lpd lpc lptest pac o_lprm o_lpc lpr \ |
---|
42 | lpq lprm s_lpq s_lprm s_lpr |
---|
43 | |
---|
44 | SUBDIR=quota transcript-v2.1 man |
---|
45 | all: ${ALL} FILTERS ${SUBDIR} |
---|
46 | |
---|
47 | ${SUBDIR}: FRC |
---|
48 | cd $@; make ${MFLAGS} Makefile; make ${MFLAGS} CC=${CC} all; cd .. |
---|
49 | |
---|
50 | FRC: |
---|
51 | |
---|
52 | saber_lpr: |
---|
53 | #load $(CFLAGS) lpr.c netsend.c common.c printcap.c ${LIBS} |
---|
54 | |
---|
55 | lpd: lpd.o printjob.o recvjob.o s_displayq.o s_rmjob.o |
---|
56 | lpd: lpdchar.o s_common.o printcap.o tcp_conn.o |
---|
57 | ${CC} -o lpd lpd.o printjob.o recvjob.o s_displayq.o s_rmjob.o \ |
---|
58 | lpdchar.o s_common.o printcap.o tcp_conn.o ${LIBS} |
---|
59 | |
---|
60 | cppflags: cppflags.c |
---|
61 | ${CC} -o cppflags cppflags.c |
---|
62 | |
---|
63 | libflags: libflags.c |
---|
64 | ${CC} -o libflags libflags.c |
---|
65 | |
---|
66 | s_rmjob.c: rmjob.c |
---|
67 | rm -f s_rmjob.c |
---|
68 | $(LN) rmjob.c s_rmjob.c |
---|
69 | |
---|
70 | s_rmjob.o: s_rmjob.c lp.h lp.local.h |
---|
71 | ${CC} ${CFLAGS} -c -DSERVER s_rmjob.c |
---|
72 | |
---|
73 | s_common.c: common.c |
---|
74 | rm -f s_common.c |
---|
75 | $(LN) common.c s_common.c |
---|
76 | |
---|
77 | s_common.o: lp.h lp.local.h s_common.c |
---|
78 | ${CC} ${CFLAGS} -c -DSERVER s_common.c |
---|
79 | |
---|
80 | s_lpr.c: lpr.c |
---|
81 | rm -f s_lpr.c |
---|
82 | $(LN) lpr.c s_lpr.c |
---|
83 | |
---|
84 | s_lpr.o: s_lpr.c lp.h lp.local.h |
---|
85 | $(CC) ${CFLAGS} -c -DSERVER s_lpr.c |
---|
86 | |
---|
87 | s_lpq.c: lpq.c |
---|
88 | rm -f s_lpq.c |
---|
89 | $(LN) lpq.c s_lpq.c |
---|
90 | |
---|
91 | s_lpq.o: s_lpq.c lp.h lp.local.h |
---|
92 | $(CC) ${CFLAGS} -c -DSERVER s_lpq.c |
---|
93 | |
---|
94 | s_lprm.c: lprm.c |
---|
95 | rm -f s_lprm.c |
---|
96 | $(LN) lprm.c s_lprm.c |
---|
97 | |
---|
98 | s_lprm.o: s_lprm.c lp.h lp.local.h |
---|
99 | $(CC) ${CFLAGS} -c -DSERVER s_lprm.c |
---|
100 | |
---|
101 | lpd.o: lpd.c |
---|
102 | ${CC} -c ${CFLAGS} -Dws lpd.c |
---|
103 | |
---|
104 | lpr: lpr.o printcap.o netsend.o common.o |
---|
105 | ${CC} -o lpr lpr.o printcap.o common.o netsend.o ${LIBS} |
---|
106 | |
---|
107 | s_lpr: s_lpr.o startdaemon.o printcap.o |
---|
108 | ${CC} -o s_lpr s_lpr.o startdaemon.o printcap.o ${LIBS} |
---|
109 | |
---|
110 | lpq: lpq.o displayq.o common.o printcap.o |
---|
111 | ${CC} -o lpq lpq.o displayq.o common.o printcap.o -ltermcap ${LIBS} |
---|
112 | |
---|
113 | s_lpq: s_lpq.o s_displayq.o s_common.o printcap.o startdaemon.o |
---|
114 | ${CC} -o s_lpq s_lpq.o s_displayq.o s_common.o startdaemon.o \ |
---|
115 | printcap.o -ltermcap ${LIBS} |
---|
116 | |
---|
117 | lprm: lprm.o rmjob.o common.o printcap.o |
---|
118 | ${CC} -o lprm lprm.o rmjob.o common.o printcap.o ${LIBS} |
---|
119 | |
---|
120 | s_lprm: s_lprm.o s_rmjob.o startdaemon.o s_common.o printcap.o |
---|
121 | ${CC} -o s_lprm s_lprm.o s_rmjob.o startdaemon.o s_common.o \ |
---|
122 | printcap.o ${LIBS} |
---|
123 | |
---|
124 | o_lprm: o_lprm.o s_rmjob.o startdaemon.o s_common.o printcap.o |
---|
125 | ${CC} -o o_lprm o_lprm.o s_rmjob.o startdaemon.o s_common.o \ |
---|
126 | printcap.o ${LIBS} |
---|
127 | |
---|
128 | lpc: lpc.o cmds.o cmdtab.o startdaemon.o s_common.o printcap.o |
---|
129 | ${CC} -o lpc lpc.o cmds.o cmdtab.o startdaemon.o s_common.o \ |
---|
130 | printcap.o ${LIBS} |
---|
131 | |
---|
132 | o_lpc: o_lpc.o cmds.o cmdtab.o startdaemon.o s_common.o printcap.o |
---|
133 | ${CC} -o o_lpc o_lpc.o cmds.o cmdtab.o startdaemon.o s_common.o \ |
---|
134 | printcap.o ${LIBS} |
---|
135 | |
---|
136 | lptest: lptest.c |
---|
137 | ${CC} ${CFLAGS} -o lptest lptest.c |
---|
138 | |
---|
139 | pac: pac.o printcap.o |
---|
140 | ${CC} -o pac pac.o printcap.o ${LIBS} |
---|
141 | |
---|
142 | o_lprm.o: lp.h lp.local.h |
---|
143 | rm -f o_lprm.c |
---|
144 | $(LN) lprm.c o_lprm.c |
---|
145 | ${CC} ${CFLAGS} -c -D${OPERATOR} o_lprm.c |
---|
146 | |
---|
147 | o_lpc.o: lp.h lp.local.h |
---|
148 | rm -f o_lpc.c |
---|
149 | $(LN) lpc.c o_lpc.c |
---|
150 | ${CC} ${CFLAGS} -c -D${OPERATOR} o_lpc.c |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | lpd.o lpr.o lpq.o lprm.o o_lprm.o pac.o: lp.h lp.local.h |
---|
155 | recvjob.o printjob.o displayq.o rmjob.o common.o: lp.h lp.local.h |
---|
156 | startdaemon.o: lp.local.h |
---|
157 | lpc.o o_lpc.o cmdtab.o: lpc.h |
---|
158 | cmds.o: lp.h lp.local.h |
---|
159 | |
---|
160 | FILTERS: |
---|
161 | cd filters; make Makefile ; make ${MFLAGS} |
---|
162 | |
---|
163 | install: |
---|
164 | -for i in lpr lpq lprm; do \ |
---|
165 | install -c -s -o root -g ${SPGRP} -m 6755 $$i \ |
---|
166 | ${DESTDIR}/${BINDIR}/$$i; \ |
---|
167 | done |
---|
168 | -rm -f ${DESTDIR}/${BINDIR}/lpr.ucb |
---|
169 | -ln -s lpr ${DESTDIR}/${BINDIR}/lpr.ucb |
---|
170 | -for i in ${SUBDIR}; do \ |
---|
171 | (cd $$i; make ${MFLAGS} CC=${CC} DESTDIR=${DESTDIR} install; cd ..); \ |
---|
172 | done |
---|
173 | # install -c -m 444 printcap ${DESTDIR}/etc/printcap |
---|
174 | install -c -s -o root -g ${SPGRP} -m 6755 lpd ${DESTDIR}/${LIBDIR}/ |
---|
175 | install -c -s -o root -g ${SPGRP} -m 6755 s_lpr ${DESTDIR}/${BINDIR}/ |
---|
176 | install -c -s -o root -g ${SPGRP} -m 6755 s_lpq ${DESTDIR}/${BINDIR}/ |
---|
177 | install -c -s -o root -g ${SPGRP} -m 6755 s_lprm ${DESTDIR}/${BINDIR}/ |
---|
178 | # install -c -s -o root -g ${OP_GID} -m 6754 o_lprm ${DESTDIR}/usr/etc/ |
---|
179 | install -c -s -g ${SPGRP} -m 2755 lpc ${DESTDIR}/usr/etc/ |
---|
180 | # install -c -s -o root -g ${OP_GID} -m 6754 o_lpc ${DESTDIR}/usr/etc/ |
---|
181 | install -c -s lptest ${DESTDIR}/${BINDIR}/lptest |
---|
182 | install -c -s pac ${DESTDIR}/usr/etc/pac |
---|
183 | install -c print.sh ${DESTDIR}/usr/ucb/print |
---|
184 | install -c -m 755 makespools ${DESTDIR}/etc |
---|
185 | |
---|
186 | @echo To build spooling directories: |
---|
187 | @echo makespools ${DESTDIR} 775 ${DAEMON} ${SPGRP} |
---|
188 | |
---|
189 | # chown ${DAEMON} ${DESTDIR}/${SPOOLDIR} |
---|
190 | # chgrp ${SPGRP} ${DESTDIR}/${SPOOLDIR} |
---|
191 | # chmod 775 ${DESTDIR}/${SPOOLDIR} |
---|
192 | cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install |
---|
193 | |
---|
194 | clean: |
---|
195 | rm -f ${ALL} *.o *~ |
---|
196 | cd filters; make ${MFLAGS} clean |
---|
197 | for i in ${SUBDIR}; do \ |
---|
198 | (cd $$i; make ${MFLAGS} clean; cd ..); \ |
---|
199 | done |
---|
200 | |
---|
201 | print: |
---|
202 | @pr makefile |
---|
203 | @${CXREF} *.c | pr -h XREF |
---|
204 | @pr *.h *.c |
---|
205 | |
---|
206 | depend: |
---|
207 | touch Make.depend; mkdep -fMake.depend ${CFLAGS} ${SRCS} |
---|
208 | for i in ${SUBDIR}; do \ |
---|
209 | (cd $$i; make ${MFLAGS} CC=${CC} depend; cd ..); \ |
---|
210 | done |
---|