#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

MHDDFS_BUILDFLAGS	=

FREEBSD_FLAGS	= $(shell \
	if `dpkg-architecture -qDEB_BUILD_ARCH|grep -q 'kfreebsd'`; then \
		echo WITHOUT_XATTR=1; \
	fi \
)

MHDDFS_BUILDFLAGS	+= $(FREEBSD_FLAGS)

build: build-stamp

build-stamp: 
	dh_testdir
	make $(MHDDFS_BUILDFLAGS)
	touch $@

clean:
	dh_testdir
	dh_testroot
	make clean
	rm -f build-stamp
	dh_clean 

# Build architecture-independent files here.
binary-indep: build install

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_install
	dh_installman
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
