1 # make all: make bytecode archives
2 # make opt: make native archives
3 #----------------------------------------------------------------------
8 $(MAKE) -f Makefile.code pxp_types.cma
9 $(MAKE) -f Makefile.code pxp_lex_iso88591.cma
10 if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cma; else rm -f pxp_lex_utf8.cma; fi
11 $(MAKE) -f Makefile.code pxp_engine.cma
12 if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmo; else rm -f pxp_utf8.cmo; fi
15 $(MAKE) -f Makefile.code pxp_types.cmxa
16 $(MAKE) -f Makefile.code pxp_lex_iso88591.cmxa
17 if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cmxa; else rm -f pxp_lex_utf8.cmxa; fi
18 $(MAKE) -f Makefile.code pxp_engine.cmxa
19 if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmx; else rm -f pxp_utf8.cmx; fi
21 #----------------------------------------------------------------------
23 pxp_types.cma: $(OBJECTS_types)
24 $(OCAMLC) -a -o pxp_types.cma $(OBJECTS_types)
26 pxp_types.cmxa: $(XOBJECTS_types)
27 $(OCAMLOPT) -a -o pxp_types.cmxa $(XOBJECTS_types)
29 pxp_engine.cma: $(OBJECTS_engine)
30 $(OCAMLC) -a -o pxp_engine.cma $(OBJECTS_engine)
32 pxp_engine.cmxa: $(XOBJECTS_engine)
33 $(OCAMLOPT) -a -o pxp_engine.cmxa $(XOBJECTS_engine)
36 # The following rules are "phony" to force 'make' to go into the
37 # "lexers" subdirectory.
39 .PHONY: pxp_lex_iso88591.cma
40 pxp_lex_iso88591.cma: $(CMI_types)
41 $(MAKE) -C lexers all_iso88591
42 cp lexers/pxp_lex_iso88591.cma .
44 .PHONY: pxp_lex_iso88591.cmxa
45 pxp_lex_iso88591.cmxa: $(CMI_types)
46 $(MAKE) -C lexers opt_iso88591
47 cp lexers/pxp_lex_iso88591.cmxa lexers/pxp_lex_iso88591.a .
49 .PHONY: pxp_lex_utf8.cma
50 pxp_lex_utf8.cma: $(CMI_types)
51 $(MAKE) -C lexers all_utf8
52 cp lexers/pxp_lex_utf8.cma .
54 .PHONY: pxp_lex_utf8.cmxa
55 pxp_lex_utf8.cmxa: $(CMI_types)
56 $(MAKE) -C lexers opt_utf8
57 cp lexers/pxp_lex_utf8.cmxa lexers/pxp_lex_utf8.a .
59 #----------------------------------------------------------------------
63 OCAMLC = $(OCAMLFIND) ocamlc -package "$(PACKAGES)" \
64 -g -I lexers $(OPTIONS) $(ROPTIONS)
65 OCAMLOPT = $(OCAMLFIND) ocamlopt -package "$(PACKAGES)" \
66 -p -I lexers $(OPTIONS) $(ROPTIONS)
67 OCAMLDEP = ocamldep $(OPTIONS)
70 depend: *.ml *.mli pxp_yacc.ml
71 $(OCAMLDEP) *.ml *.mli >depend
73 .SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .m2y
88 ./m2parsergen/m2parsergen < $< >`basename $< .m2y`.ml || { rm -f `basename $< .m2y`.ml; false; }
93 # Generated dependencies: