#!/usr/bin/make -f

export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh ${@}

override_dh_auto_configure:
	dh_auto_configure -- -DWITH_PULSEAUDIO=ON -DWITH_FFMPEG=OFF

override_dh_install:
	# Removing unused files
	rm -f debian/tmp/usr/lib/*.la
	rm -f debian/tmp/usr/lib/freerdp/*.la
	rm -rf debian/tmp/usr/share/freerdp/keymaps

	dh_install --fail-missing

override_dh_strip:
	dh_strip --dbg-package=freerdp-dbg

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4
