#!/usr/bin/make -f

%:
	dh ${@} --with autotools_dev

override_dh_auto_clean:
	[ ! -f config.mak ] || $(MAKE) distclean

	rm -rf doc/html doc/latex

override_dh_auto_configure:
	./configure2 $(CROSS) --prefix=/usr --disable-opts --disable-strip --with-dvdread=/usr/include/dvdread CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"

override_dh_auto_build:
	dh_auto_build

	cd doc && doxygen doxy.conf

override_dh_install:
	dh_install --fail-missing

override_dh_strip:
	dh_strip --dbg-package=libdvdnav-dbg

override_dh_builddeb:
	dh_builddeb -- -Zgzip -z9
