.PHONY: check clean

################################################
# Configuration.
#


#
# This project requires ocamlfind
#

USE_OCAMLFIND = true
OCAMLPACKS[] =
	extlib
	str
	oUnit

if $(not $(OCAMLFIND_EXISTS))
   eprintln(This project requires ocamlfind, but is was not found.)
   eprintln(You need to install ocamlfind and run "omake --configure".)
   exit 1

#
# Include path
#
OCAMLINCLUDES += ../src

#
# Compile native or byte code?
#
# The default values are defined as follows:
#
NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
BYTE_ENABLED = true

#
# Various options
#
# OCAMLFLAGS    +=
# OCAMLCFLAGS   +=
# OCAMLOPTFLAGS +=
# OCAML_LINK_FLAGS +=
# OCAML_BYTE_LINK_FLAGS +=
# OCAML_NATIVE_LINK_FLAGS +=


################################################
# Build an OCaml program
#

FILES[] =
	testRule

OCAMLINCLUDES += $(ROOT)/base/
OCAML_LIBS += $(ROOT)/base/base

PROGRAM = runner
OCAML_LIBS += ../src/habc

# OCAML_CLIBS +=
# OCAML_OTHER_LIBS +=
# OCAML_LIB_FLAGS +=

OCamlProgram($(PROGRAM), $(FILES))

.DEFAULT: $(PROGRAM)$(EXE)

check: $(PROGRAM)$(EXE)
	./$(PROGRAM)$(EXE) | ounit-postproc

#
# PHONY TARGET
#
clean:
	ocaml-clean $(PROGRAM)
