# Makefile for compiling the prime number tools

CFLAGS		= -O -Wall
LDFLAGS		= -s -lm

prefix		= /usr/local
bindir		= $(prefix)/bin
mandir		= $(prefix)/man

TARGETS		= matho-primes matho-around matho-twin matho-pascal

all: $(TARGETS)
	@echo Make completed.

install: $(TARGETS)
	install -d $(bindir)
	install -d $(mandir)/man1
	install -m 0755 $(TARGETS) $(bindir)
	install -m 0644 *.1 $(mandir)/man1
	@echo Install completed.

clean:
	rm -f $(TARGETS)
