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