#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk

LDFLAGS += -Wl,--as-needed
CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)

%:
	dh $@ --buildsystem=cmake --with=python3

override_dh_install:
	dh_install

	# Install binfmt support for atari binaries
	install -m644 -D debian/binfmt debian/hatari/usr/share/binfmts/hatari
	install -m644 -D debian/binfmt.conf debian/hatari/usr/lib/binfmt.d/hatari.conf

override_dh_auto_test:
	true