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

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

CFLAGS += -fPIC

CONFIGURE_OPTS = --prefix=/usr --disable-strip --enable-doc --enable-mplayer --enable-xine --enable-gstreamer --enable-vlc

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CONFIGURE_OPTS += --disable-optimize
else
        CONFIGURE_OPTS += 
endif

%:
	dh $@

override_dh_auto_configure:
	CFLAGS=$(CFLAGS) ./configure $(CONFIGURE_OPTS) 

override_dh_strip:
	dh_strip --dbg-package=libplayer2-dbg

override_dh_auto_clean:
	[ -e config.mak ] && dh_auto_clean || true

.PHONY: override_dh_auto_configure override_dh_strip
