]> matita.cs.unibo.it Git - helm.git/blob - helm/software/DEVEL/mathml_editor/ocaml/Makefile.am
thanks to the new fixes to notation, I can define \land for both pairs and
[helm.git] / helm / software / DEVEL / mathml_editor / ocaml / Makefile.am
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
10 OCAMLMKLIBFLAGS = 
11 else
12 OCAMLMKLIBFLAGS = -custom
13 endif
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
20 INIT =
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)
31
32 EXTRA_DIST =    \
33         META.in mathml_editor.ml mathml_editor.mli i_mathml_editor.ml   \
34         c_mathml_editor.h .depend
35
36 if HAVE_OCAMLOPT_COND
37 noinst_DATA = $(BYTE_STUFF) $(NATIVE_STUFF)
38 else
39 noinst_DATA = $(BYTE_STUFF)
40 endif
41
42 noinst_LTLIBRARIES = libmlmathml-editor.la
43 libmlmathml_editor_la_SOURCES = \
44   c_mathml_editor.cc \
45   ml_mathml_editor.c
46
47 if HAVE_OCAMLOPT_COND
48 install-data-local:     $(BYTE_INSTALL_STUFF) $(NATIVE_INSTALL_STUFF)
49 else
50 install-data-local:     $(BYTE_INSTALL_STUFF)
51 endif
52         $(mkinstalldirs) $(OCAMLSTDLIBDIR) $(OCAMLSTUBDIR)
53         chmod -x $(DLL)
54         $(OCAMLFIND) install -destdir $(OCAMLSTDLIBDIR) $(PKGNAME) $^
55         ln -fs $(DLL) $(OCAMLSTUBDIR)/lib$(ARCHIVE).so
56
57 CLEANFILES =    \
58         $(ARCHIVE).{cma,cmxa,a} $(CMI_S) $(CMO_S) $(CMX_S) ml_mathml_editor.o   \
59         $(DLL) $(INIT).cm[iox] libmlmathml-editor.a
60
61 INCLUDES =      \
62         $(GDOME_CFLAGS) $(MLGDOME_CFLAGS) \
63         $(GMETADOM_CFLAGS) $(GDOMEXSLT_CFLAGS) \
64         -I$(top_srcdir)/src
65
66 $(ARCHIVE).cma: $(CMO_S)
67         $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMO_S) $(SHARED_LIBS)
68
69 $(ARCHIVE).cmxa: $(CMX_S)
70         $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(CMX_S) $(SHARED_LIBS)
71
72 $(DLL) $(ARCHIVE).a: $(O_S)
73         $(OCAMLMKLIB) -o $(ARCHIVE) -L@OCAMLSTUBDIR@ $(SHARED_LIBS) $(O_S:%.o=.libs/%.o)
74
75 %.cmi: %.mli
76         $(OCAMLC) -c $<
77 %.cmo %.cmi: %.ml
78         $(OCAMLC) -c $<
79 %.cmx: %.ml %.cmi
80         $(OCAMLOPT) -c $<
81
82 i_mathml_editor.cmo: i_mathml_editor.ml
83         $(OCAMLC) -c $<
84 i_mathml_editor.cmx: i_mathml_editor.ml
85         $(OCAMLOPT) -c $<
86
87 depend: *.ml
88         $(OCAMLDEP) *.ml *.mli >.depend
89 include .depend
90