1 PKGNAME = mathml-editor
2 ARCHIVE = mlmathml-editor
3 REQUIRES = gdome2 gdome2-xslt
4 OCAMLFIND = @OCAMLFIND@
5 OCAMLFLAGS = -I $(top_srcdir)/ocaml
6 OCAMLC = $(OCAMLFIND) @OCAMLC@ $(OCAMLFLAGS) -package "$(REQUIRES)"
7 OCAMLOPT = $(OCAMLFIND) @OCAMLOPT@ $(OCAMLFLAGS) -package "$(REQUIRES)"
8 OCAMLDEP = $(OCAMLFIND) @OCAMLDEP@ $(OCAMLFLAGS) -package "$(REQUIRES)"
9 if HAVE_SHAREDLIBS_COND
12 OCAMLMKLIBFLAGS = -custom
14 OCAMLMKLIB = @OCAMLMKLIB@ $(OCAMLMKLIBFLAGS)
15 DLL = dll$(ARCHIVE).so
16 OCAMLSTDLIBDIR = $(DESTDIR)/@OCAMLSTDLIBDIR@
17 OCAMLSTUBDIR = $(DESTDIR)/@OCAMLSTUBDIR@
18 OCAMLINSTALLDIR = $(OCAMLSTDLIBDIR)/$(PKGNAME)
19 MODULES = i_mathml_editor mathml_editor
21 CMI_S = $(MODULES:%=%.cmi)
22 CMO_S = $(MODULES:%=%.cmo)
23 CMX_S = $(MODULES:%=%.cmx)
24 O_S = ml_mathml_editor.o c_mathml_editor.o
25 LO_S = $(O_S:%.o=%.lo)
26 SHARED_LIBS = $(GMETADOM_LIBS) $(GDOMEXSLT_LIBS) -lmlgdome2-xslt -lmlgdome -lstdc++ -L$(top_builddir)/src/.libs/ -leditex
27 BYTE_STUFF = i_mathml_editor.cmi mathml_editor.cmi $(ARCHIVE).cma $(DLL) lib$(ARCHIVE).a
28 NATIVE_STUFF = $(ARCHIVE).cmxa $(ARCHIVE).a
29 BYTE_INSTALL_STUFF = $(BYTE_STUFF) META mathml_editor.mli
30 NATIVE_INSTALL_STUFF = $(NATIVE_STUFF)
33 META.in mathml_editor.ml mathml_editor.mli i_mathml_editor.ml \
34 c_mathml_editor.h .depend
37 noinst_DATA = $(BYTE_STUFF) $(NATIVE_STUFF)
39 noinst_DATA = $(BYTE_STUFF)
42 noinst_LTLIBRARIES = libmlmathml-editor.la
43 libmlmathml_editor_la_SOURCES = \
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: $(CMO_S)
67 $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMO_S) $(SHARED_LIBS)
69 $(ARCHIVE).cmxa: $(CMX_S)
70 $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMX_S) $(SHARED_LIBS)
72 $(DLL) $(ARCHIVE).a: $(O_S)
73 $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(SHARED_LIBS) $(O_S:%.o=.libs/%.o)
82 i_mathml_editor.cmo: i_mathml_editor.ml
84 i_mathml_editor.cmx: i_mathml_editor.ml
88 $(OCAMLDEP) *.ml *.mli >.depend