blob: 2791285584343aaf44b5a2f57b2935f50cfe960f [file] [log] [blame] [edit]
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
COMMON_CONFIGURE_OPTIONS =\
-DWLCS_BUILD_ASAN=ON \
-DWLCS_BUILD_UBSAN=ON \
-DWLCS_BUILD_TSAN=ON
ifeq ($(filter i386 armhf, $(DEB_HOST_ARCH)),)
ifeq ($(DEB_DISTRIBUTION),xenial)
ifneq ($(filter arm64 ppc64el, $(DEB_HOST_ARCH)),)
# arm64 on 16.04 does not have tsan
COMMON_CONFIGURE_OPTIONS += -DWLCS_BUILD_TSAN=OFF
endif
endif
else
# i386 and armhf do not have tsan
COMMON_CONFIGURE_OPTIONS += -DWLCS_BUILD_TSAN=OFF
endif
override_dh_auto_configure:
dh_auto_configure -- $(COMMON_CONFIGURE_OPTIONS)
%:
dh $@