]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/pxp/pxp/Makefile.code
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / Makefile.code
diff --git a/helm/DEVEL/pxp/pxp/Makefile.code b/helm/DEVEL/pxp/pxp/Makefile.code
new file mode 100644 (file)
index 0000000..3afed39
--- /dev/null
@@ -0,0 +1,96 @@
+# make all:            make bytecode archives
+# make opt:            make native archives
+#----------------------------------------------------------------------
+
+include Makefile.conf
+
+all: 
+       $(MAKE) -f Makefile.code pxp_types.cma
+       $(MAKE) -f Makefile.code pxp_lex_iso88591.cma
+       if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cma; else rm -f pxp_lex_utf8.cma; fi
+       $(MAKE) -f Makefile.code pxp_engine.cma
+       if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmo; else rm -f pxp_utf8.cmo; fi
+
+opt:
+       $(MAKE) -f Makefile.code pxp_types.cmxa
+       $(MAKE) -f Makefile.code pxp_lex_iso88591.cmxa
+       if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cmxa; else rm -f pxp_lex_utf8.cmxa; fi
+       $(MAKE) -f Makefile.code pxp_engine.cmxa
+       if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmx; else rm -f pxp_utf8.cmx; fi
+
+#----------------------------------------------------------------------
+
+pxp_types.cma: $(OBJECTS_types)
+       $(OCAMLC) -a -o pxp_types.cma $(OBJECTS_types)
+
+pxp_types.cmxa: $(XOBJECTS_types)
+       $(OCAMLOPT) -a -o pxp_types.cmxa $(XOBJECTS_types)
+
+pxp_engine.cma: $(OBJECTS_engine)
+       $(OCAMLC) -a -o pxp_engine.cma $(OBJECTS_engine)
+
+pxp_engine.cmxa: $(XOBJECTS_engine)
+       $(OCAMLOPT) -a -o pxp_engine.cmxa $(XOBJECTS_engine)
+
+
+# The following rules are "phony" to force 'make' to go into the
+# "lexers" subdirectory.
+
+.PHONY: pxp_lex_iso88591.cma
+pxp_lex_iso88591.cma: $(CMI_types)
+       $(MAKE) -C lexers all_iso88591
+       cp lexers/pxp_lex_iso88591.cma .
+
+.PHONY: pxp_lex_iso88591.cmxa
+pxp_lex_iso88591.cmxa: $(CMI_types)
+       $(MAKE) -C lexers opt_iso88591
+       cp lexers/pxp_lex_iso88591.cmxa lexers/pxp_lex_iso88591.a .
+
+.PHONY: pxp_lex_utf8.cma
+pxp_lex_utf8.cma: $(CMI_types)
+       $(MAKE) -C lexers all_utf8
+       cp lexers/pxp_lex_utf8.cma .
+
+.PHONY: pxp_lex_utf8.cmxa
+pxp_lex_utf8.cmxa: $(CMI_types)
+       $(MAKE) -C lexers opt_utf8
+       cp lexers/pxp_lex_utf8.cmxa lexers/pxp_lex_utf8.a .
+
+#----------------------------------------------------------------------
+# general rules:
+
+OPTIONS   =
+OCAMLC    = $(OCAMLFIND) ocamlc -package "$(PACKAGES)" \
+              -g -I lexers $(OPTIONS) $(ROPTIONS)
+OCAMLOPT  = $(OCAMLFIND) ocamlopt -package "$(PACKAGES)" \
+              -p -I lexers $(OPTIONS) $(ROPTIONS)
+OCAMLDEP  = ocamldep $(OPTIONS)
+OCAMLFIND = ocamlfind
+
+depend: *.ml *.mli pxp_yacc.ml
+       $(OCAMLDEP) *.ml *.mli >depend
+
+.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .m2y
+
+.ml.cmx:
+       $(OCAMLOPT) -c $<
+
+.ml.cmo:
+       $(OCAMLC) -c $<
+
+.mli.cmi:
+       $(OCAMLC) -c $<
+
+.mll.ml:
+       ocamllex $<
+
+.m2y.ml:
+       ./m2parsergen/m2parsergen < $< >`basename $< .m2y`.ml || { rm -f `basename $< .m2y`.ml; false; }
+
+*.mli:
+
+
+# Generated dependencies:
+
+include depend
+