#	vmail
#
#	Interactive screen-based mail handler that sits on top of MH.
#
#	Copyright (C) J. Zobel, University of Melbourne, October 1987.

VERS=\"10/87\"

DESTDIR=
BIN=/mit/sipb/`machtype`bin
MAN=/mit/sipb/man/man1
SRC=call.c choose.c cmds.c find.c inc.c init.c load.c low.c main.c move.c page.c strerror.c
OBJ=call.o choose.o cmds.o find.o inc.o init.o load.o low.o main.o move.o page.o strerror.o

INSTALL=install
CC=gcc
CDEBUG=-O

LDFLAGS=
#	this line is
#LDFLAGS=-k 48k
#	if -k option recognized
#	-k sets required stack space on the PE C compiler

#CFLAGS=-DVERSION=$(VERS)
#	CFLAGS are
CFLAGS=$(CDEBUG) -DVERSION=$(VERS) -DUSDATE 
#	if dates required in US format

LIBS=-lcurses -ltermcap

all: vmail

vmail: $(OBJ)
	$(CC) $(LDFLAGS) -o vmail $(OBJ) $(LIBS)

$(OBJ): defs.h macro.h Makefile

install: $(DESTDIR)$(BIN)/vmail

$(DESTDIR)$(BIN)/vmail: vmail
	$(INSTALL) -c -s -m 755 vmail $(DESTDIR)$(BIN)/vmail
	$(INSTALL) -c -m 444 vmail.1 $(DESTDIR)$(MAN)/vmail.1

clean:
	rm -f $(OBJ) core *~ .\#* \#* tags TAGS vmail

saber:
	#load $(CFLAGS) $(SRC)
	#load $(LIBS)

tags:
	ctags $(SRC)
	etags $(SRC)
