#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(ARCH),armhf)
	PLATFORM=platform="armv hardfloat"
endif

%:
	dh $@

override_dh_auto_build:
	$(MAKE) -C libgambatte/ -f Makefile.libretro $(PLATFORM)

override_dh_auto_clean:
	$(MAKE) -C libgambatte/ -f Makefile.libretro clean
