# CFLAGS:
#	set -DJOBCONTROL if you have job control (BSD).
#	set -DSYSV -Dindex=strchr -Drindex=strrchr on Sytem V systems
#	set -Dregfree=free if you DON'T include reg.s (SYSV + some BSD)
#
# JOBCONTROL could be done as #ifndef SYSV, I suppose, but this clearly
# marks that particular difference.
#
# LIBS:
# should point to any extra libraries needed, such as termcap.  You
# may want to change this to use the curses termcap cover.  If you need
# to pull in another library to get regex / regcmp or strtok on non-SYSV
# systems, you may want to put that here
#
# EXTRAOBJS:
# may be used to include tmpnam.s, strtok.s, reg.s in the list.
#
# These objects implement SYSV utilities for BSD machines.
#
# strtok.s implements strtok() / strpbrk().  reg.s implements regex()/regcmp()
# on top of the BSD regular expression library (regex() allows multiple
# regular expressions).  tmpnam.s implements tmpnam() of course.
#
# If you have them, use your own regex/regcmp, because:
#
#	i) They should be faster than the reg.c code, which
#	recompiles the "current" ucb string every time you
#	switch regular expressions.
#
#	ii) I briefly checked out reg.c once, and it seemed to
#	work.  Our system has the "real" calls available, so I
#	run with those.  reg.c hasn't been used much by me, although
#	I've had nobody tell me it doesn't work.
#
# if you DON'T include reg.s, be sure you set -Dregfree=free in CFLAGS.
#
# As with regex, if you have a system strtok(), it is likely more efficient -
# string routines will often be done in assembler on a given machine.
#
# Even if you have it, you can use tmpnam.s anyhow.  This version will tailor
# the temp file name to vnXXXXXX, instead of a generic tmpXXXXXX.
#
# "vanilla" BSD:
#LIBS = -ltermcap
#EXTRAOBJS = tmpnam.s strtok.s reg.s
#CFLAGS = -O -DJOBCONTROL
#
# "vanilla" SYSV:
#LIBS = -ltermcap
#EXTRAOBJS = tmpnam.s
#CFLAGS = -O -DSYSV -Dregfree=free -Dindex=strchr -Drindex=strrchr
#
# BSD with strtok() / regex(), such as ULTRIX.  These are the rules
# used for our installation (rtech is a microvax running ULTRIX):
#LIBS = -ltermcap
#EXTRAOBJS = tmpnam.s
#CFLAGS = -O -DJOBCONTROL -Dregfree=free

#
# Minix!!!
#	Regular expressions: Use reg.c to turn regcmp into re_comp
#	and regex into re_exec. Use regcompat.c to turn re_comp into
#	regcomp and re_exec into regexec. Wow! What a load of old
#	cobblers.
LIBS =
#EXTRAOBJS = tmpnam.s strtok.s reg.s
EXTRAOBJS = tmpnam.s reg.s regcompat.s
CFLAGS = -O -DMINIX -DSYSV

# SERVEROBJS defines the object(s) for the vns_xxxx "server" interface.
#
#	std.s is the version for "standard" news, making use of the
#	users .newsrc file, and  resident articles / active file.
#
SERVEROBJS = std.s

# normal vn objects
#
VNOBJS=	hash.s envir_set.s pagefile.s reader.s storage.s sig_set.s \
term_set.s tty_set.s userlist.s vn.s vnglob.s digest.s strings.s \
session.s printex.s getch.s help.s newdisp.s stat.s svart.s

# This is to force you to read the makefile.  Once you have, comment this rule,
# and uncomment the "real" rule.  At the minimum, you will also have to
# uncomment one of the three sets of LIBS / EXTRAOBJS & CFLAGS definitions
# above.
#
#vn:
#	@echo "PLEASE READ THE MAKEFILE"
vn:	$(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS)
	cc -i -o vn $(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS) $(LIBS)

digest.s:	digest.c config.h head.h node.h page.h tune.h
envir_set.s:	envir_set.c config.h tune.h vn.h
getch.s:	getch.c config.h vn.h
hash.s:		hash.c config.h node.h tune.h
help.s:		help.c config.h node.h page.h reader.h tty.h tune.h vn.h
newdisp.s:	newdisp.c config.h node.h tty.h
pagefile.s:	pagefile.c node.h page.h tune.h
printex.s:	printex.c config.h tty.h
reader.s:	reader.c config.h brk.h head.h node.h page.h reader.h  \
		tty.h tune.h vn.h
regcompat.s:	regcompat.c
session.s:	session.c config.h brk.h head.h node.h page.h tty.h tune.h \
		vn.h
sig_set.s:	sig_set.c config.h node.h page.h tty.h tune.h
stat.s:		stat.c config.h node.h
std.s:		std.c config_std.h brk.h head.h server.h std.h
storage.s:	storage.c node.h page.h tune.h
strings.s:	strings.c node.h page.h tune.h
svart.s:	svart.c config.h node.h page.h tty.h tune.h
term_set.s:	term_set.c config.h node.h page.h tty.h tune.h
tty_set.s:	tty_set.c tty.h
tmpnam.s:	tmpnam.c config.h
userlist.s:	userlist.c node.h page.h tune.h vn.h
vn.s:		vn.c node.h tty.h
vnglob.s:	vnglob.c config.h brk.h head.h node.h page.h tune.h
