在窗口上安装Ocamlgraph?

时间:2010-09-13 16:42:40

标签: ocaml

任何人都知道如何在Window上安装Ocamlgraph库? 我在Mingw端口上使用Ocaml安装。无法想办法做到这一点?

3 个答案:

答案 0 :(得分:1)

在Windows上,它有点棘手。但是,仍然可以在Windows上编译ocamlgraph。

要执行此操作,您需要通过替换所有属性字符串来编辑文件“Makefile.in”,即形式字符串@ ... @ like @ OCAMLC @,@ OCAMLOPT @,...在UNIX中,配置脚本只为您自动执行此操作。在Windows上,您需要手动执行此操作非常不方便。还有其他一些事情需要改变:所有UNIX命令。替换“rm -f”==> “德尔”; “cp”==> “复制”;等

安装GNU make然后你可以编译ocamlgraph。之后,将主文件夹中的graph.*复制到Ocaml安装的“lib”文件夹中。在ocamlgraph中创建一个新文件夹lib,然后将*.mli中的所有文件./src/复制到那里。你完成了!

我包含我的“Makefile”供您参考。

    ##########################################################################
#                                                                        #
#  Ocamlgraph: a generic graph library for OCaml                         #
#  Copyright (C) 2004-2010                                               #
#  Sylvain Conchon, Jean-Christophe Filliatre and Julien Signoles        #
#                                                                        #
#  This software is free software; you can redistribute it and/or        #
#  modify it under the te$(RM)s of the GNU Library General Public           #
#  License version 2.1, with the special exception on linking            #
#  described in file LICENSE.                                            #
#                                                                        #
#  This software is distributed in the hope that it will be useful,      #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  #
#                                                                        #
##########################################################################

# Where to install the binaries
DESTDIR =
prefix  =
exec_prefix=${prefix}
datarootdir=${prefix}/share
BINDIR  =$(DESTDIR)${exec_prefix}/bin

# Where to install the man page
MANDIR=${datarootdir}/man

# Other variables set by ./configure
OCAMLC   = ocamlc.opt
OCAMLOPT = ocamlopt.opt
OCAMLDEP = ocamldep -slash
OCAMLDOC = ocamldoc.opt
OCAMLLEX = ocamllex.opt
OCAMLYACC= ocamlyacc
OCAMLLIB = "C:\Program Files\Objective Caml\lib"
OCAMLBEST= opt
OCAMLVERSION = 3.11.0
OCAMLWEB = ocamlweb
OCAMLWIN32 = yes
OCAMLFIND = ocamlfind
RM = del
EXE = 
LIBEXT = .lib
OBJEXT = .obj

# Others global variables
SRCDIR  = src
LIBDIR  = lib

INCLUDES= -I $(SRCDIR) -I $(LIBDIR) -I $(OCAMLLIB)
BFLAGS = $(INCLUDES) -g -dtypes
OFLAGS = $(INCLUDES)

# main target
#############

NAME=ocamlgraph

ifeq (no,yes)
all: byte $(OCAMLBEST) viewer dgraph editor
else
all: byte $(OCAMLBEST)
endif

# bytecode and native-code compilation
######################################

LIB= unionfind heap bitv
LIB:=$(patsubst %, $(LIBDIR)/%.cmo, $(LIB))

CMO =   version util blocks persistent imperative \
    delaunay builder classic rand oper \
    path traverse coloring topological components kruskal flow \
        graphviz gml dot_parser dot_lexer dot pack \
    gmap minsep cliquetree mcs_m md strat
CMO := $(LIB) $(patsubst %, $(SRCDIR)/%.cmo, $(CMO))

CMX = $(CMO:.cmo=.cmx)
CMA = graph.cma
CMXA = graph.cmxa

CMI = sig sig_pack dot_ast
CMI := $(patsubst %, src/%.cmi, $(CMI))

GENERATED = META \
    src/gml.ml src/version.ml \
    src/dot_parser.ml src/dot_parser.mli src/dot_lexer.ml

$(CMX): OFLAGS += -for-pack Graph

byte: $(CMA)
opt: $(CMXA)

graph.cma: graph.cmo
    $(OCAMLC) $(INCLUDES) -a -o $@ $^

graph.cmxa: graph.cmx
    $(OCAMLOPT) $(INCLUDES) -a -o $@ $^

graph.cmi: graph.cmo
graph.o: graph.cmx

graph.cmo: $(CMI) $(CMO)
    $(OCAMLC) $(INCLUDES) -pack -o $@ $^

graph.cmx: $(CMI) $(CMX)
    $(OCAMLOPT) $(INCLUDES) -pack -o $@ $^

VERSION=1.7

#./src/version.ml: Makefile
#   $(RM) $@
#   echo "let version = \""$(VERSION)"\"" > $@
#   echo "let date = \""`date`"\"" >> $@

# gtk2 graph editor
###################

ED_DIR=editor

editor: $(ED_DIR)/editor.byte $(ED_DIR)/editor.$(OCAMLBEST)

ED_CMO = ed_hyper ed_graph ed_draw ed_display ed_main
ED_CMO:= $(patsubst %, $(ED_DIR)/%.cmo, $(ED_CMO))
ED_CMX = $(ED_CMO:.cmo=.cmx)
ED_CMI = $(ED_CMO:.cmo=.cmi)

ED_INCLUDES = -I +lablgtk2 -I +threads -I $(ED_DIR) $(INCLUDES) -I .

$(ED_CMI) $(ED_CMO): BFLAGS+= $(ED_INCLUDES)
$(ED_CMI) $(ED_CMO): $(CMA)
$(ED_CMX): OFLAGS+= $(ED_INCLUDES)
$(ED_CMX): $(CMXA)

$(ED_DIR)/editor.byte: $(CMA) $(ED_CMO)
    $(OCAMLC) -g -o $@ $(ED_INCLUDES) \
        lablgtk.cma lablgnomecanvas.cma unix.cma $^

$(ED_DIR)/editor.opt: $(CMXA) $(ED_CMX)
    $(OCAMLOPT) -o $@ $(ED_INCLUDES) \
        lablgtk.cmxa lablgnomecanvas.cmxa unix.cmxa $^

# gtk2 graph viewer (deprecated)
###################

VIEWER_DIR=view_graph

viewer: $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.$(OCAMLBEST)

VIEWER_CMO=viewGraph_core viewGraph_select viewGraph_utils viewGraph_test
VIEWER_CMO:=$(patsubst %,$(VIEWER_DIR)/%.cmo, $(VIEWER_CMO))
VIEWER_CMX=$(VIEWER_CMO:.cmo=.cmx)
VIEWER_CMI=$(VIEWER_CMO:.cmo=.cmi)
VIEWER_MLI=$(VIEWER_CMI:.cmi=.mli)

VIEWER_INCLUDES= -I +lablgtk2 -I $(VIEWER_DIR) $(INCLUDES) -I .

$(VIEWER_CMI) $(VIEWER_CMO): BFLAGS+= $(VIEWER_INCLUDES)
$(VIEWER_CMX): OFLAGS+= $(VIEWER_INCLUDES) -for-pack Viewgraph
$(VIEWER_CMI) $(VIEWER_CMO): $(CMA)
$(VIEWER_CMX): $(CMXA)

VIEWER_CMOLIB   = $(VIEWER_DIR)/viewgraph.cmo
VIEWER_CMILIB   = $(VIEWER_DIR)/viewgraph.cmi
VIEWER_CMXLIB   = $(VIEWER_DIR)/viewgraph.cmx

$(VIEWER_CMOLIB): $(filter-out $(VIEWER_DIR)/viewGraph_test.cmo, $(VIEWER_CMO))
    $(OCAMLC) -o $@ $(VIEWER_INCLUDES) -pack $^

$(VIEWER_CMXLIB): $(filter-out $(VIEWER_DIR)/viewGraph_test.cmx, $(VIEWER_CMX))
    $(OCAMLOPT) -o $@ $(VIEWER_INCLUDES) -pack $^

$(VIEWER_DIR)/viewgraph.byte: $(CMA) $(VIEWER_CMOLIB)
    $(OCAMLC) -g -o $@ $(VIEWER_INCLUDES) \
        lablgtk.cma gtkInit.cmo lablgnomecanvas.cma unix.cma $^

$(VIEWER_DIR)/viewgraph.opt: $(CMXA) $(VIEWER_CMXLIB)
    $(OCAMLOPT) -o $@ $(VIEWER_INCLUDES) \
        lablgtk.cmxa gtkInit.cmx lablgnomecanvas.cmxa unix.cmxa $^

# new gtk2 graph viewer: dgraph
###############################

DGRAPH_DIR=dgraph

dgraph: $(DGRAPH_DIR)/dgraph.byte $(DGRAPH_DIR)/dgraph.$(OCAMLBEST)

DGRAPH_CMO=xDotDraw xDot \
    dGraphModel \
    dGraphTreeLayout dGraphSubTree dGraphTreeModel \
    dGraphViewItem dGraphView \
    dGraphRandModel dGraphContainer \
    dGraphViewer
DGRAPH_CMO:=$(patsubst %,$(DGRAPH_DIR)/%.cmo, $(DGRAPH_CMO))
DGRAPH_CMX=$(DGRAPH_CMO:.cmo=.cmx)
DGRAPH_CMI=$(filter-out dgraph/dGraphViewer.cmi, $(DGRAPH_CMO:.cmo=.cmi))

DGRAPH_INCLUDES= -I +lablgtk2 -I $(DGRAPH_DIR) $(INCLUDES) -I .

$(DGRAPH_CMI) $(DGRAPH_CMO): BFLAGS+= $(DGRAPH_INCLUDES)
$(DGRAPH_CMX): OFLAGS+= $(DGRAPH_INCLUDES) -for-pack Dgraph

$(DGRAPH_CMI) $(DGRAPH_CMO): $(CMA)
$(DGRAPH_CMX): $(CMXA)

DGRAPH_CMOLIB   = $(DGRAPH_DIR)/dgraph.cmo
DGRAPH_CMILIB   = $(DGRAPH_DIR)/dgraph.cmi
DGRAPH_CMXLIB   = $(DGRAPH_DIR)/dgraph.cmx


dgraph/dGraphViewer.cmo: $(DGRAPH_CMOLIB)
dgraph/dGraphViewer.cmx: $(DGRAPH_CMXLIB)

$(DGRAPH_CMOLIB): $(filter-out dgraph/dGraphViewer.cmo, $(DGRAPH_CMO))
    $(OCAMLC) -o $@ $(DGRAPH_INCLUDES) -pack $^

$(DGRAPH_CMXLIB): $(filter-out dgraph/dGraphViewer.cmx, $(DGRAPH_CMX))
    $(OCAMLOPT) -o $@ $(DGRAPH_INCLUDES) -pack $^

$(DGRAPH_DIR)/dgraph.byte: $(CMA) $(DGRAPH_CMOLIB) \
  $(DGRAPH_DIR)/dGraphViewer.cmo
    $(OCAMLC) -g -o $@ $(DGRAPH_INCLUDES) \
        lablgtk.cma gtkInit.cmo lablgnomecanvas.cma $^

$(DGRAPH_DIR)/dgraph.opt: $(CMXA) $(DGRAPH_CMXLIB) \
  $(DGRAPH_DIR)/dGraphViewer.cmx
    $(OCAMLOPT) -o $@ $(DGRAPH_INCLUDES) \
        lablgtk.cmxa gtkInit.cmx lablgnomecanvas.cmxa $^

# Examples
##########

EXAMPLESBIN=bin/demo.$(OCAMLBEST) bin/demo_planar.$(OCAMLBEST) \
  bin/bench.$(OCAMLBEST) bin/color.$(OCAMLBEST) bin/sudoku.$(OCAMLBEST) \
  bin/test.$(OCAMLBEST)

.PHONY: examples
examples: $(EXAMPLESBIN)

.PHONY: demo
demo: bin/demo.$(OCAMLBEST)

bin/demo.byte: $(CMA) examples/demo.cmo
    $(OCAMLC) -o $@ $^

bin/demo.opt: $(CMXA) examples/demo.cmx
    $(OCAMLOPT) -o $@ $^

bin/demo_planar.byte: $(CMA) examples/demo_planar.cmo
    $(OCAMLC) -o $@ graphics.cma unix.cma $^

bin/demo_planar.opt: $(CMXA) examples/demo_planar.cmx
    $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^

bin/color.byte: $(CMA) examples/color.cmo
    $(OCAMLC) -o $@ graphics.cma unix.cma $^

bin/color.opt: $(CMXA) examples/color.cmx
    $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^

bin/sudoku.byte: $(CMA) examples/sudoku.cmo
    $(OCAMLC) -o $@ graphics.cma unix.cma $^

bin/sudoku.opt: $(CMXA) examples/sudoku.cmx
    $(OCAMLOPT) -o $@ graphics.cmxa unix.cmxa $^

test: $(CMA) tests/test.ml
    ocaml unix.cma graphics.cma $^

bin/test.byte: $(CMA) tests/test.cmo
    $(OCAMLC) -g -unsafe -o $@ unix.cma graphics.cma $^

bin/test.opt: $(CMXA) tests/test.cmx
    $(OCAMLOPT) -unsafe -inline 100 -o $@ unix.cmxa graphics.cmxa $^

bench: bin/bench.$(OCAMLBEST)
    bin/bench.opt

bin/bench.opt: $(CMXA) tests/bench.ml
    $(OCAMLOPT) -unsafe -inline 100 -o $@ unix.cmxa $^

check: $(CMA) tests/check.ml
    ocaml $^

# Additional rules
##################

EXAMPLES = demo color demo_planar sudoku
EXAMPLESBIN:=$(patsubst %, bin/%.opt, $(EXAMPLES))
EXAMPLES:= $(patsubst %, examples/%.ml, $(EXAMPLES))

examples: $(EXAMPLESBIN)

TESTS = test check
TESTS := $(patsubst %, tests/%.ml, $(TESTS))

DPD_GRAPH_ML= $(TESTS) $(EXAMPLES)

$(DPD_GRAPH_ML:.ml=.cmo): $(CMA)
$(DPD_GRAPH_ML:.ml=.cmx): $(CMXA)

# installation
##############

INSTALL_LIBDIR=$(DESTDIR)$(OCAMLLIB)/ocamlgraph

install: install-$(OCAMLBEST) install-byte
    mkdir -p $(BINDIR)
ifeq (no,yes)
ifeq ($(OCAMLBEST),byte)
    cp -f $(BINDIR)/graph-editor.byte $(BINDIR)/graph-editor$(EXE)
    cp -f $(BINDIR)/graph-viewer.byte $(BINDIR)/graph-viewer$(EXE)
else
    cp -f $(BINDIR)/graph-editor.opt $(BINDIR)/graph-editor$(EXE)
    cp -f $(BINDIR)/graph-viewer.opt $(BINDIR)/graph-viewer$(EXE)
endif
endif

install-byte:
    mkdir -p $(INSTALL_LIBDIR)
    cp -f graph.cmo graph.cmi $(CMA) $(INSTALL_LIBDIR)
    cp -f $(SRCDIR)/*.mli $(INSTALL_LIBDIR)
ifeq (no,yes)
    mkdir -p $(BINDIR)
    cp -f $(ED_DIR)/editor.byte $(BINDIR)/graph-editor.byte
    cp -f $(VIEWER_CMILIB) $(VIEWER_CMOLIB) $(INSTALL_LIBDIR)
    cp -f $(DGRAPH_CMILIB) $(DGRAPH_CMOLIB) $(INSTALL_LIBDIR)
    cp -f $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli $(INSTALL_LIBDIR)
    cp -f $(DGRAPH_DIR)/dgraph.byte $(BINDIR)/graph-viewer.byte
endif

install-opt: install-byte
    mkdir -p $(INSTALL_LIBDIR)
    cp -f graph$(LIBEXT) graph.cmi graph.cmx $(CMXA) $(INSTALL_LIBDIR)
    cp -f $(SRCDIR)/*.mli $(INSTALL_LIBDIR)
ifeq (no,yes)
    mkdir -p $(BINDIR)
    cp -f $(ED_DIR)/editor.opt $(BINDIR)/graph-editor.opt
    cp -f $(VIEWER_CMILIB) $(VIEWER_CMXLIB) $(VIEWER_CMXLIB:.cmx=.o) \
        $(INSTALL_LIBDIR)
    cp -f $(DGRAPH_CMILIB) $(DGRAPH_CMXLIB) $(DGRAPH_CMXLIB:.cmx=.o) \
        $(INSTALL_LIBDIR)
    cp -f $(DGRAPH_DIR)/dgraph.opt $(BINDIR)/graph-viewer.opt
    cp -f $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli $(INSTALL_LIBDIR)
endif

install-findlib: META
ifdef OCAMLFIND
ifeq (no,yes)
    $(OCAMLFIND) install ocamlgraph META \
        $(SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \
        graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
        $(VIEWER_CMXLIB) $(VIEWER_CMOLIB) $(DGRAPH_CMX) $(DGRAPH_CMO)
else
    $(OCAMLFIND) install ocamlgraph META \
        $(SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \
        graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA)
endif
endif

#META: META.in Makefile
#   sed -e s/VERSION/$(VERSION)/ -e s/CMA/$(CMA)/ -e s/CMXA/$(CMXA)/ \
#       $@.in > $@

# documentation
###############

DOCFILES=$(NAME).ps $(NAME).html

NODOC   = blocks dot_parser dot_lexer version
NODOC   := $(patsubst %, $(SRCDIR)/%.cmo, $(NODOC))
DOC_CMO = $(filter-out $(NODOC) $(LIB), $(CMO))
DOC_SRC = $(CMI:.cmi=.mli) $(DOC_CMO:.cmo=.mli) $(DOC_CMO:.cmo=.ml)
ifeq (no,yes)
DOC_SRC := $(DOC_SRC) $(DGRAPH_CMI:.cmi=.mli)
endif

.PHONY: doc
doc: $(DOC_CMO)
    mkdir -p doc
    $(RM) -f doc/*
    $(OCAMLDOC) -d doc -html $(DGRAPH_INCLUDES) $(DOC_SRC)

# literate programming
$(NAME).tex: $(DOC_SRC)
    $(OCAMLWEB) -o $@ $^

wc:
    ocamlwc -p $(SRCDIRC)/*.mli $(SRCDIRC)/*.ml

# file headers
##############

headers:
    headache \
       -c misc/headache_config.txt \
       -h misc/header.txt \
       Makefile.in configure.in README \
       $(LIBDIR)/*.ml $(LIBDIR)/*.ml[ily] \
       $(SRCDIR)/*.ml $(SRCDIR)/*.ml[ily] \
       $(ED_DIR)/*.ml $(ED_DIR)/*.mli
    headache \
           -c misc/headache_config.txt \
       -h $(DGRAPH_DIR)/headers/CEA_LGPL \
       $(DGRAPH_DIR)/*.ml $(DGRAPH_DIR)/*.mli
# export
########

EXPORTDIR=$(NAME)-$(VERSION)
TAR=$(EXPORTDIR).tar

FTP = /users/www-perso/projets/ocamlgraph/download
WWW = /users/www-perso/projets/ocamlgraph

FILES = src/*.ml* lib/*.ml* Makefile.in configure configure.in META.in  \
    .depend editor/ed_*.ml* editor/Makefile \
        editor/tests/*.dot editor/tests/*.gml \
    view_graph/*.ml view_graph/*.mli \
    view_graph/README view_graph/Makefile \
    dgraph/*.ml dgraph/*.mli \
    examples/*.ml tests/*.ml \
    README FAQ CREDITS INSTALL COPYING LICENSE CHANGES

export: source export-doc export-web export-delaunay

source:
    mkdir -p export
    cd export; $(RM) -rf $(EXPORTDIR)
    mkdir -p export/$(EXPORTDIR)/bin
    cp --parents $(FILES) export/$(EXPORTDIR)
    cd export ; tar cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR)
    cp export/$(TAR).gz $(FTP)
    cp README FAQ CREDITS COPYING LICENSE CHANGES $(EXAMPLES) $(FTP)

# Build and install the .tar.gz requiered by Frama-C
framac: EXPORTDIR=ocamlgraph
framac: FTP=$$HOME/frama-c
framac:
    mkdir -p export
    cd export; $(RM) -rf $(EXPORTDIR)
    mkdir -p export/$(EXPORTDIR)/bin
    cp --parents $(FILES) export/$(EXPORTDIR)
    cd export ; tar cf $(TAR) $(EXPORTDIR) ; gzip -f --best $(TAR)
    cp export/$(TAR).gz $(FTP)
    make -C $(FTP) force-ocamlgraph

www/version.prehtml: Makefile.in
    echo "<#def version>$(VERSION)</#def>" > www/version.prehtml

export-web: www/version.prehtml
    make -C www install

export-doc: $(DOC_CMO)
    $(RM) -f $(WWW)/doc/*
    -$(OCAMLDOC) -d $(WWW)/doc -html $(DGRAPH_INCLUDES) $(DOC_SRC)

MISCFTP = $(HOME)/WWW/ftp/ocaml/misc
DELAUNAY=delaunay.ml delaunay.mli
export-delaunay:
    cd src; cp -f $(DELAUNAY) $(MISCFTP)
    cd src; caml2html -noannot -d $(MISCFTP) $(DELAUNAY)

# generic rules
###############

.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .tex .dvi .ps .html

.mli.cmi:
    $(OCAMLC) -c $(BFLAGS) $<

.ml.cmo:
    $(OCAMLC) -c $(BFLAGS) $<

.ml.o:
    $(OCAMLOPT) -c $(OFLAGS) $<

.ml.cmx:
    $(OCAMLOPT) -c $(OFLAGS) $<

.mll.ml:
    $(OCAMLLEX) $<

.mly.ml:
    $(OCAMLYACC) -v $<

.mly.mli:
    $(OCAMLYACC) -v $<

.tex.dvi:
    latex $< && latex $<

.dvi.ps:
    dvips $< -o $@

.tex.html:
    hevea $<

# Emacs tags
############

otags:
    otags -r src editor view_graph

tags:
    find . -name "*.ml*" | sort -r | xargs \
    etags "--regex=/let[ \t]+\([^ \t]+\)/\1/" \
          "--regex=/let[ \t]+rec[ \t]+\([^ \t]+\)/\1/" \
          "--regex=/and[ \t]+\([^ \t]+\)/\1/" \
          "--regex=/type[ \t]+\([^ \t]+\)/\1/" \
              "--regex=/exception[ \t]+\([^ \t]+\)/\1/" \
          "--regex=/val[ \t]+\([^ \t]+\)/\1/" \
          "--regex=/module[ \t]+\([^ \t]+\)/\1/"

# Makefile is rebuilt whenever Makefile.in or configure.in is modified
######################################################################

#Makefile: Makefile.in config.status
Makefile: Makefile.in
    if test -e $@; then chmod a+w $@; fi
    chmod a-w $@

#config.status: configure
#   ./config.status --recheck

#configure: configure.in
#   autoconf

# clean
#######

clean:
    $(RM) -f *~
    for d in $(SRCDIR) $(LIBDIR) $(ED_DIR) $(VIEWER_DIR) $(DGRAPH_DIR) \
        tests examples; \
    do \
      $(RM) -f $$d/*.cm[iox] $$d/*$(OBJEXT) $$d/*~ $$d/*.annot; \
    done
    $(RM) -f $(GENERATED) $(SRCDIR)/dot_parser.output
    $(RM) -f graph.*a graph.cm* graph.o graph$(LIBEXT)
    $(RM) -f $(ED_DIR)/editor.byte $(ED_DIR)/editor.opt
    $(RM) -f $(VIEWER_DIR)/viewgraph.byte $(VIEWER_DIR)/viewgraph.opt
    $(RM) -f $(DGRAPH_DIR)/dgraph.byte $(DGRAPH_DIR)/dgraph.opt
    $(RM) -f $(DGRAPH_DIR)/dgraph
    $(RM) -f *.haux *.aux *.log $(NAME).tex $(NAME).dvi $(DOCFILES)
    $(RM) -f $(EXAMPLESBIN)

dist-clean distclean:: clean
    $(RM) -f Makefile config.cache config.log *.byte *.opt #config.status 

svnclean svn-clean:: dist-clean
    $(RM) -f config.* configure configure.lineno

# depend
########

.PHONY: depend
.depend depend: $(GENERATED)
    $(RM) -f .depend
    $(OCAMLDEP) $(INCLUDES) -I $(ED_DIR) -I $(VIEWER_DIR) -I $(DGRAPH_DIR)\
        $(LIBDIR)/*.ml $(LIBDIR)/*.mli \
        $(SRCDIR)/*.ml $(SRCDIR)/*.mli \
        $(ED_DIR)/*.mli $(ED_DIR)/*.ml \
        $(VIEWER_DIR)/*.mli $(VIEWER_DIR)/*.ml \
        $(DGRAPH_DIR)/*.mli $(DGRAPH_DIR)/*.ml > .depend

include .depend

答案 1 :(得分:0)

我知道。阅读INSTALL并遵循它(除了ocaml / mingw,install-findlib目标被破坏,解决方案 - 在./configure之后编辑Makefile并将LIBEXT = .lib更改为LIBEXT = .a)。或者也许尝试比“IT DUSNNT WORK !! 11”更详细地描述你的问题。

答案 2 :(得分:0)

我建议使用GODI来管理您的OCaml安装。它支持MingW32 OCaml并包含OCamlGraph的构建配方。