DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/buildtools.mk
+include /usr/share/dpkg/architecture.mk
DEBIAN_BUILD_ARTIFACTS = debian/artifacts
# - https://gcc.gnu.org/wiki/Atomic
# - https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
# - the 'clasp' packaging
-noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)")
# link with libatomic on architectures without built-in atomic
-ifeq ($(if $(noatomicarch),atomic), atomic)
+ifneq ($(strip $(filter $(DEB_HOST_ARCH), armel powerpc powerpcspe m68k mips mipsel sh4 riscv64)),)
DEB_CPPFLAGS_MAINT_APPEND += -DDEBIAN_JUCERPROJECT_LIBS='"atomic"'
DEB_LDFLAGS_MAINT_APPEND += -latomic
endif
-
-ifneq ($(strip $(filter $(arch), mipsel mips64el)),)
+# we got too many symbols for MIPS, so we need to enablea workaround...
+ifneq ($(strip $(filter $(DEB_HOST_ARCH), mipsel mips64el)),)
DEB_CXXFLAGS_MAINT_APPEND += -mxgot
endif