# Makefile for curstars

# Change these settings to alter where the executable and man page are
# installed (changing PREFIX is usually easiest).

PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man/man1

CC=gcc
CFLAGS=-O -Wall

all: curstars

curstars: curstars.o
	$(CC) -o curstars curstars.o -lncurses -lm

install: curstars
	install -m 511 curstars $(BINDIR)
	install -m 444 curstars.1 $(MANDIR)

clean:
	$(RM) *~ *.o curstars

# Based on the example in ESR's Software Release Practice HOWTO.
VERS=1.0
tgz: ../curstars-$(VERS).tar.gz
../curstars-$(VERS).tar.gz: clean
	@cd ..;ln -s curstars curstars-$(VERS)
	cd ..;tar zchvf curstars-$(VERS).tar.gz curstars-$(VERS)
	@cd ..;$(RM) curstars-$(VERS)
