1# @(#)Makefile 4.1 (Berkeley) 84/08/02 2# 3# Makefile for at, atq, atrm, and atrun 4# 5ALL= atq atrm at atrun 6SRCS= atq.c atrm.c at.c atrun.c 7CFLAGS= -O 8INCPATH= 9DESTDIR= 10ATRUNDIR= /usr/lib 11SPOOLDIRS= /usr/spool/at /usr/spool/at/past 12SPOOLFILES= /usr/spool/at/lasttimedone 13 14all: ${ALL} 15 16at: at.c 17 $(CC) $(CFLAGS) -o at at.c 18 19atq: atq.c 20 $(CC) $(CFLAGS) -o atq atq.c 21 22atrm: atrm.c 23 $(CC) $(CFLAGS) -o atrm atrm.c 24 25atrun: atrun.c 26 $(CC) $(CFLAGS) -o atrun atrun.c 27 28install: all 29 -mkdir $(SPOOLDIRS) 30 chown daemon $(SPOOLDIRS) 31 chgrp daemon $(SPOOLDIRS) 32 chmod 755 $(SPOOLDIRS) 33 chown daemon $(SPOOLFILES) 34 chgrp daemon $(SPOOLFILES) 35 install -s atrun $(ATRUNDIR) 36 install -s atq $(DESTDIR)/usr/bin 37 install -s -o daemon -m 4755 at $(DESTDIR)/usr/bin 38 install -s -o daemon -m 4755 atrm $(DESTDIR)/usr/bin 39 40clean: 41 rm -f $(ALL) errs *.o 42 43print: 44 lpr ${SRCS} 45 46depend: 47 cc -M ${INCPATH} ${SRCS} | \ 48 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 49 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 50 else rec = rec " " $$2 } } \ 51 END { print rec } ' > makedep 52 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep 53 echo '$$r makedep' >>eddep 54 echo 'w' >>eddep 55 cp Makefile Makefile.bak 56 ed - Makefile < eddep 57 rm eddep makedep 58 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile 59 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile 60 echo '# see make depend above' >> Makefile 61 62# DO NOT DELETE THIS LINE -- make depend uses it 63 64 65atq.o: atq.c /usr/include/stdio.h /usr/include/sys/types.h 66atq.o: /usr/include/sys/file.h /usr/include/sys/dir.h /usr/include/sys/stat.h 67atq.o: /usr/include/sys/time.h /usr/include/pwd.h /usr/include/ctype.h 68atrm.o: atrm.c /usr/include/stdio.h /usr/include/pwd.h /usr/include/ctype.h 69atrm.o: /usr/include/sys/types.h /usr/include/sys/dir.h /usr/include/sys/file.h 70atrm.o: /usr/include/sys/stat.h 71at.o: at.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h 72at.o: /usr/include/sys/time.h /usr/include/sys/file.h 73atrun.o: atrun.c /usr/include/stdio.h /usr/include/sys/types.h 74atrun.o: /usr/include/sys/dir.h /usr/include/sys/file.h /usr/include/sys/time.h 75atrun.o: /usr/include/sys/stat.h /usr/include/pwd.h 76# DEPENDENCIES MUST END AT END OF FILE 77# IF YOU PUT STUFF HERE IT WILL GO AWAY 78# see make depend above 79