#	vmail
#
#	Interactive screen-based mail handler that sits on top of MH.
#
#	Copyright (C) J. Zobel, University of Melbourne, October 1987.
#
# $Id: Makefile,v 1.13 91/03/11 11:19:26 jamesp Exp $
#

DESTDIR = /opt/vmail/bin
MANDIR = /opt/vmail/man

CFILES = call.c choose.c cmds.c find.c inc.c init.c load.c low.c main.c \
	move.c page.c refresh.c regerror.c

INCLUDES = defs.h macro.h 

SHARFILES = READ_ME CHANGES vmail.1 Makefile $(CFILES) $(INCLUDES)

OBJS = call.o choose.o cmds.o find.o inc.o init.o load.o low.o main.o \
	move.o page.o refresh.o regerror.o

VERS=\"10/87DAS\"

#
# Define USDATE for U.S. date format on scan
#

DEFINES = -DVERSION=$(VERS) -DUSDATE -DSTANDOUT_CLEANUP -DMINIX -D_MINIX

CFLAGS = $(OPT) $(DEFINES) -wo

LDFLAGS = -fnone

LINT = lint
LFLAGS = $(DEFINES)

LIBS = -lcurses -ltermcap

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

Saber:
	#load $(CFLAGS) $(CFILES) $(HFILES) $(LIBS) -lc

lint:
	$(LINT) $(LFLAGS) $(CFILES) $(LIBS)

install:	$(DESTDIR)/vmail $(MANDIR)/man1/vmail.1

$(DESTDIR)/vmail: vmail
	install -d $(DESTDIR)
	install -lc $? $@

$(MANDIR)/man1/vmail.1 : vmail.1
	install -d $(MANDIR)/man1
	install -lc $? $@
	makewhatis $(MANDIR)

clean:
	rm -f *.o core vmail make.out tags

uninstall:	clean
	test $(DESTDIR) = /opt/vmail/bin
	rm -rf $(DESTDIR) $(MANDIR)

tags: source
	ctags -w $(CFILES) $(INCLUDES)

vmail.1 READ_ME CHANGES Makefile:
	$(CO) $(COFLAGS) $@

vmail.man: vmail.1
	nroff -man $? > $@

source: $(CFILES) $(INCLUDES)

makekit: $(SHARFILES)
	makekit -m $(SHARFILES)

depend : source
	maketd $(DEFINES) $(CFILES)

# DO NOT DELETE THIS LINE - make maketd DEPENDS ON IT
# Dependencies generated at: Thu Oct 15 13:21:02 PDT 1987

call.o:	defs.h  macro.h  
choose.o:	defs.h  macro.h  
cmds.o:	defs.h  macro.h  
find.o:	defs.h  macro.h  
inc.o:	defs.h  macro.h  
init.o:	defs.h  macro.h  
load.o:	defs.h  macro.h  
low.o:	defs.h  macro.h  
main.o:	defs.h  macro.h  
move.o:	defs.h  macro.h  
page.o:	defs.h  macro.h  

# DO NOT ADD ANYTHING HERE - WILL GO AWAY
