PACKAGE = @PACKAGE@ VERSION = @VERSION@ INCLUDEDIR = @OCAML_INCLUDE_DIR@ PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc PREFIX = OBJECTS_C = ml_gtk_mathview.o OBJECTS = gtkMathViewProps.cmo ogtkMathViewProps.cmo gtk_mathview.cmo gtkMathView.cmo gMathView.cmo gMathViewAux.cmo OBJECTS_OPT = gtkMathViewProps.cmx ogtkMathViewProps.cmx gtkMathView.cmx gtk_mathview.cmx gMathView.cmx gMathViewAux.cmx GENERATED_FILES = gtkMathViewProps.ml ogtkMathViewProps.ml NULL = INST = \ META \ gMathView.mli \ gMathView.cmi \ gtkMathView.cmi \ gtk_mathview.cmi \ gtkMathViewProps.cmi \ ogtkMathViewProps.cmi \ gMathViewAux.cmi \ gMathViewAux.mli \ $(NULL) DIST_FILES = \ 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 gtkMathView.props DIST_DIR = $(PACKAGE)-$(VERSION) DOC_FILES = AUTHORS COPYING ChangeLog NEWS README LICENSE REQUIRES = gdome2 lablgtk2 PREDICATES = SHARED_LIBS = @GDOME_LIBS@ @GTKMATHVIEW_LIBS@ OCAMLFIND = ocamlfind OCAMLC = $(OCAMLFIND) ocamlc OCAMLOPT = $(OCAMLFIND) ocamlopt OCAMLDEP = ocamldep OCAMLMKLIB = ocamlmklib OCAML_STUB_DIR = @OCAML_STUB_DIR@ ARCHIVE = $(PACKAGE) DLL = dll$(ARCHIVE).so TESTDIR = ./test TMPDIR = .test TMPPKGDIR = $(TMPDIR)/$(PACKAGE) all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL) opt: $(ARCHIVE).cmxa $(ARCHIVE).a test: $(TESTDIR)/test test.opt: $(TESTDIR)/test.opt world: all opt dist: rm -rf $(DIST_DIR)/ mkdir $(DIST_DIR)/ cp -a $(DIST_FILES) $(DOC_FILES) $(DIST_DIR)/ -find $(DIST_DIR) -name CVS -type d -exec rm -rf {} \; -find $(DIST_DIR) -name .cvsignore -type f -exec rm {} \; 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) $(GENERATED_FILES): gtkMathView.props ml_gtk_mathview.o: ml_gtk_mathview.c gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk2` @GTKMATHVIEW_CFLAGS@ @GDOME_CFLAGS@ `ocamlfind query -i-format gdome2` $< .SUFFIXES: .cmo .cmi .cmx .ml .mli .ml.cmo: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< .mli.cmi: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< .ml.cmx: $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $< %Props.ml o%Props.ml: %.props $(PROPCC) $(PROPCC) $< depend: *.ml *.mli $(GENERATED_FILES) $(OCAMLDEP) *.ml *.mli >.depend include .depend $(ARCHIVE).cma: $(OBJECTS) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) $(ARCHIVE).cmxa: $(OBJECTS_OPT) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) lib$(ARCHIVE).a $(DLL): $(OBJECTS_C) $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) $(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE).cma $(TESTDIR)/test.ml mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(DLL) $(ARCHIVE).cma $(INST) $(TMPPKGDIR) cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make rm -r $(TMPDIR) $(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(TESTDIR)/test.ml mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(INST) $(TMPPKGDIR) cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make opt rm -r $(TMPDIR) install: test ! -f $(ARCHIVE).cmxa || extra="$(ARCHIVE).a $(ARCHIVE).cmxa" ; \ if [ "$(PREFIX)" = "" ]; then \ $(OCAMLFIND) install \ $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a \ $(DLL) $(INST) $$extra; \ else \ $(OCAMLFIND) install -destdir $(PREFIX) \ $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a \ $(DLL) $(INST) $$extra; \ fi uninstall: if [ "$(PREFIX)" = "" ]; then \ ocamlfind remove $(PACKAGE); \ else \ ocamlfind remove -destdir $(PREFIX) $(PACKAGE); \ fi clean: rm -f *.[ao] *.cm[iaxo] *.cmxa *.so $(GENERATED_FILES) cd $(TESTDIR) ; make clean rm -rf $(TMPDIR) distclean: clean rm -f config.log config.cache config.status Makefile META cd $(TESTDIR) ; make distclean