3
include $(TOP_DIR)/Makefile.rules
6
INPUT = $(TOP_DIR)/src/pxp-lex
7
ML = $(shell echo pxp_ulex_$(ENC)_*.ml)
10
OCAMLC_OPTIONS += -I $(TOP_DIR)/src/pxp-engine -syntax camlp4o
11
OCAMLOPT_OPTIONS += -I $(TOP_DIR)/src/pxp-engine -syntax camlp4o
12
PACKAGES = netstring,ulex
14
.PHONY: all opt generate clean CLEAN distclean install uninstall
16
all: pxp_ulex_$(ENC).cma pxp_ulex_link_$(ENC).cmo
18
opt: pxp_ulex_$(ENC).cmxa pxp_ulex_link_$(ENC).cmx
20
pxp_ulex_$(ENC).cma: $(CMO)
21
$(OCAMLC) -o pxp_ulex_$(ENC).cma -a $(CMO)
23
pxp_ulex_$(ENC).cmxa: $(CMX)
24
$(OCAMLOPT) -o pxp_ulex_$(ENC).cmxa -a $(CMX)
28
gen_done: $(INPUT)/*.def $(INPUT)/*.src
29
$(LEXPP) -charclasses "$(INPUT)/char_classes_generic.def" \
30
-lexsrc "$(INPUT)/lex.src" \
31
-linksrc "$(INPUT)/link_ulex.src" \
34
-outlexprefix "pxp_ulex_$(ENC)" \
35
-outlinkprefix "pxp_ulex_link_$(ENC)"
40
camlp4 -I `ocamlfind query ulex` pa_o.cmo pa_op.cmo pa_ulex.cma pr_o.cmo pxp_ulex_utf8_01.ml
43
rm -f $(CLEAN_LIST) *.ml *.mll gen_done
47
# distclean is not clean, because the distribution contains the .ml files
50
rm -f $(CLEAN_LIST) META
53
files=`$(COLLECT_FILES) *.mli *.cmi *.cma *.cmxa *.a pxp_ulex_link_*.cmo pxp_ulex_link_*.cmx pxp_ulex_link_*.o META` && \
54
$(OCAMLFIND) install pxp-ulex-$(ENC) $$files
57
$(OCAMLFIND) remove pxp-ulex-$(ENC)