#!/usr/bin/make -f

# this script helps building when you're developing
# for gideon on a debian system.

# it shows how to config and install gideon in /usr/local/kde

# first do
# $ debian/build-gideon config
# and then
# $ make
# you can then use run or debug targets

default: install

debdir=$(shell pwd)/debian
instdir=$(debdir)/tmp

run:
	LD_LIBRARY_PATH=/usr/local/kde3/lib /usr/local/kde/bin/gideon

debug:
	LD_LIBRARY_PATH=/usr/local/kde3/lib kdbg /usr/local/kde/bin/gideon

config2:
	if test ! -f configure; then \
	  $(MAKE) -f admin/Makefile.common ;\
	fi
	./configure $(configkdevelop) \
	--enable-debug \
	--disable-rpath --with-qt-includes=/usr/include/qt \
	--with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html \
	--enable-gideon-qt2 \
	--enable-docbase \
	--with-phpdocdir=/usr/share/doc/php4 \
	--with-glibdocdir=/usr/share/doc/glib-reference/html \
	--with-gdkdocdir=/usr/share/doc/gtk-reference/gdk/html \
	--with-gtkdocdir=/usr/share/doc/gtk-reference/gtk/html \
	--with-gnomedocdir=/usr/share/doc/gnome-dev-doc/html

	touch configure-stamp

config3:
	if test ! -f configure; then \
	  $(MAKE) -f admin/Makefile.common ;\
	fi
	./configure \
	--prefix=/usr/local/kde3 \
	--with-qt-dir=/usr/local/qt \
	--with-qt-includes=/usr/local/qt \
	--enable-debug \
	--disable-rpath \
	--with-kdelibsdoc-dir=/usr/share/doc/kdelibs4-doc/html \
	--enable-docbase \
	--with-phpdocdir=/usr/share/doc/php4 \
	--with-glibdocdir=/usr/share/doc/glib-reference/html \
	--with-gdkdocdir=/usr/share/doc/gtk-reference/gdk/html \
	--with-gtkdocdir=/usr/share/doc/gtk-reference/gtk/html \
	--with-gnomedocdir=/usr/share/doc/gnome-dev-doc/html

	touch configure-stamp

build:
	$(MAKE)

clean:
	rm -f configure-stamp
	-make distclean

install: build
	make install

.PHONY: build clean install run debug
