configure.in gMathView.ml gtkMathView.ml gtk_mathview.ml \
ml_gtk_mathview.c META.in
DOC_FILES = AUTHORS COPYING ChangeLog NEWS README
-REQUIRES = gdome lablgtk
+REQUIRES = gdome2 lablgtk
PREDICATES =
MLFLAGS = -labels
OCAMLDEP = ocamldep
ARCHIVE = $(PACKAGE).cma
-ARCHIVE_C = $(PACKAGE).a
+ARCHIVE_A = $(PACKAGE).a
+ARCHIVE_SO = dll$(PACKAGE).so
ARCHIVE_OPT = $(PACKAGE).cmxa
TESTDIR = ./test
TMPDIR = .test
TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
-all: $(OBJECTS_C) $(ARCHIVE) $(TESTDIR)/test
+all: $(ARCHIVE) $(ARCHIVE_SO) $(TESTDIR)/test
-opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(TESTDIR)/test.opt
+opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(ARCHIVE_A) $(ARCHIVE_SO) $(TESTDIR)/test.opt
dist:
rm -rf $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
ml_gtk_mathview.o: ml_gtk_mathview.c
- gcc -c -I$(INCLUDEDIR) `ocamlfind query -i-format lablgtk` `glib-config --cflags` `gtk-config --cflags` `gtkmathview-config --cflags` `gdome-config --cflags` `ocamlfind query -i-format gdome` $<
+ gcc -c -I$(INCLUDEDIR) `ocamlfind query -i-format lablgtk` `glib-config --cflags` `gtk-config --cflags` `gtkmathview-config --cflags` `gdome-config --cflags` `ocamlfind query -i-format gdome2` $<
.SUFFIXES: .cmo .cmi .cmx .ml .mli
$(OCAMLDEP) *.ml *.mli >.depend
include .depend
-$(ARCHIVE): $(OBJECTS)
- $(OCAMLC) -a -custom -package "$(REQUIRES)" \
+$(ARCHIVE): $(OBJECTS) $(ARCHIVE_SO)
+ $(OCAMLC) -a -package "$(REQUIRES)" \
-predicates "$(PREDICATES)" -o $@ $^ \
- -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`"
-
-$(ARCHIVE_OPT): $(OBJECTS_OPT)
+ -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`" -dllib -l$(PACKAGE)
+$(ARCHIVE_OPT) $(ARCHIVE_A): $(OBJECTS_OPT)
$(OCAMLOPT) -a -package "$(REQUIRES)" \
-predicates "$(PREDICATES)" -o $@ $^ \
-cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`"
+$(ARCHIVE_SO): $(OBJECTS_C)
+ gcc -shared -o $@ $< `gtkmathview-config --libs` -lmlgdome -L `ocamlfind query gdome2`
+
+
$(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE) $(TESTDIR)/test.ml
mkdir -p $(TMPPKGDIR)
cp $(OBJECTS_C) $(ARCHIVE) $(INST) $(TMPPKGDIR)
cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make
rm -r $(TMPDIR)
-$(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE_C) $(ARCHIVE_OPT) $(TESTDIR)/test.ml
+$(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE_A) $(ARCHIVE_OPT) $(TESTDIR)/test.ml
mkdir -p $(TMPPKGDIR)
- cp $(OBJECTS_C) $(ARCHIVE_C) $(ARCHIVE_OPT) $(INST) $(TMPPKGDIR)
+ cp $(OBJECTS_C) $(ARCHIVE_A) $(ARCHIVE_OPT) $(INST) $(TMPPKGDIR)
cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make opt
rm -r $(TMPDIR)
install:
- test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_C) $(ARCHIVE_OPT)" ; \
- ocamlfind install $(PACKAGE) $(OBJECTS_C) $(ARCHIVE) $(INST) $$extra
+ test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_A) $(ARCHIVE_OPT)" ; \
+ ocamlfind install $(PACKAGE) $(OBJECTS_C) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra
uninstall:
ocamlfind remove $(PACKAGE)
clean:
- rm -f *.o *.cm? $(ARCHIVE) $(ARCHIVE_C) $(ARCHIVE_OPT)
+ rm -f *.o *.cm? $(ARCHIVE) $(ARCHIVE_A) $(ARCHIVE_SO) $(ARCHIVE_OPT)
cd $(TESTDIR) ; make clean
rm -rf $(TMPDIR)
-<math display="block">
- <mrow helm:xref="SELECTION OK">
- <mo>∫</mo>
- <mo>⁡</mo>
- <mfrac>
- <maction>
- <mtext>It's a secret!</mtext>
- <mrow>
- <mrow>
- <mi>a</mi>
- <mo>⁢</mo>
- <mi>x</mi>
- </mrow>
- <mo>+</mo>
- <mi>b</mi>
- </mrow>
- </maction>
- <mrow>
- <msup>
- <mi>x</mi>
- <mn>2</mn>
- </msup>
- <mo>+</mo>
- <mrow>
- <mi>p</mi>
- <mo>⁢</mo>
- <mi>x</mi>
- </mrow>
- <mo>+</mo>
- <mi>q</mi>
- </mrow>
- </mfrac>
- </mrow>
- <mo fontstyle="italic">d</mo>
- <mi>x</mi>
- <mo>=</mo>
- <mrow>
- <mrow>
- <mfrac><mi>a</mi><mn>2</mn></mfrac>
- <mo>⁢</mo>
- <mrow>
- <mi>ln</mi>
- <mo>⁡</mo>
- <mrow>
- <mo>(</mo>
- <mrow>
- <msup><mi>x</mi><mn>2</mn></msup>
- <mo>+</mo>
- <mrow>
- <mi>p</mi>
- <mo>⁢</mo>
- <mi>x</mi>
- </mrow>
- <mo>+</mo>
- <mi>q</mi>
- </mrow>
- <mo>)</mo>
- </mrow>
- </mrow>
- </mrow>
- <mo>+</mo>
- <mrow>
- <mfrac>
- <mrow>
- <mrow>
- <mn>2</mn>
- <mo>⁢</mo>
- <mi>b</mi>
- </mrow>
- <mo>-</mo>
- <mrow>
- <mi>a</mi>
- <mo>⁢</mo>
- <mi>p</mi>
- </mrow>
- </mrow>
- <msqrt>
- <mrow>
- <mrow>
- <mn>4</mn>
- <mo>⁢</mo>
- <mi>q</mi>
- </mrow>
- <mo>-</mo>
- <msup>
- <mi>p</mi>
- <mn>2</mn>
- </msup>
- </mrow>
- </msqrt>
- </mfrac>
- <mo>⁢</mo>
- <mrow>
- <mi xlink:href="JUMPS WORK">arctg</mi>
- <mo>⁡</mo>
- <mfrac>
- <mrow>
- <mrow>
- <mn>2</mn>
- <mo>⁢</mo>
- <mi>x</mi>
- </mrow>
- <mo>+</mo>
- <mi>p</mi>
- </mrow>
- <msqrt>
- <mrow>
- <mrow>
- <mn>4</mn>
- <mo>⁢</mo>
- <mi>q</mi>
- </mrow>
- <mo>-</mo>
- <msup>
- <mi>p</mi>
- <mn>2</mn>
- </msup>
- </mrow>
- </msqrt>
- </mfrac>
- </mrow>
- </mrow>
- <mo>+</mo>
- <mi>c</mi>
- </mrow>
-</math>
+<?xml version="1.0"?>
+
+<!DOCTYPE m:math [
+ <!ENTITY InvisibleTimes "⁢">
+ <!ENTITY ApplyFunction "⁡">
+ <!ENTITY int "∫">
+]>
+
+<m:math display="block" xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <m:mrow helm:xref="SELECTION OK">
+ <m:mo>∫</m:mo>
+ <m:mo>⁡</m:mo>
+ <m:mfrac>
+ <m:maction>
+ <m:mtext>It's a secret!</m:mtext>
+ <m:mrow>
+ <m:mrow>
+ <m:mi>a</m:mi>
+ <m:mo>⁢</m:mo>
+ <m:mi>x</m:mi>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mi>b</m:mi>
+ </m:mrow>
+ </m:maction>
+ <m:mrow>
+ <m:msup>
+ <m:mi>x</m:mi>
+ <m:mn>2</m:mn>
+ </m:msup>
+ <m:mo>+</m:mo>
+ <m:mrow>
+ <m:mi>p</m:mi>
+ <m:mo>⁢</m:mo>
+ <m:mi>x</m:mi>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mi>q</m:mi>
+ </m:mrow>
+ </m:mfrac>
+ </m:mrow>
+ <m:mo fontstyle="italic">d</m:mo>
+ <m:mi>x</m:mi>
+ <m:mo>=</m:mo>
+ <m:mrow>
+ <m:mrow>
+ <m:mfrac><m:mi>a</m:mi><m:mn>2</m:mn></m:mfrac>
+ <m:mo>⁢</m:mo>
+ <m:mrow>
+ <m:mi>ln</m:mi>
+ <m:mo>⁡</m:mo>
+ <m:mrow>
+ <m:mo>(</m:mo>
+ <m:mrow>
+ <m:msup><m:mi>x</m:mi><m:mn>2</m:mn></m:msup>
+ <m:mo>+</m:mo>
+ <m:mrow>
+ <m:mi>p</m:mi>
+ <m:mo>⁢</m:mo>
+ <m:mi>x</m:mi>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mi>q</m:mi>
+ </m:mrow>
+ <m:mo>)</m:mo>
+ </m:mrow>
+ </m:mrow>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mrow>
+ <m:mfrac>
+ <m:mrow>
+ <m:mrow>
+ <m:mn>2</m:mn>
+ <m:mo>⁢</m:mo>
+ <m:mi>b</m:mi>
+ </m:mrow>
+ <m:mo>-</m:mo>
+ <m:mrow>
+ <m:mi>a</m:mi>
+ <m:mo>⁢</m:mo>
+ <m:mi>p</m:mi>
+ </m:mrow>
+ </m:mrow>
+ <m:msqrt>
+ <m:mrow>
+ <m:mrow>
+ <m:mn>4</m:mn>
+ <m:mo>⁢</m:mo>
+ <m:mi>q</m:mi>
+ </m:mrow>
+ <m:mo>-</m:mo>
+ <m:msup>
+ <m:mi>p</m:mi>
+ <m:mn>2</m:mn>
+ </m:msup>
+ </m:mrow>
+ </m:msqrt>
+ </m:mfrac>
+ <m:mo>⁢</m:mo>
+ <m:mrow>
+ <m:mi xlink:href="JUMPS WORK">arctg</m:mi>
+ <m:mo>⁡</m:mo>
+ <m:mfrac>
+ <m:mrow>
+ <m:mrow>
+ <m:mn>2</m:mn>
+ <m:mo>⁢</m:mo>
+ <m:mi>x</m:mi>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mi>p</m:mi>
+ </m:mrow>
+ <m:msqrt>
+ <m:mrow>
+ <m:mrow>
+ <m:mn>4</m:mn>
+ <m:mo>⁢</m:mo>
+ <m:mi>q</m:mi>
+ </m:mrow>
+ <m:mo>-</m:mo>
+ <m:msup>
+ <m:mi>p</m:mi>
+ <m:mn>2</m:mn>
+ </m:msup>
+ </m:mrow>
+ </m:msqrt>
+ </m:mfrac>
+ </m:mrow>
+ </m:mrow>
+ <m:mo>+</m:mo>
+ <m:mi>c</m:mi>
+ </m:mrow>
+</m:math>