# If you want to have user definable keymaps and you have the S-Lang
# library, uncomment the next four lines:
SLFLAGS = -DUSE_SLANG
SLINCLUDE = ../slang/src             # location of slang.h and libslang.a
SLIB = -L$(SLINCLUDE) -lslang
SLINC = -I$(SLINCLUDE)
#--
#
#   The S-Lang library is available from amy.tch.harvard.edu in pub/slang.
#   This distribution might already contain the S-Lang distribution.  
#   Check to see if ../slang exists.
#
#------------------------------------------------------------------------
# Choose the C compiler
#CC = cc -O -Dunix
#CC = gcc -O3 -traditional-cpp                   # SunOS
LPFILE=\"/usr/lib/most.doc\"
CC = gcc -O3 -Wall        # Linux

# Compiler Flags:

# If you want MOST to read a file for online help instead of the builtin
# help screen, then you have two alternatives:
#  1. Pointing the environment variable MOST_HELP to a help file.  For this,
#  2. Compile in the location of a help file:
#        -DMOST_HELPFILE=\"help-file-name\" 
#     If you use: -DMOST_HELPFILE=NULL, most will attempt to read most.doc from
#     the directory where the MOST was loaded from.
# The reason for allowing this is that since MOST supports user defineable 
# keymaps, this gives the opportunity for the user to define a custom help
# file for a particular set of keymaps.
#
# The location of this document is consistent with previous versions of 
# 'most'   -Rorschach

CFLAGS = -DMOST_HELPFILE=\"/usr/lib/most.doc\"

# Termcap

TERMCAP = termcap
#TERMCAP = curses
#TERMCAP = terminfo



OBJS = main.o buffer.o file.o window.o line.o display.o keyparse.o\
          sysdep.o keym.o most.o search.o help.o dir.o cmd.o edit.o

EXEC = most

.c.o:
	$(CC) -c $(CFLAGS) $(SLFLAGS) $(SLINC) $*.c

$(EXEC): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(SLIB) -l$(TERMCAP)


most.doc:	most.1
		nroff -man $? > $@


clean:
	/bin/rm -f *~ *.o most



