3
include $(TOP_DIR)/Makefile.rules
6
INPUT = $(TOP_DIR)/src/pxp-lex
7
MLL = $(shell echo pxp_wlex_$(ENC)_*.mll)
10
OCAMLC_OPTIONS += -I $(TOP_DIR)/src/pxp-engine
11
OCAMLOPT_OPTIONS += $(OCAMLC_OPTIONS)
12
PACKAGES = netstring,wlexing
14
.PHONY: all opt generate clean CLEAN distclean install uninstall
16
all: pxp_wlex_$(ENC).cma pxp_wlex_link_$(ENC).cmo
18
opt: pxp_wlex_$(ENC).cmxa pxp_wlex_link_$(ENC).cmx
20
pxp_wlex_$(ENC).cma: $(CMO)
21
$(OCAMLC) -o pxp_wlex_$(ENC).cma -a $(CMO)
23
pxp_wlex_$(ENC).cmxa: $(CMX)
24
$(OCAMLOPT) -o pxp_wlex_$(ENC).cmxa -a $(CMX)
28
gen_done: $(INPUT)/*.def $(INPUT)/*.src
29
$(LEXPP) -charclasses "$(INPUT)/char_classes_wlex.def" \
30
-lexsrc "$(INPUT)/lex.src" \
31
-linksrc "$(INPUT)/link_wlex.src" \
34
-outlexprefix "pxp_wlex_$(ENC)" \
35
-outlinkprefix "pxp_wlex_link_$(ENC)"
36
for mll in *.mll; do echo "Doing $$mll:"; $(WLEX) $$mll; done
40
rm -f $(CLEAN_LIST) *.ml *.mll gen_done
44
# distclean is not clean, because the distribution contains the .ml files
47
rm -f $(CLEAN_LIST) META
50
files=`$(COLLECT_FILES) *.mli *.cmi *.cma *.cmxa *.a pxp_wlex_link_*.cmo pxp_wlex_link_*.cmx pxp_wlex_link_*.o META` && \
51
$(OCAMLFIND) install pxp-wlex-$(ENC) $$files
54
$(OCAMLFIND) remove pxp-wlex-$(ENC)