OBJECTS_C = ml_gtk_mathview.o
OBJECTS = gtk_mathview.cmo gtkMathView.cmo gMathView.cmo gMathViewAux.cmo
OBJECTS_OPT = gtkMathView.cmx gtk_mathview.cmx gMathView.cmx gMathViewAux.cmx
-INST = META gMathView.mli gMathView.cmi gtkMathView.cmi gtk_mathview.cmi gMathViewAux.cmi
+INST = \
+ META gMathView.mli gMathView.cmi gtkMathView.cmi gtk_mathview.cmi \
+ gMathViewAux.cmi gMathViewAux.mli
DIST_FILES = \
- Makefile.in configure.in gMathView.ml gMathView.mli gMathViewAux.ml gtkMathView.ml \
+ Makefile.in configure.in gMathView.ml gMathView.mli \
+ gMathViewAux.ml gMathViewAux.mli gtkMathView.ml \
gtk_mathview.ml ml_gtk_mathview.c META.in .depend debian/ test/ \
configure lablgtkmathview.spec lablgtkmathview.spec.in
DIST_DIR = $(PACKAGE)-$(VERSION)
$(shell gtkmathview-config --libs | sed 's/-rdynamic//g') \
-lmlgdome
-OCAMLC = ocamlfind ocamlc
-OCAMLOPT = ocamlfind ocamlopt
+OCAMLFIND = ocamlfind
+OCAMLC = $(OCAMLFIND) ocamlc
+OCAMLOPT = $(OCAMLFIND) ocamlopt
OCAMLDEP = ocamldep
OCAMLMKLIB = ocamlmklib
OCAML_STUB_DIR = @OCAML_STUB_DIR@
TMPDIR = .test
TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
-all: $(ARCHIVE).cma $(TESTDIR)/test
-opt: $(ARCHIVE).cmxa $(TESTDIR)/test.opt
+all: $(ARCHIVE).cma
+opt: $(ARCHIVE).cmxa
+test: $(TESTDIR)/test
+test.opt: $(TESTDIR)/test.opt
world: all opt
dist:
tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/
rm -rf $(DIST_DIR)/
+deb: dist
+ if [ -d $(DIST_DIR)/ ]; then rm -rf $(DIST_DIR); else true; fi
+ tar xvzf $(DIST_DIR).tar.gz
+ (cd $(DIST_DIR)/ && debuild)
+ rm -rf $(DIST_DIR)
+
ml_gtk_mathview.o: ml_gtk_mathview.c
gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk` `glib-config --cflags` `gtk-config --cflags` `gtkmathview-config --cflags` `gdome-config --cflags` `ocamlfind query -i-format gdome2` $<
install:
test ! -f $(ARCHIVE).cmxa || extra="$(ARCHIVE).a $(ARCHIVE).cmxa" ; \
if [ "$(PREFIX)" = "" ]; then \
- ocamlfind install $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
+ $(OCAMLFIND) install \
+ $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
+ ln -fs $(DLL) $(shell $(OCAMLFIND) printconf destdir)/stublibs/lib$(ARCHIVE).so; \
else \
- ocamlfind install -destdir $(PREFIX) $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
+ $(OCAMLFIND) install -destdir $(PREFIX) \
+ $(PACKAGE) $(OBJECTS_C) $(ARCHIVE).cma $(DLL) $(INST) $$extra; \
+ ln -fs $(DLL) $(PREFIX)/stublibs/lib$(ARCHIVE).so; \
fi
uninstall: