| 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 | # |
| 10 | ALL= uucico uucp uux uuxqt uulog uuclean uuname uupoll uusnap \ |
| 11 | uuencode uudecode uusend uucpd uuq acucntrl |
| 12 | # Common object files placed in uulib.a |
| 13 | COMMON= 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 |
| 18 | SRCS= ${USRCS} ${OSRCS} ${LSRCS} |
| 19 | USRCS= 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 |
| 21 | OSRCS= uuclean.c uucp.c uulog.c uuname.c uupoll.c \ |
| 22 | uusend.c uusnap.c uux.c uuxqt.c uuq.c acucntrl.c |
| 23 | LSRCS= 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. |
| 32 | MISC= htonl.c ioctl.c index.c mkdir.c getwd.c |
| 33 | |
| 34 | DESTDIR= |
| 35 | |
| 36 | OWNER= uucp |
| 37 | GROUP= daemon |
| 38 | CFLAGS= -O |
| 39 | LDFLAGS= |
| 40 | LINTFLAGS= -chbap |
| 41 | LIBS= |
| 42 | LIBDIR= ${DESTDIR}/usr/lib/uucp |
| 43 | BIN= ${DESTDIR}/usr/bin |
| 44 | PUBDIR= ${DESTDIR}/usr/spool/uucppublic |
| 45 | SPOOL= ${DESTDIR}/usr/spool/uucp |
| 46 | XQTDIR= ${SPOOL}/XTMP |
| 47 | CORRUPT= ${SPOOL}/CORRUPT |
| 48 | AUDIT= ${SPOOL}/AUDIT |
| 49 | LCK= ${SPOOL}/LCK |
| 50 | LOG= ${SPOOL}/LOG |
| 51 | STST= ${SPOOL}/STST |
| 52 | # The six subdirs {not counting XTMP}. |
| 53 | HOSTNAME=`uuname -l | sed 's/\(.......\).*/\1/'` |
| 54 | SUBDIRS=C. D.${HOSTNAME}X D.${HOSTNAME} D. X. TM. |
| 55 | # for make depend |
| 56 | UNDEF= -UNDIR -UUNET -USYSIII -UUNAME -UCCWHOAMI -UGETMYHNAME -UDATAKIT \ |
| 57 | -DBSD4_2 -UUSG -UVMS -UBSD2_9 |
| 58 | |
| 59 | all: ${ALL} |
| 60 | |
| 61 | lint: ${SRCS} |
| 62 | lint ${LINTFLAGS} ${USRCS} ${LSRCS} |
| 63 | -for i in ${OSRCS} ; do \ |
| 64 | lint ${LINTFLAGS} $$i ${LSRCS} ;\ |
| 65 | done |
| 66 | print: $(SRCS) |
| 67 | vgrind $? |
| 68 | vgrind -x index |
| 69 | touch print |
| 70 | |
| 71 | uucp: uucp.o uulib.a |
| 72 | ${CC} -o uucp ${LDFLAGS} uucp.o uulib.a ${LIBS} |
| 73 | |
| 74 | uux: uux.o uulib.a |
| 75 | ${CC} -o uux ${LDFLAGS} uux.o uulib.a ${LIBS} |
| 76 | |
| 77 | uuxqt: uuxqt.o uulib.a |
| 78 | ${CC} -o uuxqt ${LDFLAGS} uuxqt.o uulib.a ${LIBS} |
| 79 | |
| 80 | uucico: 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 | |
| 86 | uulog: uulog.o uulib.a |
| 87 | ${CC} -o uulog ${LDFLAGS} uulog.o uulib.a ${LIBS} |
| 88 | |
| 89 | uuclean: uuclean.o uulib.a |
| 90 | ${CC} -o uuclean ${LDFLAGS} uuclean.o uulib.a ${LIBS} |
| 91 | |
| 92 | uuname: uuname.o uulib.a |
| 93 | ${CC} -o uuname ${LDFLAGS} uuname.o uulib.a ${LIBS} |
| 94 | |
| 95 | uupoll: uupoll.o uulib.a |
| 96 | ${CC} -o uupoll ${LDFLAGS} uupoll.o uulib.a ${LIBS} |
| 97 | |
| 98 | uusnap: uusnap.o |
| 99 | ${CC} -o uusnap ${LDFLAGS} uusnap.o ${LIBS} |
| 100 | |
| 101 | uuencode: uuencode.o |
| 102 | ${CC} -o uuencode ${LDFLAGS} uuencode.o ${LIBS} |
| 103 | |
| 104 | uudecode: uudecode.o |
| 105 | ${CC} -o uudecode ${LDFLAGS} uudecode.o ${LIBS} |
| 106 | |
| 107 | uusend: uusend.o |
| 108 | ${CC} -o uusend ${LDFLAGS} uusend.o uulib.a ${LIBS} |
| 109 | |
| 110 | uucpd: uucpd.o uucp.h |
| 111 | ${CC} -o uucpd ${LDFLAGS} uucpd.o ${LIBS} |
| 112 | |
| 113 | uuq: uuq.o uulib.a |
| 114 | ${CC} -o uuq ${LDFLAGS} uuq.o uulib.a ${LIBS} |
| 115 | |
| 116 | acucntrl: 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 | |
| 122 | mkdirs: |
| 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 |
| 140 | uulib.a: ${COMMON} |
| 141 | rm -f $@ |
| 142 | ar cr $@ `lorder ${COMMON} | tsort` |
| 143 | ranlib $@ |
| 144 | |
| 145 | aculib/aculib.a: |
| 146 | cd aculib; make ${MFLAGS} "CFLAGS=${CFLAGS}" |
| 147 | |
| 148 | install: ${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 | |
| 168 | clean: |
| 169 | rm -f *.o ${ALL} uulib.a |
| 170 | cd aculib; make ${MFLAGS} clean |
| 171 | |
| 172 | depend: |
| 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 |
| 193 | acucntrl.o: acucntrl.c |
| 194 | acucntrl.o: uucp.h |
| 195 | acucntrl.o: /usr/include/sys/buf.h |
| 196 | acucntrl.o: /usr/include/signal.h |
| 197 | acucntrl.o: /usr/include/sys/conf.h |
| 198 | acucntrl.o: /usr/include/vaxuba/ubavar.h |
| 199 | acucntrl.o: /usr/include/sys/stat.h |
| 200 | acucntrl.o: /usr/include/nlist.h |
| 201 | acucntrl.o: /usr/include/sgtty.h |
| 202 | acucntrl.o: /usr/include/utmp.h |
| 203 | acucntrl.o: /usr/include/pwd.h |
| 204 | acucntrl.o: /usr/include/stdio.h |
| 205 | anlwrk.o: anlwrk.c |
| 206 | anlwrk.o: uucp.h |
| 207 | anlwrk.o: /usr/include/sys/stat.h |
| 208 | anlwrk.o: uust.h |
| 209 | anlwrk.o: /usr/include/sys/dir.h |
| 210 | anlwrk.o: /usr/include/ctype.h |
| 211 | anyread.o: anyread.c |
| 212 | anyread.o: uucp.h |
| 213 | anyread.o: /usr/include/sys/stat.h |
| 214 | assert.o: assert.c |
| 215 | assert.o: uucp.h |
| 216 | assert.o: /usr/include/sys/time.h |
| 217 | assert.o: /usr/include/errno.h |
| 218 | cfgets.o: cfgets.c |
| 219 | cfgets.o: /usr/include/stdio.h |
| 220 | chkpth.o: chkpth.c |
| 221 | chkpth.o: uucp.h |
| 222 | chkpth.o: /usr/include/sys/stat.h |
| 223 | chksum.o: chksum.c |
| 224 | cico.o: cico.c |
| 225 | cico.o: /usr/include/signal.h |
| 226 | cico.o: uucp.h |
| 227 | cico.o: /usr/include/setjmp.h |
| 228 | cico.o: /usr/include/sgtty.h |
| 229 | cico.o: /usr/include/netdb.h |
| 230 | cico.o: /usr/include/netinet/in.h |
| 231 | cico.o: /usr/include/sys/socket.h |
| 232 | cico.o: /usr/include/sys/stat.h |
| 233 | cico.o: uust.h |
| 234 | cico.o: uusub.h |
| 235 | cntrl.o: cntrl.c |
| 236 | cntrl.o: uucp.h |
| 237 | cntrl.o: /usr/include/sys/stat.h |
| 238 | cntrl.o: uust.h |
| 239 | condevs.o: condevs.c |
| 240 | condevs.o: condevs.h |
| 241 | condevs.o: /usr/include/sys/time.h |
| 242 | conn.o: conn.c |
| 243 | conn.o: /usr/include/signal.h |
| 244 | conn.o: uucp.h |
| 245 | conn.o: /usr/include/setjmp.h |
| 246 | conn.o: /usr/include/ctype.h |
| 247 | conn.o: /usr/include/errno.h |
| 248 | conn.o: /usr/include/sgtty.h |
| 249 | conn.o: /usr/include/sys/time.h |
| 250 | cpmv.o: cpmv.c |
| 251 | cpmv.o: uucp.h |
| 252 | cpmv.o: /usr/include/sys/stat.h |
| 253 | expfile.o: expfile.c |
| 254 | expfile.o: uucp.h |
| 255 | expfile.o: /usr/include/sys/stat.h |
| 256 | fio.o: fio.c |
| 257 | fio.o: /usr/include/signal.h |
| 258 | fio.o: uucp.h |
| 259 | fio.o: /usr/include/sgtty.h |
| 260 | fio.o: /usr/include/setjmp.h |
| 261 | gename.o: gename.c |
| 262 | gename.o: uucp.h |
| 263 | getargs.o: getargs.c |
| 264 | getargs.o: uucp.h |
| 265 | getprm.o: getprm.c |
| 266 | getprm.o: uucp.h |
| 267 | getpwinfo.o: getpwinfo.c |
| 268 | getpwinfo.o: uucp.h |
| 269 | getpwinfo.o: /usr/include/pwd.h |
| 270 | getwd.o: getwd.c |
| 271 | getwd.o: uucp.h |
| 272 | gio.o: gio.c |
| 273 | gio.o: uucp.h |
| 274 | gio.o: pk.h |
| 275 | gio.o: /usr/include/setjmp.h |
| 276 | gnamef.o: gnamef.c |
| 277 | gnamef.o: uucp.h |
| 278 | gnamef.o: /usr/include/sys/dir.h |
| 279 | gnsys.o: gnsys.c |
| 280 | gnsys.o: uucp.h |
| 281 | gnsys.o: /usr/include/sys/dir.h |
| 282 | gnxseq.o: gnxseq.c |
| 283 | gnxseq.o: uucp.h |
| 284 | gnxseq.o: /usr/include/sys/time.h |
| 285 | imsg.o: imsg.c |
| 286 | imsg.o: uucp.h |
| 287 | index.o: index.c |
| 288 | index.o: /usr/include/stdio.h |
| 289 | ioctl.o: ioctl.c |
| 290 | ioctl.o: uucp.h |
| 291 | ioctl.o: /usr/include/sgtty.h |
| 292 | lastpart.o: lastpart.c |
| 293 | lastpart.o: uucp.h |
| 294 | logent.o: logent.c |
| 295 | logent.o: uucp.h |
| 296 | logent.o: /usr/include/sys/time.h |
| 297 | logent.o: /usr/include/fcntl.h |
| 298 | logent.o: /usr/include/sgtty.h |
| 299 | mailst.o: mailst.c |
| 300 | mailst.o: /usr/include/signal.h |
| 301 | mailst.o: uucp.h |
| 302 | mkdir.o: mkdir.c |
| 303 | pk0.o: pk0.c |
| 304 | pk0.o: uucp.h |
| 305 | pk0.o: pk.h |
| 306 | pk1.o: pk1.c |
| 307 | pk1.o: /usr/include/signal.h |
| 308 | pk1.o: uucp.h |
| 309 | pk1.o: pk.h |
| 310 | pk1.o: /usr/include/setjmp.h |
| 311 | pk1.o: /usr/include/sys/time.h |
| 312 | prefix.o: prefix.c |
| 313 | setline.o: setline.c |
| 314 | setline.o: uucp.h |
| 315 | strpbrk.o: strpbrk.c |
| 316 | subdir.o: subdir.c |
| 317 | subdir.o: uucp.h |
| 318 | sysacct.o: sysacct.c |
| 319 | sysacct.o: /usr/include/sys/types.h |
| 320 | systat.o: systat.c |
| 321 | systat.o: uucp.h |
| 322 | tio.o: tio.c |
| 323 | tio.o: /usr/include/signal.h |
| 324 | tio.o: uucp.h |
| 325 | tio.o: /usr/include/setjmp.h |
| 326 | tio.o: /usr/include/sys/stat.h |
| 327 | ulockf.o: ulockf.c |
| 328 | ulockf.o: uucp.h |
| 329 | ulockf.o: /usr/include/sys/stat.h |
| 330 | uuclean.o: uuclean.c |
| 331 | uuclean.o: /usr/include/signal.h |
| 332 | uuclean.o: uucp.h |
| 333 | uuclean.o: /usr/include/pwd.h |
| 334 | uuclean.o: /usr/include/sys/stat.h |
| 335 | uuclean.o: /usr/include/sys/dir.h |
| 336 | uucp.o: uucp.c |
| 337 | uucp.o: uucp.h |
| 338 | uucp.o: /usr/include/sys/stat.h |
| 339 | uucp.o: uust.h |
| 340 | uucpd.o: uucpd.c |
| 341 | uucpd.o: uucp.h |
| 342 | uucpd.o: /usr/include/netdb.h |
| 343 | uucpd.o: /usr/include/signal.h |
| 344 | uucpd.o: /usr/include/errno.h |
| 345 | uucpd.o: /usr/include/sys/socket.h |
| 346 | uucpd.o: /usr/include/netinet/in.h |
| 347 | uucpd.o: /usr/include/sys/wait.h |
| 348 | uucpd.o: /usr/include/sys/ioctl.h |
| 349 | uucpd.o: /usr/include/pwd.h |
| 350 | uucpd.o: /usr/include/lastlog.h |
| 351 | uucpd.o: /usr/include/utmp.h |
| 352 | uucpd.o: /usr/include/fcntl.h |
| 353 | uucpdefs.o: uucpdefs.c |
| 354 | uucpdefs.o: uucp.h |
| 355 | uucpname.o: uucpname.c |
| 356 | uucpname.o: uucp.h |
| 357 | uucpname.o: /usr/include/sys/stat.h |
| 358 | uudecode.o: uudecode.c |
| 359 | uudecode.o: /usr/include/stdio.h |
| 360 | uudecode.o: /usr/include/pwd.h |
| 361 | uudecode.o: /usr/include/sys/types.h |
| 362 | uudecode.o: /usr/include/sys/stat.h |
| 363 | uuencode.o: uuencode.c |
| 364 | uuencode.o: /usr/include/stdio.h |
| 365 | uuencode.o: /usr/include/sys/types.h |
| 366 | uuencode.o: /usr/include/sys/stat.h |
| 367 | uulog.o: uulog.c |
| 368 | uulog.o: uucp.h |
| 369 | uuname.o: uuname.c |
| 370 | uuname.o: uucp.h |
| 371 | uuname.o: /usr/include/signal.h |
| 372 | uupoll.o: uupoll.c |
| 373 | uupoll.o: uucp.h |
| 374 | uuq.o: uuq.c |
| 375 | uuq.o: uucp.h |
| 376 | uuq.o: /usr/include/stdio.h |
| 377 | uuq.o: /usr/include/sys/dir.h |
| 378 | uuq.o: /usr/include/sys/stat.h |
| 379 | uusend.o: uusend.c |
| 380 | uusend.o: /usr/include/stdio.h |
| 381 | uusend.o: /usr/include/pwd.h |
| 382 | uusend.o: /usr/include/sys/types.h |
| 383 | uusend.o: /usr/include/sys/stat.h |
| 384 | uusnap.o: uusnap.c |
| 385 | uusnap.o: uucp.h |
| 386 | uusnap.o: /usr/include/sys/stat.h |
| 387 | uusnap.o: /usr/include/sys/dir.h |
| 388 | uusnap.o: /usr/include/ctype.h |
| 389 | uux.o: uux.c |
| 390 | uux.o: uucp.h |
| 391 | uuxqt.o: uuxqt.c |
| 392 | uuxqt.o: uucp.h |
| 393 | uuxqt.o: /usr/include/sys/stat.h |
| 394 | uuxqt.o: /usr/include/sys/dir.h |
| 395 | uuxqt.o: /usr/include/signal.h |
| 396 | versys.o: versys.c |
| 397 | versys.o: uucp.h |
| 398 | versys.o: /usr/include/stdio.h |
| 399 | versys.o: /usr/include/ctype.h |
| 400 | xqt.o: xqt.c |
| 401 | xqt.o: /usr/include/signal.h |
| 402 | xqt.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 |