# Makefile - makefile for rexima

# any include dir args required (e.g. -I/usr/include/ncurses for
# ncurses; not needed for the current version, but needed for older
# ones, and it shouldn't hurt to include it just in case).
INCOPT=-I/usr/include/ncurses

CC=gcc
CFLAGS=-Wall -O2 $(INCOPT)

# if using ncurses (e.g. on Linux):
CURSESLIBS=-lncurses

# directory to install the `rexima' binary in
BINDIR=/usr/local/bin

# directory in which to install `rexima.1', the man page
MANDIR=/usr/local/man/man1

# ------------- don't edit anything below this line --------------

OBJS = rexima.o

all: rexima

rexima: $(OBJS)
	$(CC) $(CFLAGS) -o rexima $(OBJS) $(CURSESLIBS)

install: all
	strip rexima
	install -m 511 rexima		$(BINDIR)
	install -m 444 rexima.1		$(MANDIR)

clean:
	$(RM) *.o *~

distclean: clean
	$(RM) rexima

tar:	distclean
	cd ..;tar -cvf - rexima | gzip >$(HOME)/tmp/rexima.tar.gz
