# $Id: root.in 13153 2006-07-04 22:59:35Z bernhard $

# Makefile for languages/urm

# Setup of some commands
RM_F   = @rm_f@
PERL   = @perl@
PARROT = ../../parrot

default: build

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             Just check whether 'urmc' compiles"
	@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
	cd .. && $(PERL) -I../lib urm/t/harness 

examples: build
	$(PERL) urmc -c examples/biggerzero.urm
	$(PERL) urmc -c examples/sub.urm
	$(PERL) urmc -c examples/sim.urm
	$(PERL) urmc -c examples/mult.urm    
	$(PERL) urmc -c examples/div.urm
	$(PERL) urmc -c examples/distance.urm

build: 
	$(PERL) -c urmc

clean:
	$(RM_F) \
		core "*.pbc" "*~" "foo.p*" \
		"*~" "*.pasm" \
		"*~" \
		"\#*" \
		"examples/*.pasm" "examples/*.pbc" \
		"examples/*~" \
		"examples/\#*" \
		"t/*.pasm" "t/*.urm" "t/*.out"

realclean: clean
	$(RM_F) Makefile
	
