I'm following this OCamlbuild example, and accordingly have created the Makefile below:
OCB_FLAGS = -use-ocamlfind -I src -I lib
OCB = ocamlbuild $(OCB_FLAGS)
check: ocamlfind query core async
clean: $(OCB) -clean
byte: $(OCB) main.byte
native: $(OCB) main.native
.PHONY: check clean byte native
The root directory contains two sub-directories, src and lib. The src sub-directory contains the file main.ml.
When I execute any of the targets, e.g. make clean
, make byte
, etc., I receive the error message:
make: *** No rule to make target 'ocamlfind', needed by 'check'. Stop.
or
make: *** No rule to make target 'ocamlbuild', needed by 'byte'. Stop.
I'd appreciate help in understanding the cause of and solution to this error. Thanks.