# -*- coding: utf-8; indent-tabs-mode: nil; -*-

# Declare the directories we need to include other libraries from
# OCAMLINCLUDES +=  +camlp4 ../../lib/core ../../lib/frontend
OCAMLINCLUDES +=  +camlp4 ../core

# Declare the names of the libraries we depend on
OCAML_LIBS[]  +=
        camlp4lib
        ../core/beluga-core
#        ../../lib/frontend/beluga-frontend

# Declare the name of the program
PROGRAM = interpreter

# Declare the files the program is built from
## FILES[] = $(read-sources ../../lib/core, sources)
## FILES[] += $(read-sources ../../lib/frontend, sources)
FILES[] =
FILES[] +=
        main

# Declare some phony empty targets so omake doesn't try to build camlp4lib.
#   May be a more elegant way to do this.
.PHONY: camlp4lib.a camlp4lib.cma camlp4lib.cmxa
camlp4lib.a   :
camlp4lib.cma :
camlp4lib.cmxa:

.DEFAULT: interpreter

clean:
        rm $(filter-proper-targets $(ls R, .))
        rm $(filter %.omc,         $(ls R, .))

interpreter: $(OCamlProgram $(PROGRAM), $(FILES))
#        echo BYTE_ENABLED $(BYTE_ENABLED)
#        echo NATIVE_ENABLED $(NATIVE_ENABLED)
#        echo OCAMLFLAGS $(OCAMLFLAGS)
#        echo OCAMLOPTFLAGS $(OCAMLOPTFLAGS)
