#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export SKIP_STRIPPING = true

# Verbose build
export VERBOSE = true

# Allow cross compiling
ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
	export CROSS_COMPILING = true
endif
export NOOPT = true

%:
	dh $@

execute_before_dh_auto_build:
	@echo "blhc: ignore-line-regexp: ^Compiling .*"

override_dh_auto_build:
	dh_auto_build -- \
		CFLAGS="$(CPPFLAGS) $(CFLAGS)" \
		CXXFLAGS="$(CPPFLAGS) $(CXXFLAGS)" \
		$(empty)

execute_before_dh_auto_configure:
	cp -fr /usr/share/dpf/ .

override_dh_auto_clean:
	dh_clean bin/ build/ common/*.d common/*.o common/*/*.d common/*/*.o dpf/
