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

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

# Declare the name of the program
PROGRAM = sasybel

# Declare the files the program is built from
FILES[] =
        main
        ast
        slexer
        sparser
        stoken
        transform

OCAMLFLAGS += -w z

# 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: sasybel

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

beluga: $(OCamlProgram $(PROGRAM), $(FILES))
