# Copyright (C) 2001-2005, The Perl Foundation.
# $Id: root.in 13165 2006-07-05 19:14:09Z bernhard $

# Makefile for languages/parrot_compiler

EXE      = @exe@
PERL     = @perl@
RM_F     = @rm_f@
PARROT   = ../../@test_prog@$(EXE)

default: all
all : parrot.pbc parrot_compiler.pbc parrot_compiler.pasm

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  all:               parrot_compiler.pbc and other drivers"
	@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 :
	cd .. && $(PERL) -I../lib parrot_compiler/t/harness

clean :
	$(RM_F) "*.pbc" parrot_compiler.pasm "t/*/*.pbc"

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


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

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

parrot_compiler.pasm : parrot_compiler.pir
	$(PARROT) -o parrot_compiler.pasm parrot_compiler.pir

