#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_BUILD_OPTIONS += nocheck

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

html_dir := $(CURDIR)/debian/tmp/usr/share/doc/libgdome2-dev

%:
	dh $@

execute_before_dh_clean:
	$(RM) gdomeConf.sh

override_dh_auto_configure:
	dh_auto_configure -- --with-html-dir=$(html_dir)

execute_before_dh_installdocs:
	mv $(html_dir)/gdome2-* $(html_dir)/html
	ln -sf book1.html $(html_dir)/html/index.html
