#!/usr/bin/make -f
# makefile for libmad

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

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS=--enable-shared
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
DEB_CONFIGURE_EXTRA_FLAGS += --enable-profiling --enable-debugging
else
DEB_CONFIGURE_EXTRA_FLAGS += --disable-profiling --disable-debugging
endif

DEB_DH_MAKESHLIBS_ARGS_ALL = -V 'libmad0 (>= 0.15.1b)'

build: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	./configure --prefix=/usr $(CONFIGURE_FLAGS)
	$(MAKE)
	touch build-stamp

clean::
	# annoying lintian errors
	rm -f config.cache libz/config.log libz/config.status
