1 # This Makefile serves as a wrapper to bundle the
2 # extlib package without modifications.
4 # the extlib package is a conventional package that
5 # requires a plain compilation of its .ml files and
6 # then packed into an archive file.
8 ifneq ($(MAKECMDGOALS
),distclean)
9 include ..
/..
/Makefile.config
16 EXTLIB
=extlib-
$(VERSION
)
17 EXTMARKER
=$(EXTLIB
)/.marker
21 all-build
: $(EXTMARKER
) extLib.cma META
24 @
$(MAKE
) all-opt-build
25 all-opt-build
: $(EXTMARKER
) extLib.cmxa META
28 rm -f .depend META extLib.cm
[ioxa
] extLib.
[ao
] \
29 $(EXTLIB
)/*.cm
[ioxa
] extLib.cmxa \
37 $(EXTMARKER
): $(EXTLIB
).
tar.gz hashtable-ocaml4-compat.patch
39 $(PATCH
) -d
$(EXTLIB
) -p1
< .
/hashtable-ocaml4-compat.patch
43 @echo
"$@ not found. Please download it and drop it in this directory ($(pwd))."
46 .PHONEY
: all all.opt all-build all-opt-build
clean distclean depend
50 enum bitSet dynArray extArray extHashtbl extList extString global IO option \
51 pMap std uChar uTF8 base64 unzip refList optParse dllist
53 MLI
=$(MODULES
:%=$(EXTLIB
)/%.mli
)
54 SRC
=$(MODULES
:%=$(EXTLIB
)/%.ml
) $(EXTLIB
)/extLib.ml
56 # note: the interface files must be build at must once when compiling both 'all' and 'all.opt'
57 # otherwise errors such as 'module X makes inconsistent assumptions about interface Y' may
58 # arise. The dependencies on this marker establishes this sharing.
59 .mli-marker
: $(MLI
) $(SRC
)
60 $(OCAMLC
) $(OCAMLCFLAGS
) -c
-I
$(EXTLIB
) $(MLI
)
63 extLib.cma
: .mli-marker
$(SRC
)
64 $(OCAMLC
) $(OCAMLCFLAGS
) -a
-I
$(EXTLIB
) -o extLib.cma
$(MLI
) $(SRC
)
66 extLib.cmxa
: .mli-marker
$(SRC
)
67 $(OCAMLOPT
) $(OPTFLAGS
) -a
-I
$(EXTLIB
) -o extLib.cmxa
$(SRC
)
72 include ..
/..
/Makefile.common