1 # makefile for configuring lablGTK
7 # Default installation directories
8 BINDIR = `$(GETBINDIR)`
9 INSTALLDIR = $(LIBDIR)/lablgtk
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
43 @echo GTKCFLAGS=`$(GTKGETCFLAGS)` >> config.make
44 @echo GTKLIBS=`$(GTKGETLIBS)` | \
45 sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \
47 @echo GNOMELIBS=$(GNOMELIBS) | \
48 sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \