# @(#)Makefile.v7 2.7 3/5/83 # definitions CFLAGS = $(MYCFLAGS) ${DEBUG} -O -DDBM LFLAGS = # -pg SOURCES = funcs.c getdate.c inews.c ifuncs.c iextern.c readnews.c rfuncs.c\ rfuncs2.c rextern.c readr.c process.c uname.c control.c header.c OBJECTS = funcs.o getdate.o uname.o header.o IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o ipathinit.o $(OBJECTS) ROBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o readr.o \ process.o rpathinit.o digest.o $(OBJECTS) EXPOBJS= expire.o uname.o header.o funcs.o getdate.o rextern.o epathinit.o OTHERS = uurec recnews sendnews expire COMMANDS = inews readnews checknews $(OTHERS) # dependencies all: $(COMMANDS) cp: all cp inews readnews checknews postnews $(BINDIR) -cd $(BINDIR) ; chown $(NEWSUSR) inews readnews checknews postnews \ ; chgrp $(NEWSGRP) inews chmod 6755 $(BINDIR)/inews chmod 755 $(BINDIR)/readnews $(BINDIR)/checknews $(BINDIR)/postnews cp help $(OTHERS) $(LIBDIR) chmod 755 $(LIBDIR)/sendnews $(LIBDIR)/uurec $(LIBDIR)/recnews -rm -f /usr/bin/rnews ln $(BINDIR)/inews /usr/bin/rnews defs.h: defs.dist localize.sh sh localize.sh Makefile: Makefile.v7 localize.sh sh localize.sh install: cp sh install.v7 $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) clean: rm -f $(COMMANDS) *.o rm -f core index errs getdate.c vgrind: cp /dev/null index vgrind -h "Duke Network News" $(SRCS) vgrind -h "Duke Network News" -n Makefile vgrind -h "Duke Network News" -x index inews: Makefile $(IOBJECTS) $(CC) $(LFLAGS) $(IOBJECTS) -o inews -ldbm readnews: Makefile $(ROBJECTS) $(CC) $(LFLAGS) $(ROBJECTS) -o readnews funcs.o: funcs.c params.h defs.h $(CC) $(CFLAGS) -c funcs.c getdate.c: getdate.y @echo expect 6 shift/reduct conflicts yacc getdate.y mv y.tab.c getdate.c getdate.o: getdate.c $(CC) $(CFLAGS) -c getdate.c inews.o: inews.c iparams.h defs.h params.h $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -c inews.c ifuncs.o: ifuncs.c iparams.h defs.h params.h $(CC) $(CFLAGS) -c ifuncs.c iextern.o: iextern.c iparams.h defs.h params.h Makefile $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c iextern.c readnews.o: readnews.c rparams.h defs.h params.h $(CC) $(CFLAGS) -c readnews.c rfuncs.o: rfuncs.c rparams.h defs.h params.h $(CC) $(CFLAGS) -c rfuncs.c rfuncs2.o: rfuncs2.c rparams.h defs.h params.h $(CC) $(CFLAGS) -c rfuncs2.c rextern.o: rextern.c rparams.h defs.h params.h Makefile $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c rextern.c readr.o: readr.c rparams.h defs.h params.h Makefile $(CC) $(CFLAGS) -c readr.c checknews.o: checknews.c defs.h Makefile $(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c control.o: control.c defs.h $(CC) $(CFLAGS) -c control.c uname.o: uname.c defs.h $(CC) $(CFLAGS) -c uname.c uurec: uurec.c defs.h $(CC) $(CFLAGS) -s uurec.c -o uurec recnews: recnews.c defs.h $(CC) $(CFLAGS) -s recnews.c -o recnews sendnews: sendnews.o uname.o $(CC) $(LFLAGS) sendnews.o uname.o -o sendnews process.o: process.c rparams.h defs.h params.h $(CC) $(CFLAGS) -c process.c checknews: Makefile checknews.o process.o cpathinit.o $(CC) $(LFLAGS) checknews.o process.o cpathinit.o -o checknews sendnews.o: sendnews.c defs.h $(CC) $(CFLAGS) -c sendnews.c expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) -o expire $(EXPOBJS) -ldbm header.o: header.c header.h defs.h $(CC) $(CFLAGS) -c header.c expire.o: expire.c defs.h Makefile $(CC) $(CFLAGS) -c expire.c digest.o: digest.c $(CC) $(CFLAGS) -c digest.c # Some silliness here to get pathinit for both readnews & inews rpathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ $(HOMENAME) -DREAD -c pathinit.c mv pathinit.o rpathinit.o ipathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ $(HOMENAME) -DINEW -c pathinit.c mv pathinit.o ipathinit.o cpathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ $(HOMENAME) -DCHKN -c pathinit.c mv pathinit.o cpathinit.o epathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ $(HOMENAME) -DEXP -c pathinit.c mv pathinit.o epathinit.o tags: /tmp ctags -w *.h *.c