add ~b documentation
[unix-history] / usr / src / usr.bin / uucp / Makefile
... / ...
CommitLineData
1# Makefile 5.10 85/09/18
2#
3# This version expects the 4.2BSD directory reading routines to
4# located in libc.a. If they aren't, augment LIBS. Also, LIBS
5# can be set to reference other object modules and libraries needed
6# by uucico, such as -lunet (needed when UNET is defined).
7#
8# Common object files are assembled into a library {uulib.a}
9#
10ALL= uucico uucp uux uuxqt uulog uuclean uuname uupoll uusnap \
11 uuencode uudecode uusend uucpd uuq acucntrl
12# Common object files placed in uulib.a
13COMMON= anlwrk.o anyread.o assert.o cfgets.o chkpth.o \
14 cpmv.o expfile.o gename.o getargs.o getprm.o \
15 getpwinfo.o gnamef.o gnxseq.o lastpart.o logent.o mailst.o \
16 prefix.o setline.o strpbrk.o subdir.o sysacct.o systat.o \
17 ulockf.o uucpname.o versys.o xqt.o uucpdefs.o
18SRCS= ${USRCS} ${OSRCS} ${LSRCS}
19USRCS= cico.c cntrl.c conn.c condevs.c gnsys.c pk0.c chksum.c pk1.c tio.c \
20 fio.c gio.c imsg.c
21OSRCS= uuclean.c uucp.c uulog.c uuname.c uupoll.c \
22 uusend.c uusnap.c uux.c uuxqt.c uuq.c acucntrl.c
23LSRCS= anlwrk.c anyread.c assert.c cfgets.c chkpth.c \
24 cpmv.c expfile.c \
25 gename.c getargs.c getprm.c getpwinfo.c \
26 gnamef.c gnxseq.c \
27 lastpart.c logent.c mailst.c prefix.c \
28 setline.c strpbrk.c subdir.c sysacct.c systat.c ulockf.c \
29 uucpdefs.c uucpname.c versys.c xqt.c
30
31#These might be useful on non 4.2bsd systems.
32MISC= htonl.c ioctl.c index.c mkdir.c getwd.c
33
34DESTDIR=
35
36OWNER= uucp
37GROUP= daemon
38CFLAGS= -O
39LDFLAGS=
40LINTFLAGS= -chbap
41LIBS=
42LIBDIR= ${DESTDIR}/usr/lib/uucp
43BIN= ${DESTDIR}/usr/bin
44PUBDIR= ${DESTDIR}/usr/spool/uucppublic
45SPOOL= ${DESTDIR}/usr/spool/uucp
46XQTDIR= ${SPOOL}/XTMP
47CORRUPT= ${SPOOL}/CORRUPT
48AUDIT= ${SPOOL}/AUDIT
49LCK= ${SPOOL}/LCK
50LOG= ${SPOOL}/LOG
51STST= ${SPOOL}/STST
52# The six subdirs {not counting XTMP}.
53HOSTNAME=`uuname -l | sed 's/\(.......\).*/\1/'`
54SUBDIRS=C. D.${HOSTNAME}X D.${HOSTNAME} D. X. TM.
55# for make depend
56UNDEF= -UNDIR -UUNET -USYSIII -UUNAME -UCCWHOAMI -UGETMYHNAME -UDATAKIT \
57 -DBSD4_2 -UUSG -UVMS -UBSD2_9
58
59all: ${ALL}
60
61lint: ${SRCS}
62 lint ${LINTFLAGS} ${USRCS} ${LSRCS}
63 -for i in ${OSRCS} ; do \
64 lint ${LINTFLAGS} $$i ${LSRCS} ;\
65 done
66print: $(SRCS)
67 vgrind $?
68 vgrind -x index
69 touch print
70
71uucp: uucp.o uulib.a
72 ${CC} -o uucp ${LDFLAGS} uucp.o uulib.a ${LIBS}
73
74uux: uux.o uulib.a
75 ${CC} -o uux ${LDFLAGS} uux.o uulib.a ${LIBS}
76
77uuxqt: uuxqt.o uulib.a
78 ${CC} -o uuxqt ${LDFLAGS} uuxqt.o uulib.a ${LIBS}
79
80uucico: cico.o cntrl.o conn.o condevs.o gnsys.o pk0.o chksum.o pk1.o tio.o \
81 fio.o gio.o imsg.o uulib.a aculib/aculib.a
82 ${CC} -o uucico ${LDFLAGS} cico.o cntrl.o conn.o condevs.o gnsys.o \
83 pk0.o chksum.o pk1.o tio.o fio.o gio.o imsg.o \
84 uulib.a aculib/aculib.a ${LIBS}
85
86uulog: uulog.o uulib.a
87 ${CC} -o uulog ${LDFLAGS} uulog.o uulib.a ${LIBS}
88
89uuclean: uuclean.o uulib.a
90 ${CC} -o uuclean ${LDFLAGS} uuclean.o uulib.a ${LIBS}
91
92uuname: uuname.o uulib.a
93 ${CC} -o uuname ${LDFLAGS} uuname.o uulib.a ${LIBS}
94
95uupoll: uupoll.o uulib.a
96 ${CC} -o uupoll ${LDFLAGS} uupoll.o uulib.a ${LIBS}
97
98uusnap: uusnap.o
99 ${CC} -o uusnap ${LDFLAGS} uusnap.o ${LIBS}
100
101uuencode: uuencode.o
102 ${CC} -o uuencode ${LDFLAGS} uuencode.o ${LIBS}
103
104uudecode: uudecode.o
105 ${CC} -o uudecode ${LDFLAGS} uudecode.o ${LIBS}
106
107uusend: uusend.o
108 ${CC} -o uusend ${LDFLAGS} uusend.o uulib.a ${LIBS}
109
110uucpd: uucpd.o uucp.h
111 ${CC} -o uucpd ${LDFLAGS} uucpd.o ${LIBS}
112
113uuq: uuq.o uulib.a
114 ${CC} -o uuq ${LDFLAGS} uuq.o uulib.a ${LIBS}
115
116acucntrl: acucntrl.o
117 ${CC} -o acucntrl ${LDFLAGS} acucntrl.o ${LIBS}
118
119# Note: mode 700 on ${LIBDIR} would be safer.
120# Also, L.sys etc should be 600.
121
122mkdirs:
123 -for i in ${LIBDIR} ${SPOOL} ${PUBDIR} ${XQTDIR} ${CORRUPT} \
124 ${AUDIT} ${LCK} ${LOG} ${STST} ; do \
125 rm -f $$i ; mkdir $$i ; \
126 chmod 755 $$i; /etc/chown ${OWNER} $$i; chgrp ${GROUP} $$i ; \
127 done
128 chmod 777 ${PUBDIR} ${LCK}
129 -cd ${LOG}; for i in uucico uux uuxqt uucp xferstats; do\
130 rm -f $$i ; mkdir $$i ; \
131 chmod 755 $$i; /etc/chown ${OWNER} $$i; chgrp ${GROUP} $$i ; \
132 done
133 -cd ${SPOOL}; for i in ${SUBDIRS} ; do \
134 mkdir $$i; \
135 /etc/chown ${OWNER} $$i; chgrp ${GROUP} $$i; chmod 755 $$i; \
136 done
137
138# The lorder...tsort below is for systems w/o ranlib
139# But it doesnt hurt to use it. Ignore the spurious "cycle" messages
140uulib.a: ${COMMON}
141 rm -f $@
142 ar cr $@ `lorder ${COMMON} | tsort`
143 ranlib $@
144
145aculib/aculib.a:
146 cd aculib; make ${MFLAGS} "CFLAGS=${CFLAGS}"
147
148install: ${ALL}
149 /etc/chown ${OWNER} ${LIBDIR}
150 chgrp ${GROUP} ${LIBDIR}
151 chmod 755 ${LIBDIR}
152 for i in uucico uuclean; do \
153 install -s -m 6111 -o ${OWNER} -g ${GROUP} $$i ${LIBDIR} ;\
154 done
155 for i in uucp uux uulog uuname uusnap uupoll uuq uusend; do \
156 install -s -m 6111 -o ${OWNER} -g ${GROUP} $$i ${BIN} ;\
157 done
158 rm -f ${BIN}/ruusend
159 ln ${BIN}/uusend ${BIN}/ruusend
160 install -s -m 6110 -o ${OWNER} -g ${GROUP} uuxqt ${LIBDIR}
161 install -s -m 6110 -o root -g ${GROUP} acucntrl ${LIBDIR}
162 install -s -m 500 -o uucp uucpd /etc/uucpd
163 @echo Dont forget to fork off /etc/uucpd in /etc/rc.local
164 @echo if you are not running /etc/inetd
165 install -s uuencode ${BIN}
166 install -s uudecode ${BIN}
167
168clean:
169 rm -f *.o ${ALL} uulib.a
170 cd aculib; make ${MFLAGS} clean
171
172depend:
173 for i in *.c; do \
174 (echo `basename $$i .c`.o: $$i >>makedep; \
175 unifdef ${UNDEF} $$i | \
176 /bin/grep '^#[ ]*include' | sed \
177 -e '/\.\.\/h/d' \
178 -e 's,<\(.*\)>,"/usr/include/\1",' \
179 -e 's/^[^"]*"\([^"]*\)".*/'"$$i"': \1/' \
180 -e 's/\.c/.o/' >>makedep); done
181 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
182 echo '$$r makedep' >>eddep
183 echo 'w' >>eddep
184 cp Makefile Makefile.bak
185 ed - Makefile < eddep
186 rm eddep makedep
187 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
188 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
189 echo '# see make depend above' >> Makefile
190
191# DO NOT DELETE THIS LINE -- make depend uses it
192# DEPENDENCIES MUST END AT END OF FILE
193acucntrl.o: acucntrl.c
194acucntrl.o: uucp.h
195acucntrl.o: /usr/include/sys/buf.h
196acucntrl.o: /usr/include/signal.h
197acucntrl.o: /usr/include/sys/conf.h
198acucntrl.o: /usr/include/vaxuba/ubavar.h
199acucntrl.o: /usr/include/sys/stat.h
200acucntrl.o: /usr/include/nlist.h
201acucntrl.o: /usr/include/sgtty.h
202acucntrl.o: /usr/include/utmp.h
203acucntrl.o: /usr/include/pwd.h
204acucntrl.o: /usr/include/stdio.h
205anlwrk.o: anlwrk.c
206anlwrk.o: uucp.h
207anlwrk.o: /usr/include/sys/stat.h
208anlwrk.o: uust.h
209anlwrk.o: /usr/include/sys/dir.h
210anlwrk.o: /usr/include/ctype.h
211anyread.o: anyread.c
212anyread.o: uucp.h
213anyread.o: /usr/include/sys/stat.h
214assert.o: assert.c
215assert.o: uucp.h
216assert.o: /usr/include/sys/time.h
217assert.o: /usr/include/errno.h
218cfgets.o: cfgets.c
219cfgets.o: /usr/include/stdio.h
220chkpth.o: chkpth.c
221chkpth.o: uucp.h
222chkpth.o: /usr/include/sys/stat.h
223chksum.o: chksum.c
224cico.o: cico.c
225cico.o: /usr/include/signal.h
226cico.o: uucp.h
227cico.o: /usr/include/setjmp.h
228cico.o: /usr/include/sgtty.h
229cico.o: /usr/include/netdb.h
230cico.o: /usr/include/netinet/in.h
231cico.o: /usr/include/sys/socket.h
232cico.o: /usr/include/sys/stat.h
233cico.o: uust.h
234cico.o: uusub.h
235cntrl.o: cntrl.c
236cntrl.o: uucp.h
237cntrl.o: /usr/include/sys/stat.h
238cntrl.o: uust.h
239condevs.o: condevs.c
240condevs.o: condevs.h
241condevs.o: /usr/include/sys/time.h
242conn.o: conn.c
243conn.o: /usr/include/signal.h
244conn.o: uucp.h
245conn.o: /usr/include/setjmp.h
246conn.o: /usr/include/ctype.h
247conn.o: /usr/include/errno.h
248conn.o: /usr/include/sgtty.h
249conn.o: /usr/include/sys/time.h
250cpmv.o: cpmv.c
251cpmv.o: uucp.h
252cpmv.o: /usr/include/sys/stat.h
253expfile.o: expfile.c
254expfile.o: uucp.h
255expfile.o: /usr/include/sys/stat.h
256fio.o: fio.c
257fio.o: /usr/include/signal.h
258fio.o: uucp.h
259fio.o: /usr/include/sgtty.h
260fio.o: /usr/include/setjmp.h
261gename.o: gename.c
262gename.o: uucp.h
263getargs.o: getargs.c
264getargs.o: uucp.h
265getprm.o: getprm.c
266getprm.o: uucp.h
267getpwinfo.o: getpwinfo.c
268getpwinfo.o: uucp.h
269getpwinfo.o: /usr/include/pwd.h
270getwd.o: getwd.c
271getwd.o: uucp.h
272gio.o: gio.c
273gio.o: uucp.h
274gio.o: pk.h
275gio.o: /usr/include/setjmp.h
276gnamef.o: gnamef.c
277gnamef.o: uucp.h
278gnamef.o: /usr/include/sys/dir.h
279gnsys.o: gnsys.c
280gnsys.o: uucp.h
281gnsys.o: /usr/include/sys/dir.h
282gnxseq.o: gnxseq.c
283gnxseq.o: uucp.h
284gnxseq.o: /usr/include/sys/time.h
285imsg.o: imsg.c
286imsg.o: uucp.h
287index.o: index.c
288index.o: /usr/include/stdio.h
289ioctl.o: ioctl.c
290ioctl.o: uucp.h
291ioctl.o: /usr/include/sgtty.h
292lastpart.o: lastpart.c
293lastpart.o: uucp.h
294logent.o: logent.c
295logent.o: uucp.h
296logent.o: /usr/include/sys/time.h
297logent.o: /usr/include/fcntl.h
298logent.o: /usr/include/sgtty.h
299mailst.o: mailst.c
300mailst.o: /usr/include/signal.h
301mailst.o: uucp.h
302mkdir.o: mkdir.c
303pk0.o: pk0.c
304pk0.o: uucp.h
305pk0.o: pk.h
306pk1.o: pk1.c
307pk1.o: /usr/include/signal.h
308pk1.o: uucp.h
309pk1.o: pk.h
310pk1.o: /usr/include/setjmp.h
311pk1.o: /usr/include/sys/time.h
312prefix.o: prefix.c
313setline.o: setline.c
314setline.o: uucp.h
315strpbrk.o: strpbrk.c
316subdir.o: subdir.c
317subdir.o: uucp.h
318sysacct.o: sysacct.c
319sysacct.o: /usr/include/sys/types.h
320systat.o: systat.c
321systat.o: uucp.h
322tio.o: tio.c
323tio.o: /usr/include/signal.h
324tio.o: uucp.h
325tio.o: /usr/include/setjmp.h
326tio.o: /usr/include/sys/stat.h
327ulockf.o: ulockf.c
328ulockf.o: uucp.h
329ulockf.o: /usr/include/sys/stat.h
330uuclean.o: uuclean.c
331uuclean.o: /usr/include/signal.h
332uuclean.o: uucp.h
333uuclean.o: /usr/include/pwd.h
334uuclean.o: /usr/include/sys/stat.h
335uuclean.o: /usr/include/sys/dir.h
336uucp.o: uucp.c
337uucp.o: uucp.h
338uucp.o: /usr/include/sys/stat.h
339uucp.o: uust.h
340uucpd.o: uucpd.c
341uucpd.o: uucp.h
342uucpd.o: /usr/include/netdb.h
343uucpd.o: /usr/include/signal.h
344uucpd.o: /usr/include/errno.h
345uucpd.o: /usr/include/sys/socket.h
346uucpd.o: /usr/include/netinet/in.h
347uucpd.o: /usr/include/sys/wait.h
348uucpd.o: /usr/include/sys/ioctl.h
349uucpd.o: /usr/include/pwd.h
350uucpd.o: /usr/include/lastlog.h
351uucpd.o: /usr/include/utmp.h
352uucpd.o: /usr/include/fcntl.h
353uucpdefs.o: uucpdefs.c
354uucpdefs.o: uucp.h
355uucpname.o: uucpname.c
356uucpname.o: uucp.h
357uucpname.o: /usr/include/sys/stat.h
358uudecode.o: uudecode.c
359uudecode.o: /usr/include/stdio.h
360uudecode.o: /usr/include/pwd.h
361uudecode.o: /usr/include/sys/types.h
362uudecode.o: /usr/include/sys/stat.h
363uuencode.o: uuencode.c
364uuencode.o: /usr/include/stdio.h
365uuencode.o: /usr/include/sys/types.h
366uuencode.o: /usr/include/sys/stat.h
367uulog.o: uulog.c
368uulog.o: uucp.h
369uuname.o: uuname.c
370uuname.o: uucp.h
371uuname.o: /usr/include/signal.h
372uupoll.o: uupoll.c
373uupoll.o: uucp.h
374uuq.o: uuq.c
375uuq.o: uucp.h
376uuq.o: /usr/include/stdio.h
377uuq.o: /usr/include/sys/dir.h
378uuq.o: /usr/include/sys/stat.h
379uusend.o: uusend.c
380uusend.o: /usr/include/stdio.h
381uusend.o: /usr/include/pwd.h
382uusend.o: /usr/include/sys/types.h
383uusend.o: /usr/include/sys/stat.h
384uusnap.o: uusnap.c
385uusnap.o: uucp.h
386uusnap.o: /usr/include/sys/stat.h
387uusnap.o: /usr/include/sys/dir.h
388uusnap.o: /usr/include/ctype.h
389uux.o: uux.c
390uux.o: uucp.h
391uuxqt.o: uuxqt.c
392uuxqt.o: uucp.h
393uuxqt.o: /usr/include/sys/stat.h
394uuxqt.o: /usr/include/sys/dir.h
395uuxqt.o: /usr/include/signal.h
396versys.o: versys.c
397versys.o: uucp.h
398versys.o: /usr/include/stdio.h
399versys.o: /usr/include/ctype.h
400xqt.o: xqt.c
401xqt.o: /usr/include/signal.h
402xqt.o: uucp.h
403# DEPENDENCIES MUST END AT END OF FILE
404# IF YOU PUT STUFF HERE IT WILL GO AWAY
405# see make depend above