
.PHONY: all opt Postman test clean

OPT=

all: Postman

opt: OPT = -O2
opt: Postman

Postman:
	ghc -optl -static -Wall ${OPT} --make Postman -o runme -package net -package data

clean:
	rm -f *.o *.hi runme

opttest: OPT = -O2
opttest: test

test:
	ghc -Wall ${OPT} --make Tests.hs -package net -package data
	./quickcheck +names Tests.hs

submission: clean opt
	mkdir -p submission/source
	strip runme
	cp README runme buildme submission/
	cp *.lhs *.hs Makefile CREDITS submission/source/
	cd submission && tar -czvf ../submission.tar.gz .
	rm -rf submission/
	ls -l submission.tar.gz
	md5sum submission.tar.gz
