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
13 EXTLIB
=extlib-
$(VERSION
)
14 EXTMARKER
=$(EXTLIB
)/.marker
16 all: depend extLib.cma META
17 all.opt
: depend extLib.cmxa META
20 rm -f .depend META extLib.cm
[ioxa
] extLib.
[ao
] \
21 $(EXTLIB
)/*.cm
[ioxa
] extLib.cmxa \
29 $(EXTMARKER
): $(EXTLIB
).
tar.gz
34 @echo
"$@ not found. Please download it and drop it in this directory ($(pwd))."
37 .PHONEY
: all all.opt
clean distclean depend
41 enum bitSet dynArray extArray extHashtbl extList extString global IO option \
42 pMap std uChar uTF8 base64 unzip refList optParse dllist
44 MLI
=$(MODULES
:%=$(EXTLIB
)/%.mli
)
45 SRC
=$(MODULES
:%=$(EXTLIB
)/%.ml
) $(EXTLIB
)/extLib.ml
47 # note: the interface files must be build at must once when compiling both 'all' and 'all.opt'
48 # otherwise errors such as 'module X makes inconsistent assumptions about interface Y' may
49 # arise. The dependencies on this marker establishes this sharing.
50 .mli-marker
: $(MLI
) $(SRC
)
51 $(OCAMLC
) -c
-thread
-I
$(EXTLIB
) $(MLI
)
54 extLib.cma
: .mli-marker
$(SRC
)
55 $(OCAMLC
) -a
-custom
-thread
-I
$(EXTLIB
) -o extLib.cma
$(MLI
) $(SRC
)
57 extLib.cmxa
: .mli-marker
$(SRC
)
58 $(OCAMLOPT
) -a
-linkall
-thread
-I
$(EXTLIB
) -o extLib.cmxa
$(SRC
)