]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/Makefile.in
New entry: relevant_equations.
[helm.git] / helm / DEVEL / lablgtkmathview / Makefile.in
1 PACKAGE = @PACKAGE@
2 VERSION = @VERSION@
3 INCLUDEDIR = @OCAML_INCLUDE_DIR@
4 PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc
5 PREFIX = 
6 OBJECTS_C = ml_gtk_mathview.o
7 OBJECTS = gtkMathViewProps.cmo ogtkMathViewProps.cmo gtk_mathview.cmo gtkMathView.cmo gMathView.cmo gMathViewAux.cmo
8 OBJECTS_OPT = gtkMathViewProps.cmx ogtkMathViewProps.cmx gtkMathView.cmx gtk_mathview.cmx gMathView.cmx gMathViewAux.cmx
9 GENERATED_FILES = gtkMathViewProps.ml ogtkMathViewProps.ml
10 NULL =
11 INST =  \
12         META                    \
13         gMathView.mli           \
14         gMathView.cmi           \
15         gtkMathView.cmi         \
16         gtk_mathview.cmi        \
17         gtkMathViewProps.cmi    \
18         ogtkMathViewProps.cmi   \
19         gMathViewAux.cmi        \
20         gMathViewAux.mli        \
21         $(NULL)
22 DIST_FILES = \
23   Makefile.in configure.in gMathView.ml gMathView.mli   \
24   gMathViewAux.ml gMathViewAux.mli gtkMathView.ml \
25   gtk_mathview.ml ml_gtk_mathview.c META.in .depend debian/ test/ \
26   configure gtkMathView.props
27 DIST_DIR = $(PACKAGE)-$(VERSION)
28 DOC_FILES = AUTHORS COPYING ChangeLog NEWS README LICENSE
29 REQUIRES = gdome2 lablgtk2
30 PREDICATES =
31 SHARED_LIBS = @GDOME_LIBS@ @GTKMATHVIEW_LIBS@
32
33 OCAMLFIND = ocamlfind
34 OCAMLC = $(OCAMLFIND) ocamlc
35 OCAMLOPT = $(OCAMLFIND) ocamlopt
36 OCAMLDEP = ocamldep
37 OCAMLMKLIB = ocamlmklib
38 OCAML_STUB_DIR = @OCAML_STUB_DIR@
39
40 ARCHIVE = $(PACKAGE)
41 DLL = dll$(ARCHIVE).so
42
43 TESTDIR = ./test
44 TMPDIR = .test
45 TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
46
47 all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL)
48 opt: $(ARCHIVE).cmxa $(ARCHIVE).a
49 test: $(TESTDIR)/test
50 test.opt: $(TESTDIR)/test.opt
51 world: all opt
52
53 dist:
54         rm -rf $(DIST_DIR)/
55         mkdir $(DIST_DIR)/
56         cp -a $(DIST_FILES) $(DOC_FILES) $(DIST_DIR)/
57         -find $(DIST_DIR) -name CVS -type d -exec rm -rf {} \;
58         -find $(DIST_DIR) -name .cvsignore -type f -exec rm {} \;
59         tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/
60         rm -rf $(DIST_DIR)/
61
62 deb: dist
63         if [ -d $(DIST_DIR)/ ]; then rm -rf $(DIST_DIR); else true; fi
64         tar xvzf $(DIST_DIR).tar.gz
65         (cd $(DIST_DIR)/ && debuild)
66         rm -rf $(DIST_DIR)
67
68 $(GENERATED_FILES): gtkMathView.props
69
70 ml_gtk_mathview.o: ml_gtk_mathview.c
71         gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk2` @GTKMATHVIEW_CFLAGS@ @GDOME_CFLAGS@ `ocamlfind query -i-format gdome2` $<
72
73 .SUFFIXES: .cmo .cmi .cmx .ml .mli
74
75 .ml.cmo:
76         $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
77 .mli.cmi:
78         $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
79 .ml.cmx:
80         $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" -c $<
81
82 %Props.ml o%Props.ml: %.props $(PROPCC)
83         $(PROPCC) $<
84
85 depend: *.ml *.mli $(GENERATED_FILES)
86         $(OCAMLDEP) *.ml *.mli >.depend
87 include .depend
88
89 $(ARCHIVE).cma: $(OBJECTS)
90         $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
91 $(ARCHIVE).cmxa: $(OBJECTS_OPT)
92         $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
93 lib$(ARCHIVE).a $(DLL): $(OBJECTS_C)
94         $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS)
95
96 $(TESTDIR)/test: $(OBJECTS_C) $(ARCHIVE).cma $(TESTDIR)/test.ml
97         mkdir -p $(TMPPKGDIR)
98         cp $(OBJECTS_C) $(DLL) $(ARCHIVE).cma $(INST) $(TMPPKGDIR)
99         cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make
100         rm -r $(TMPDIR)
101
102 $(TESTDIR)/test.opt: $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(TESTDIR)/test.ml
103         mkdir -p $(TMPPKGDIR)
104         cp $(OBJECTS_C) $(ARCHIVE).a $(ARCHIVE).cmxa $(INST) $(TMPPKGDIR)
105         cd $(TESTDIR) ; export OCAMLPATH=../$(TMPDIR):$$OCAMLPATH ; make opt
106         rm -r $(TMPDIR)
107
108 install:
109         test ! -f $(ARCHIVE).cmxa || extra="$(ARCHIVE).a $(ARCHIVE).cmxa" ;     \
110         if [ "$(PREFIX)" = "" ]; then                                           \
111                 $(OCAMLFIND) install                                            \
112                         $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a               \
113                         $(DLL) $(INST) $$extra;                                 \
114         else                                                                    \
115                 $(OCAMLFIND) install -ldconf /def/null -destdir $(PREFIX)       \
116                         $(PACKAGE) $(ARCHIVE).cma lib$(ARCHIVE).a               \
117                         $(DLL) $(INST) $$extra;                                 \
118         fi
119
120 uninstall:
121         if [ "$(PREFIX)" = "" ]; then \
122                 ocamlfind remove $(PACKAGE); \
123         else \
124                 ocamlfind remove -destdir $(PREFIX) $(PACKAGE); \
125         fi
126
127 clean:
128         rm -f *.[ao] *.cm[iaxo] *.cmxa *.so $(GENERATED_FILES)
129         cd $(TESTDIR) ; make clean
130         rm -rf $(TMPDIR)
131
132 distclean: clean
133         rm -f config.log config.cache config.status Makefile META
134         cd $(TESTDIR) ; make distclean