RM_F = @rm_f@
PERL = @perl@
PARROT=../../parrot

default: build

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             build bf.pbc and bfc.imc"
	@echo "                     This is the default."
	@echo ""
	@echo "  test:              run the test suite,"
	@echo ""
	@echo "  clean:             clean up temporary files"
	@echo ""
	@echo "  realclean:         clean up generated files"
	@echo ""
	@echo "  help:              print this help message"

test: build
	$(PERL) -Ilib -I../../lib t/harness

build: bf.pbc bfc.pbc bfco.pbc

bf.pbc: bf.pasm
	$(PARROT) -o bf.pbc bf.pasm

bfc.pbc: bfc.pir
	$(PARROT) -o bfc.pbc bfc.pir

bfco.pbc: bfco.pir
	$(PARROT) -o bfco.pbc bfco.pir

clean:
	$(RM_F) core "*.pbc" "*~"

realclean: clean
	$(RM_RF) Makefile

