# $Id: /mirror/trunk/languages/ook/config/makefiles/root.in 28688 2008-06-23T00:33:41.905243Z coke  $

# Makefile for languages/ook

# Set up of commands
PARROT        = ../../parrot
PERL          = @perl@
RM_F          = @rm_f@
RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl
#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@

# Set up directories
BUILD_DIR     = @build_dir@

default: all

help :
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             Create ook.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
	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=ook

all: build

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

build: ook.pasm
	$(PARROT) -o ook.pbc ook.pasm

clean:
	$(RM_F) core \
    "*.pbc" \
    "*~" \
    "hello.out" \
    "foo.p*"

realclean: clean
	$(RM_F) Makefile
