Committing NON-WORKING cil tools directory. This code all needs
[ocaml-bitstring.git] / cil-tools / Makefile.in
index c66dd21..4acf391 100644 (file)
@@ -44,12 +44,32 @@ bitmatch-import-c.opt: bitmatch_import_c.cmx
 
 test:
 
-examples:
+# Examples.
+
+#DEBUG         =
+DEBUG          = --debug
+LINUX_HEADERS  = linux-2.6.25.4-headers
+LINUX_INCLUDES = -I $(LINUX_HEADERS)
+
+examples: ext3.ml task_struct.ml
+
+ext3.ml: ext3.c bitmatch-import-c
+       cd $(LINUX_HEADERS) && ln -sf asm-x86 asm
+       rm -f $@.new
+       ./bitmatch-import-c $(DEBUG) $(LINUX_INCLUDES) $< > $@.new
+       mv $@.new $@
+
+task_struct.ml: task_struct.c bitmatch-import-c
+       cd $(LINUX_HEADERS) && ln -sf asm-x86 asm
+       rm -f $@.new
+       ./bitmatch-import-c $(DEBUG) $(LINUX_INCLUDES) $< > $@.new
+       mv $@.new $@
 
 # Clean.
 
 clean:
        rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o
+       rm -f bitmatch-import-c bitmatch-import-c.opt
 
 distclean: clean
 
@@ -68,7 +88,7 @@ install:
 
 depend: .depend
 
-.depend: $(wildcard *.ml) $(wildcard *.mli)
+.depend: bitmatch_import_c.ml
        rm -f .depend
        $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $^ > $@