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

include /usr/share/dh-dlang/dlang-flags.mk

ifneq (,$(filter $(DEB_HOST_ARCH), s390x))
  export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
endif

# workaround for DMD frontend bug
# first found in LDC: https://github.com/ldc-developers/ldc/issues/4000
ifeq ($(DC),ldc2)
    DFLAGS += --allinst
else
    DFLAGS += -fall-instantiations
endif

%:
	dh $@ --buildsystem meson --without=single-binary
