# $Id: /mirror/trunk/languages/befunge/config/makefiles/root.in 35447 2009-01-11T14:43:34.471880Z bernhard  $

# Makefile for languages/befunge

# Setup of some commands
PARROT     = ../../parrot
PERL       = @perl@
RM_F       = @rm_f@
#CONDITIONED_LINE(darwin):
#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

default: all

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             Create befunge.pbc"
	@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"

# regenerate the Makefile
Makefile: config/makefiles/root.in
	$(PERL) Configure.pl

all: build

build: befunge.pbc

befunge.pbc: befunge.pir debug.pir flow.pir io.pir load.pir maths.pir stack.pir
	$(PARROT) -o befunge.pbc befunge.pir

test: befunge.pbc
	cd .. && $(PERL) t/harness --languages=befunge

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

realclean: clean
	$(RM_F) Makefile

