#
# Makefile for the splonk spam eliminator.
# Copyright (c) 2001 Gary Renshaw.  Released under the terms of the GPL.
#

all: rc suck install

answers: rc-answers suck install

rc:
	@rm -f procmailrc
	@perl question.pl

rc-answers:
	@rm -f procmailrc
	@perl question.pl < answers

suck:	suck.o
	@gcc -o suck suck.o
	@strip suck
	@size suck

install:
	base="$$HOME/splonk"; \
	install -d -m 711 $$base; \
	install -m 711 suck $$base; \
	install -m 644 procmailrc $$base/.procmailrc; \
	install -m 644 rc.splonk $$base; \
	install -m 644 README $$base; \
	install -m 700 test.pl $$base; \
	install -m 644 answers.dat $$base
	@echo
	@echo "Installation complete in $$HOME/splonk"

clean:
	rm -f *~ *.o suck procmailrc home.tmp.file rc.splonk answers.dat
