# @(#)Makefile.usg 2.12 3/30/83 # Makefile for UNIX system III, system V, and other USG systems (4.0, 5.0, etc). # definitions NEWSUSR = news NEWSGRP = news HOME = news HOMEDIR = `logdir $(HOME)` LOGDIR = SPOOLDIR = /usr/spool/news LIBDIR = /usr/lib/news BINDIR = /usr/bin DEBUG = IBMFLAGS = CFLAGS = $(DEBUG) -O $(IBMFLAGS) -DUSG -UIHCC -Dindex=strchr -Drindex=strrchr LFLAGS = -s -i $(IBMFLAGS) SOURCES = checknews.c control.c digest.c expire.c ftime.c \ fullname.c funcs.c header.c iextern.c ifuncs.c inews.c \ $(LOGDIR) process.c readnews.c readr.c rextern.c rfuncs.c \ rfuncs2.c HEADERS = defs.h header.h iparams.h params.h rparams.h ndir.h MISC = Makefile getdate.y postnews rmgrp MISCSRC = sendnews.c uurec.c recnews.c OBJECTS = funcs.o getdate.o ftime.o header.o $(LOGDIR) IOBJECTS = inews.o ifuncs.o iextern.o control.o fullname.o ipathinit.o ROBJECTS = readnews.o rfuncs.o rfuncs2.o rextern.o readr.o \ process.o digest.o rpathinit.o EXPOBJS = expire.o header.o funcs.o getdate.o rextern.o ftime.o \ $(LOGDIR) epathinit.o # opendir.o readdir.o closedir.o OTHERS = uurec recnews sendnews batch unbatch expire caesar recmail COMMANDS = inews readnews checknews # dependencies all: $(COMMANDS) $(OTHERS) @echo make all done 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) cd $(LIBDIR) ; chmod 755 $(OTHERS) -rm -f /usr/bin/rnews ln $(BINDIR)/inews /usr/bin/rnews defs.h: defs.dist localize.sh sh localize.sh Makefile: Makefile.usg localize.sh sh localize.sh install active: sh install.usg $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP) cd ../cvt ; newactive.sh ../src/active $(LIBDIR) $(SPOOLDIR) mv active oldactive make cp clean: rm -f $(COMMANDS) *.o rm -f core getdate.c a.out Bnews.cpio inews: Makefile $(IOBJECTS) $(OBJECTS) $(CC) $(LFLAGS) $(IOBJECTS) \ $(OBJECTS) \ -o inews readnews: Makefile $(ROBJECTS) $(OBJECTS) $(CC) $(LFLAGS) $(ROBJECTS) \ $(OBJECTS) \ -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 header.h $(CC) $(CFLAGS) \ $(CHEAP) -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 header.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 header.h $(CC) $(CFLAGS) \ -UHOME=\"$(HOME)\" -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 header.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 $(CC) $(CFLAGS) \ $(DIGEST) -c readr.c checknews: Makefile checknews.c $(LOGDIR) process.o cpathinit.o \ defs.h params.h header.h Makefile $(CC) $(CFLAGS) $(LFLAGS) \ -DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" \ checknews.c process.o $(LOGDIR) cpathinit.o \ -o checknews logdir.o: logdir.c $(CC) $(CFLAGS) -c logdir.c control.o: control.c defs.h header.h $(CC) $(CFLAGS) -c control.c uurec: uurec.c defs.h $(CC) $(CFLAGS) uurec.c -o uurec recnews: recnews.c defs.h $(CC) $(CFLAGS) $(LFLAGS) recnews.c -o recnews sendnews: sendnews.c $(CC) $(CFLAGS) $(LFLAGS) sendnews.c \ -o sendnews batch: batch.c $(CC) $(CFLAGS) -s batch.c -o batch unbatch: unbatch.c $(CC) $(CFLAGS) -s unbatch.c -o unbatch caesar: caesar.c $(CC) $(CFLAGS) -s caesar.c -o caesar -lm recmail: recmail.c $(CC) $(CFLAGS) -s recmail.c -o recmail process.o: process.c rparams.h defs.h params.h header.h $(CC) $(CFLAGS) -c process.c fullname.o: defs.h header.o: header.c header.h defs.h $(CC) $(CFLAGS) -c header.c expire: Makefile $(EXPOBJS) $(CC) $(LFLAGS) \ $(EXPOBJS) -o expire expire.o: expire.c defs.h ndir.h header.h Makefile $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ -UHOME=\"$(HOME)\" -c expire.c opendir.o: opendir.c ndir.h $(CC) $(CFLAGS) -c opendir.c closedir.o: closedir.c ndir.h $(CC) $(CFLAGS) -c closedir.c readdir.o: readdir.c ndir.h $(CC) $(CFLAGS) -c readdir.c fullname.o: defs.h fullname.c $(CC) $(CFLAGS) -c fullname.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)\" \ -UHOME=\"$(HOME)\" -DREAD -c pathinit.c mv pathinit.o rpathinit.o ipathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ -UHOME=\"$(HOME)\" -DINEW -c pathinit.c mv pathinit.o ipathinit.o cpathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ -UHOME=\"$(HOME)\" -DCHKN -c pathinit.c mv pathinit.o cpathinit.o opr: -xref $(SOURCES) | opr -o5 -t xr -y bell -p land pr -n $(SOURCES) | enbold 6 | reform -8 -0 | cut -c1-130 | \ xerox -h10 -v8 -l66 -s xrox | opr -r -t xr pr -n $(HEADERS) | opr -o5 -t xr -y bell -p land pr -n $(MISC) | opr -o5 -t xr -y bell -p land cpio: ls $(SOURCES) \ $(HEADERS) \ $(MISC) | cpio -oc > Bnews.cpio epathinit.o: pathinit.c iparams.h header.h $(CC) $(CFLAGS) \ -DSPOOLDIR=\"$(SPOOLDIR)\" \ -DLIBDIR=\"$(LIBDIR)\" \ $(HOMENAME) -DEXP -c pathinit.c mv pathinit.o epathinit.o