Started to copy the import tool from libunbin.
[ocaml-bitstring.git] / Makefile.in
index ff5945b..b535b7a 100644 (file)
@@ -32,11 +32,17 @@ OCAMLOPTPACKAGES =
 
 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 $@ $^
@@ -62,6 +68,7 @@ test: pa_bitmatch.cmo bitmatch.cma
          $$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 \
@@ -70,6 +77,7 @@ examples: pa_bitmatch.cmo bitmatch.cma
            -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 \
@@ -92,11 +100,13 @@ clean:
        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.
 
@@ -113,6 +123,7 @@ install:
        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.
 
@@ -124,6 +135,7 @@ install:
        $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) -c $<
 
 depend: .depend
+       @for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
 
 .depend: bitmatch.ml bitmatch.mli
        rm -f .depend