X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=cil-tools%2FMakefile.in;h=c596b0e749e410eb6481440d7bf0d399255649d0;hb=c77f727a7043742154cc624dc34770a74f3d266e;hp=c50e05cb86cc444af1e4b90c9fc56c7cf9fa3931;hpb=03f7ce1afc9620e4b5f48817b5074a73b0c48048;p=ocaml-bitstring.git diff --git a/cil-tools/Makefile.in b/cil-tools/Makefile.in index c50e05c..c596b0e 100644 --- a/cil-tools/Makefile.in +++ b/cil-tools/Makefile.in @@ -32,6 +32,8 @@ OCAMLOPTFLAGS = OCAMLOPTPACKAGES = $(OCAMLCPACKAGES) OCAMLOPTLIBS = $(OCAMLOPTPACKAGES) camlp4lib.cmxa -linkpkg ../bitmatch.cmxa ../bitmatch_persistent.cmxa +PP = -pp "camlp4o -I .. bitmatch.cma bitmatch_persistent.cma pa_bitmatch.cmo" + OCAMLDOCFLAGS = -html -sort all: bitmatch-import-c bitmatch-import-c.opt @@ -45,20 +47,37 @@ bitmatch-import-c.opt: bitmatch_import_c.cmx test: # Examples. +# +# To compile task_struct you'll need to grab a copy of the Linux +# kernel original header files and set the directory below. #DEBUG = DEBUG = --debug -LINUX_HEADERS = linux-2.6.25.4-headers +LINUX_HEADERS = linux-2.6.25.7-headers LINUX_INCLUDES = -I $(LINUX_HEADERS) -examples: ext3.ml task_struct.ml +#EXAMPLES = ext3 task_struct +EXAMPLES = ext3 + +examples: $(EXAMPLES) + +ext3: ext3.cmo + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@ + +ext3.cmo: ext3.ml ext3.bmpp + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@ ext3.bmpp: ext3.c bitmatch-import-c - cd $(LINUX_HEADERS) && ln -sf asm-x86 asm rm -f $@.new - ./bitmatch-import-c $(DEBUG) $(LINUX_INCLUDES) $< > $@.new + ./bitmatch-import-c $(DEBUG) $< > $@.new mv $@.new $@ +task_struct: task_struct.cmo + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCLIBS) $< -o $@ + +task_struct.cmo: task_struct.ml task_struct.bmpp + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(PP) -c $< -o $@ + task_struct.bmpp: task_struct.c bitmatch-import-c cd $(LINUX_HEADERS) && ln -sf asm-x86 asm rm -f $@.new @@ -68,7 +87,7 @@ task_struct.bmpp: task_struct.c bitmatch-import-c # Clean. clean: - rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o + rm -f core *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.a *.o *.bmpp rm -f bitmatch-import-c bitmatch-import-c.opt distclean: clean