OCAMLDOCFLAGS = -html -sort
+SUBDIRS =
+ifneq ($(pkg_cil),no)
+SUBDIRS += cil-tools
+endif
+
EXAMPLES = $(patsubst %.ml,%,$(wildcard examples/*.ml))
TESTS = $(patsubst %.ml,%,$(wildcard tests/*.ml))
all: bitmatch.cma bitmatch.cmxa pa_bitmatch.cmo
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
bitmatch.cma: bitmatch_types.cmo bitmatch_config.cmo bitmatch.cmo
$(OCAMLFIND) ocamlc -a -o $@ $^
$$f; \
if [ $$? -ne 0 ]; then exit 1; fi; \
done
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
examples: pa_bitmatch.cmo bitmatch.cma
@for f in $(EXAMPLES); do \
-package unix -linkpkg -I . bitmatch.cma $$f.ml -o $$f; \
if [ $$? -ne 0 ]; then exit 1; fi; \
done
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
print-tests: pa_bitmatch.cmo
@for f in $(TESTS); do \
rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o
rm -f tests/*~ tests/*.cmi tests/*.cmo $(TESTS)
rm -f examples/*~ examples/*.cmi examples/*.cmo $(EXAMPLES)
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
distclean: clean
rm -rf autom4te.cache
rm -f config.log config.status
rm -f config.h Makefile META bitmatch_config.ml
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
# Documentation.
ocamlfind install bitmatch META *.mli *.cmx *.cma *.cmxa *.a \
bitmatch.cmi \
pa_bitmatch.cmo
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
# Standard rules.
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
depend: .depend
+ @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
.depend: bitmatch.ml bitmatch.mli
rm -f .depend