home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume30
/
tin
/
part12
/
Makefile
< prev
next >
Wrap
Makefile
|
1992-05-20
|
13KB
|
411 lines
# Makefile for tin - for tin compiler flag options read INSTALL and README.
EXE = tin
EXED = tind
BINDIR = /usr/local/bin
MANDIR = /usr/man/man1
# Define if you want the multi SPOOLDIR extensions & library
CDROM = -DCDROM_ABLE
# sun01
#CDLIB = -ldbm -L/home/lea/.src/cllib/clientlib -lcllib
# anl433
CDLIB = /usr/local/src/cnews/dbz/dbz.o -L/usr/home/admin/iain/.src/cllib/clientlib -lcllib -lcposix
CC = cc
STRIP = strip
ROFF = + drf -F Helvetica -man3
PRINT = -Pps0
BASE_VER= ../112
PATCH_VER = 113
MAIL_ADDR = "iain%anl433.uucp@Germany.EU.net (Iain Lea)"
HFILES = tin.h extern.h nntplib.h proto.h
CFILES = active.c art.c curses.c debug.c feed.c getline.c group.c \
hashstr.c help.c inews.c init.c kill.c lang.c main.c memory.c \
misc.c newsrc.c nntplib.c open.c page.c post.c prompt.c \
rcfile.c save.c screen.c search.c select.c signal.c spooldir.c \
thread.c wildmat.c
OFILES = active.o art.o curses.o debug.o feed.o getline.o group.o \
hashstr.o help.o inews.o init.o kill.o lang.o main.o memory.o \
misc.o newsrc.o nntplib.o open.o page.o post.o prompt.o \
rcfile.o save.o screen.o search.o select.o signal.o spooldir.o \
thread.o wildmat.o
SUPPORT = Makefile MANIFEST README CHANGES INSTALL TODO FAQ FTP *.[13] $(EXE).nrf
LINTFLAGS=-a -c -h -n -x
.c.o:
$(CC) $(CFLAGS) $*.c
all:
@echo "There is no default. Specify one of the following targets."
@echo " make bsd (BSD/Dec/DG/Next/Sun)"
@echo " make sysv (SysV)"
@echo " make sysvr4 (SysV R4)"
@echo " make sco (SCO Unix)"
@echo " make aix (IBM AIX)"
@echo " make xenix (Xenix 386)"
@echo " make sinix (SNI SysV)"
@echo " make tower (NCR Tower)"
@echo " make minix (Minix 386)"
@echo " make ptx (Sequent PTX)"
@echo " make apollo (Apollo Domain)"
# For BSD-derived systems
bsd:
@echo "Compiling for BSD/Dec/DG/Next/Sun..."
@$(MAKE) CFLAGS='-c -O -DBSD -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# For System V
# NETLIBS="-lnet -lnsl_s" \
#
sysv:
@echo "Compiling for System V..."
@$(MAKE) CFLAGS='-c -O -DSYSV -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# For System V Release 4
# NETLIBS="-lnsl -lsocket" \
#
sysvr4:
@echo "Compiling for System V Release 4..."
@$(MAKE) CFLAGS='-c -O -DSVR4 -DPOSIX_JOB_CONTROL -DUSE_INVERSE_HACK -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermlib" \
EXE=tin linkit
# For SCO Unix
# NETLIBS="-lnsl_s -lsocket" \
#
sco:
@echo "Compiling for SCO Unix..."
@$(MAKE) CFLAGS='-c -O -DSYSV -DSCO_UNIX -UM_XENIX -DUSE_INVERSE_HACK -DLIBDIR="\"/usr/lib/news\"" -DSPOOLDIR="\"/usr/spool/news\""' \
LIBS="-lcurses -lgen -lc_s" \
EXE=tin linkit
# For IBM AIX
aix:
@echo "Compiling for AIX..."
@$(MAKE) CFLAGS='-c -O -DSYSV -DRS6000 -DREAD_CHAR_HACK -DUSE_LONG_FILENAMES -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# For Xenix 386
# NETLIBS="-lsocket" \
#
xenix:
@echo "Compiling for Xenix 386..."
@$(MAKE) CFLAGS='-c -Zi -DSYSV -DLIBDIR="\\"/usr/lib/news\\"" -DSPOOLDIR="\\"/usr/spool/news\\""' \
LIBS="-lcurses -ltinfo -lx" \
LFLAGS=-Zi EXE=tin linkit
# For SNI Sinix
sinix:
@echo "Compiling for SNI Sinix..."
@$(MAKE) CFLAGS='-c -O -DUSE_MKDIR -DLIBDIR=\\"/usr/lib/news\\" -DSPOOLDIR=\\"/usr/spool/news\\"' \
LIBS="-lcurses" \
EXE=tin linkit
# For NCR Tower
# NETLIBS="-lnet -lnsl_s" \
#
tower:
@echo "Compiling for NCR Tower..."
@$(MAKE) CFLAGS='-c -O -DSYSV -DNCR -DISTRING -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# For Minix 386
minix:
@echo "Compiling for Minix 386..."
@$(MAKE) CFLAGS='-c -O -DMINIX -D_POSIX_SOURCE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses" \
EXE=tin linkit
chmem +131072 $(EXE)
# For Sequent PTX
# NETLIBS="-lsocket -linet -lnsl_s" \
#
ptx:
@echo "Compiling for Sequent PTX..."
@$(MAKE) CFLAGS='-c -O -DPTX -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# For Apollo
apollo:
@echo "Compiling for Apollo..."
@$(MAKE) CFLAGS='-c -O -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
# !!! THE FOLLOWING ARE SITE SPECIFIC - IGNORE !!!
anl432:
@echo "Compiling for ANL432 with NNTP ONLY, NO POSTING, NO SHELL ESCAPE..."
@$(MAKE) CC=gcc CFLAGS='-c -O2 -Wall -DSYSV -DNNTP_ONLY -DNNTP_EXTS -DNO_POSTING -DNO_SHELL_ESCAPE -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
NETLIBS="-linet -lnsl_s" \
EXE=tin linkit
local:
@echo "Compiling for ANL433..."
@$(MAKE) CC=cc CFLAGS='-c -g -DSYSV -DDEBUG -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\"' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
anl433:
@echo "Compiling for ANL433 with NNTP..."
@$(MAKE) CC=gcc CFLAGS='-c -O2 -Wall -DSYSV -DNNTP_ABLE -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
NETLIBS="-linet -lnsl_s" \
EXE=tin linkit
anl433cd:
@echo "Compiling for ANL433 with CDROM..."
@$(MAKE) CC=gcc CFLAGS='-c -O2 -Wall -DSYSV -DCDROM_ABLE -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap $(CDLIB)" \
NETLIBS="-linet -lnsl_s" \
EXE=tin linkit
apollo02:
@echo "Compiling for APOLLO02 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
os2unix:
@echo "Compiling for OS2UNIX with NNTP ONLY..."
@$(MAKE) CC=/usr2/gcc/bin/gcc CFLAGS='-c -O2 -Wall -DSYSV -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
NETLIBS="-linet -lnsl_s" \
EXE=tin linkit
daemon:
@echo "Compiling for ANL433 with INDEX DAEMON..."
@$(MAKE) CC=cc CFLAGS='-c -g -DSYSV -DINDEX_DAEMON -DDEBUG' \
EXE=$(EXED) linkit
dec02:
@echo "Compiling for DEC02 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DBSD -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
dg01:
@echo "Compiling for DG01 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DBSD -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
home:
@echo "Compiling for (HOME) Xenix 386..."
@$(MAKE) CFLAGS='-c -W2 -Zi -DSYSV -DDEBUG -DLIBDIR="\\"/usr/lib/news\\"" -DSPOOLDIR="\\"/usr/spool/news\\""' \
LIBS="-lcurses -ltinfo -lx" \
LFLAGS=-Zi EXE=tin linkit
mx331:
@echo "Compiling for MX331 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\\"anl433\\" -DNNTP_INEWS_DOMAIN=\\".uucp\\" -DUSE_MKDIR -DDEBUG' \
LIBS="-lcurses" \
EXE=tin linkit
mx351:
@echo "Compiling for MX351 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DSVR4 -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DPOSIX_JOB_CONTROL -DUSE_INVERSE_HACK -DEBUG' \
NETLIBS="-lnsl -lsocket" \
LIBS="-lcurses -ltermlib" \
EXE=tin linkit
sony01:
@echo "Compiling for SONY01 with NNTP ONLY..."
@$(MAKE) CC=gcc CFLAGS='-c -O2 -Wall -DBSD -DNNTP_ONLY -DLIBDIR=\"/a/usr/lib/news\" -DSPOOLDIR=\"/a/usr/spool/news\" -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
sun01:
@echo "Compiling for SUN01 with NNTP ONLY..."
@$(MAKE) CFLAGS='-c -O -DBSD -DNNTP_ONLY -DNNTP_INEWS_GATEWAY=\"anl433\" -DNNTP_INEWS_DOMAIN=\".uucp\" -DDEBUG' \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
sun01cd:
@echo "Compiling for SUN01 with CDROM ABLE..."
@$(MAKE) CFLAGS='-c -g -DBSD -DCDROM_ABLE -DLIBDIR=\"/home/sun02/iain/lib\" -DDEBUG' \
NNTPLIB="$(CDLIB)" \
LIBS="-lcurses -ltermcap" \
EXE=tin linkit
linkit: $(OFILES)
@echo "Linking $(EXE)..."
$(CC) $(LFLAGS) -o $(EXE) $(OFILES) $(NNTPLIB) $(NETLIBS) $(LIBS)
@ls -l $(EXE)
install:
@echo "Installing $(EXE)..."
@$(STRIP) $(EXE)
@-mv $(EXE) $(BINDIR)
@-rm $(BINDIR)/r$(EXE)
@ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@chmod 755 $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@ls -l $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@cp $(EXE).1 $(MANDIR)
install_setuid:
@echo "Installing SETUID $(EXE)..."
@$(STRIP) $(EXE)
@-mv $(EXE) $(BINDIR)
@chown news $(BINDIR)/$(EXE)
@chown news $(BINDIR)/r$(EXE)
@chgrp news $(BINDIR)/$(EXE)
@chgrp news $(BINDIR)/r$(EXE)
@-rm $(BINDIR)/r$(EXE)
@ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@su news -c "chmod 6755 $(BINDIR)/$(EXE)"
@su news -c "chmod 6755 $(BINDIR)/r$(EXE)"
@ls -l $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@cp $(EXE).1 $(MANDIR)
install_daemon:
@echo "Installing index daemon $(EXED)..."
@$(STRIP) $(EXED)
@-mv $(EXED) $(BINDIR)
@chown news $(BINDIR)/$(EXED)
@chmod 0755 $(BINDIR)/$(EXED)"
@ls -l $(BINDIR)/$(EXED)
proto:
@echo "Generating function prototypes for proto.h..."
@echo "#if __STDC__" > PROTO.H
@echo " " >> PROTO.H
@cproto -e $(CFILES) >> PROTO.H
@echo " " >> PROTO.H
@echo "#else" >> PROTO.H
@echo " " >> PROTO.H
@cproto -e -f1 $(CFILES) >> PROTO.H
@echo " " >> PROTO.H
@echo "#endif" >> PROTO.H
@-mv PROTO.H proto.h
nroff:
@echo "Creating nroff man page..."
@nroff -man $(EXE).1 > $(EXE).nrf
manifest:
@echo "Creating MANIFEST..."
@echo "MANIFEST for tin newsreader (`date`)" > MANIFEST
@echo "----------------------------------------------------------" >> MANIFEST
@wc -c $(SUPPORT) $(HFILES) patchlev.h $(CFILES) >> MANIFEST
shar:
@echo "Generating shell archive..."
@make nroff
@make manifest
@shar -a -n $(EXE)1.1 -s $(MAIL_ADDR) -L50 -o ../$(EXE).shar $(SUPPORT) $(CFILES) $(HFILES) patchlev.h
uuencode:
@make tar
@echo "Uuencoding $(EXE).tar.Z..."
@uuencode $(EXE).tar.Z $(EXE).tar.Z > $(EXE).tar.Z.uue
@ls -l $(EXE).tar.Z.uue
diff:
@echo "Generating diffs against $(BASE_VER)..."
@make nroff
@make manifest
@-mv -f $(EXE).diff $(EXE).diff-
@-diff -rcs $(BASE_VER) . > $(EXE).diff
@ls -l $(EXE).diff
patch:
@make diff
@echo "Generating patch against $(BASE_VER)..."
@-mv $(EXE).diff $(EXE).patch$(PATCH_VER)
@shar -a -n $(EXE) -s $(MAIL_ADDR) -L50 -o ../patch$(PATCH_VER).shar $(EXE).patch$(PATCH_VER)
@ls -l ../patch$(PATCH_VER).shar*
tar:
@echo "Generating compressed tar file..."
@-rm $(EXE).tar $(EXE).tar.Z > /dev/null 2>&1
@tar cvf $(EXE).tar $(SUPPORT) $(CFILES) $(HFILES) patchlev.h
@echo "Compressing $(EXE).tar..."
@compress $(EXE).tar
@ls -l $(EXE).tar.Z
zoo:
@echo "Generating zoo archive file..."
@-rm $(EXE).zoo > /dev/null 2>&1
@zoo ah $(EXE).zoo $(SUPPORT) $(CFILES) $(HFILES) patchlev.h
@ls -l $(EXE).zoo
tags:
@echo "Generating tags (results in ./tags)..."
@-rm tags
@ctags $(HFILES) patchlev.h $(CFILES)
lint:
@echo "Linting source (results in ./LINT)..."
@lint $(LINTFLAGS) -DNNTP_ABLE $(CFILES) > LINT
clean:
@echo "Cleaning..."
@-'rm' -rf $(OFILES) '#*' $(EXE).diff*
clobber:
@echo "Clobbering..."
@-'rm' -rf $(OFILES) '#*' tags $(EXE) $(EXE).diff* patch.shar*
cflow:
@echo "Creating cflow for $(EXE)..."
@cflow $(CFILES) > cflow.$(EXE) &
cscope:
@echo "Creating cscope database $(EXE)..."
@cscope $(SUPPORT) $(HFILES) patchlev.h $(CFILES)
man:
@echo "Printing $(EXE) manual to $(PRINT)..."
@$(ROFF) $(PRINT) $(EXE).1
print:
/bin/sh for FILE in $(HFILES) patchlev.h $(CFILES) $(SUPPORT); do \
echo "Printing $$FILE to $(PRINT)..."; \
a2ps -t4 $$FILE | lpr; \
done
active.o: active.c $(HFILES)
art.o: art.c $(HFILES)
curses.o: curses.c $(HFILES)
debug.o: debug.c $(HFILES)
feed.o: feed.c $(HFILES)
getline.o: getline.c $(HFILES)
group.o: group.c $(HFILES)
hashstr.o: hashstr.c $(HFILES)
help.o: help.c $(HFILES)
inews.o: inews.c $(HFILES)
init.o: init.c $(HFILES)
kill.o: kill.c $(HFILES)
lang.o: lang.c $(HFILES)
main.o: main.c $(HFILES) patchlev.h
memory.o: memory.c $(HFILES)
misc.o: misc.c $(HFILES)
newsrc.o: newsrc.c $(HFILES)
nntplib.o: nntplib.c $(HFILES)
open.o: open.c nntplib.h
page.o: page.c $(HFILES)
post.o: post.c $(HFILES)
prompt.o: prompt.c $(HFILES)
rcfile.o: rcfile.c $(HFILES)
save.o: save.c $(HFILES)
screen.o: screen.c $(HFILES)
search.o: search.c $(HFILES)
select.o: select.c $(HFILES)
signal.o: signal.c $(HFILES)
spooldir.o: spooldir.c $(HFILES)
thread.o: thread.c $(HFILES)
wildmat.o: wildmat.c