#!/usr/bin/make -f

#Don't override any flags. k thanx bye
CFLAGS=
CPPFLAGS=
LDFLAGS=
CXXFLAGS=

MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi)
ifeq (${MAKE_J}, -j0)
  MAKE_J = -j1
endif


TMP=$(CURDIR)/debian/tmp/

override_dh_auto_configure:
	config/autorun.sh
	dh_auto_configure -- -disable-rpath

override_dh_auto_build:
	${MAKE} ${MAKE_J}

build: build-stamp
build-stamp:
	dh build
	perl -ple 's/HAVE_DOT\s+=\s+YES/HAVE_DOT = NO/' -i Doxyfile
	$(MAKE) doxygen
	touch build-stamp

clean:
	dh clean

install: build install-stamp
install-stamp:
	dh install
	touch install-stamp

binary-arch: install
	dh binary-arch

binary-indep: install
	dh binary-indep

binary: binary-arch binary-indep

get-orig-source:
	uscan --verbose --force-download --rename --repack --destdir=..
