1 # makefile for configuring lablGTK_mathview
7 # Default installation directories
8 BINDIR = `$(GETBINDIR)`
9 INSTALLDIR = $(LIBDIR)/lablgtkmathview
12 GETLIBDIR = ocamlc -v | grep "^Standard" | sed 's/^.*: *//'
13 LIBDIR = `$(GETLIBDIR)`
14 GETBINDIR = $(GETLIBDIR) | sed -e 's|/lib/[^/]*$$|/bin|' -e 's|/lib$$|/bin|'
15 GETRANLIB = which ranlib 2>/dev/null | sed -e 's|.*/ranlib$$|!|' -e 's/^[^!]*$$/:/' -e 's/!/ranlib/'
18 GTKGETCFLAGS = gtk-config --cflags`" -I"`gnome-config --includedir
19 GNOMELIBS = `gnome-config --libs gtkxmhtml`
21 GTKGETCFLAGS = gtk-config --cflags
24 GTKGETLIBS = gtk-config --libs
26 configure: .depend config.make
29 ocamldep *.ml *.mli > .depend
32 @echo CAMLC=$(CAMLC) > config.make
33 @echo CAMLOPT=$(CAMLOPT) >> config.make
34 @echo USE_GL=$(USE_GL) >> config.make
35 @echo USE_GNOME=$(USE_GNOME) >> config.make
36 @echo USE_CC=$(USE_CC) >> config.make
37 @echo DEBUG=$(DEBUG) >> config.make
38 @echo CC=$(CC) >> config.make
39 @echo RANLIB=`$(GETRANLIB)` >> config.make
40 @echo LIBDIR=$(LIBDIR) >> config.make
41 @echo BINDIR=`$(GETBINDIR)` >> config.make
42 @echo INSTALLDIR=$(INSTALLDIR) >> config.make
44 # @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I/usr/lib/ocaml/lablgtk >> config.make
46 @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I$(LIBDIR)/lablgtk >> config.make
47 @echo GTKLIBS=`$(GTKGETLIBS)` | \
48 sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \
50 # Luca: GtkMathView configuration
51 @echo GTKMATHVIEWCFLAGS=`gtkmathview-config --cflags` >> config.make
52 @echo MINIDOMCFLAGS=`minidom-config --cflags` >> config.make
53 @echo GTKMATHVIEWLIBS=`gtkmathview-config --libs` >> config.make
54 @echo MINIDOMLIBS=`minidom-config --libs` >> config.make
55 # Luca: end of GtkMathView configuration
56 @echo GNOMELIBS=$(GNOMELIBS) | \
57 sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \