#!/usr/bin/make -f

ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)

export CFLAGS=
export CPPFLAGS=
export CXXFLAGS=
export LDFLAGS=

export PATH := $(PATH):/usr/lib/wine/

override_dh_auto_build:
ifeq ($(ARCH),amd64)
	make wine64
else
	make wine32
endif

override_dh_auto_clean:
	$(MAKE) distclean
	find . -name .libmagic-tmp -delete
	
override_dh_auto_install:
override_dh_strip:
	# ignore

#override_dh_builddeb:
#	dh_builddeb -- -Zlzma -z9

%:
	dh $@

override_dh_shlibdeps:
ifeq ($(ARCH),amd64)
	dh_shlibdeps -l/usr/lib/x86_64-linux-gnu/wine/
else
	dh_shlibdeps -l/usr/lib/i386-linux-gnu/wine/
endif

override_dh_dwz:
	
