1 PKGNAME = mathml-editor
2 ARCHIVE = mlmathml-editor
3 REQUIRES = gdome2 gdome2-xslt
4 OCAMLFIND = @OCAMLFIND@
5 OCAMLC = $(OCAMLFIND) @OCAMLC@ -package "$(REQUIRES)"
6 OCAMLOPT = $(OCAMLFIND) @OCAMLOPT@ -package "$(REQUIRES)"
7 OCAMLDEP = $(OCAMLFIND) @OCAMLDEP@ -package "$(REQUIRES)"
8 OCAMLMKLIB = @OCAMLMKLIB@
10 OCAMLSTDLIBDIR = $(DESTDIR)/@OCAMLSTDLIBDIR@
11 OCAMLSTUBDIR = $(DESTDIR)/@OCAMLSTUBDIR@
12 OCAMLINSTALLDIR = $(OCAMLSTDLIBDIR)/$(PKGNAME)
13 MODULES = i_mathml_editor mathml_editor
15 CMI_S = $(MODULES:%=%.cmi)
16 CMO_S = $(MODULES:%=%.cmo)
17 CMX_S = $(MODULES:%=%.cmx)
18 O_S = ml_mathml_editor.o c_mathml_editor.o
19 SHARED_LIBS = $(GMETADOM_LIBS) $(GDOMEXSLT_LIBS) -lmlgdome2-xslt -lmlgdome
20 BYTE_STUFF = $(ARCHIVE).cma
21 NATIVE_STUFF = $(ARCHIVE).cmxa $(ARCHIVE).a
22 BYTE_INSTALL_STUFF = \
23 i_mathml_editor.cmi mathml_editor.cmi $(ARCHIVE).cma $(DLL) META
24 NATIVE_INSTALL_STUFF = $(ARCHIVE).a $(ARCHIVE).cmxa
27 META.in mathml_editor.ml i_mathml_editor.ml \
28 ml_mathml_editor.h c_mathml_editor.h .depend
31 noinst_DATA = $(BYTE_STUFF) $(NATIVE_STUFF)
33 noinst_DATA = $(BYTE_STUFF)
36 noinst_LTLIBRARIES = libmlmathml_editor.la
37 libmlmathml_editor_la_SOURCES = \
41 #test: test.ml $(ARCHIVE).cma
42 # $(OCAMLC) -o $@ -linkpkg $(INCLUDES) $<
44 #test.opt: test.ml $(ARCHIVE).cmxa
45 # $(OCAMLOPT) -o $@ -linkpkg $(INCLUDES) $<
48 install-data-local: $(BYTE_INSTALL_STUFF) $(NATIVE_INSTALL_STUFF)
50 install-data-local: $(BYTE_INSTALL_STUFF)
52 $(mkinstalldirs) $(OCAMLSTDLIBDIR) $(OCAMLSTUBDIR)
54 $(OCAMLFIND) install -destdir $(OCAMLSTDLIBDIR) $(PKGNAME) $^
55 ln -fs $(DLL) $(OCAMLSTUBDIR)/lib$(ARCHIVE).so
58 $(ARCHIVE).{cma,cmxa,a} $(CMI_S) $(CMO_S) $(CMX_S) ml_mathml_editor.o \
59 $(DLL) $(INIT).cm[iox] libmlmathml_editor.a
62 $(GDOME_CFLAGS) $(MLGDOME_CFLAGS) \
63 $(GMETADOM_CFLAGS) $(GDOMEXSLT_CFLAGS) \
66 $(ARCHIVE).cma $(DLL): $(CMO_S)
67 $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMO_S) $(O_S) $(SHARED_LIBS)
68 $(ARCHIVE).cmxa $(ARCHIVE).a: $(CMX_S)
69 $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMX_S) $(O_S) $(SHARED_LIBS)
78 i_mathml_editor.cmo: i_mathml_editor.ml
80 i_mathml_editor.cmx: i_mathml_editor.ml
84 $(OCAMLDEP) *.ml *.mli >.depend