]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/metadata/table_creator/Makefile
some makefile work
[helm.git] / helm / ocaml / metadata / table_creator / Makefile
index 8b08e6d51015d4c365e78da3e226a9f507cc1f11..06335681c0db4f7b5e3f220d5796150f17c56292 100644 (file)
@@ -1,20 +1,35 @@
 REQUIRES = mysql helm-metadata
+OCAMLFIND = ocamlfind
 
 INTERFACE_FILES = 
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml) 
 EXTRA_OBJECTS_TO_INSTALL =
-EXTRA_OBJECTS_TO_CLEAN =table_creator table_creator.opt
+EXTRA_OBJECTS_TO_CLEAN = \
+       table_creator table_creator.opt table_destructor table_destructor.opt
 
-all: table_creator
-opt: table_creator.opt
+all: table_creator table_destructor
+       @echo -n
+opt: table_creator.opt table_destructor.opt
+       @echo -n
 
-table_creator: table_creator.ml
-       $(OCAMLFIND) ocamlc \
+table_creator: table_creator.ml ../metadata.cma
+       @echo "    OCAMLC $<"
+       @$(OCAMLFIND) ocamlc \
                -thread -package mysql,helm-metadata -linkpkg -o $@ $<
 
-table_creator.opt: table_creator.ml
-       $(OCAMLFIND) ocamlopt \
+table_destructor: table_creator
+       @ln -f $< $@
+
+table_creator.opt: table_creator.ml ../metadata.cmxa
+       @echo "    OCAMLOPT $<"
+       @$(OCAMLFIND) ocamlopt \
                -thread -package mysql,helm-metadata -linkpkg -o $@ $<
-               
-include ../../Makefile.common
+
+table_destructor.opt: table_creator.opt
+       @ln  -f $< $@
+
+clean:
+       rm -f *.cm[iox] *.a *.o
+       rm -f table_creator table_creator.opt table_destructor table_destructor.opt
+
 include .depend