#!/usr/bin/make -f

# Hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CFLAGS := $(CFLAGS) $(CPPFLAGS)

ifneq (,$(filter $(DEB_BUILD_ARCH),loong64))
CFLAGS := $(CFLAGS) $(CPPFLAGS) -mcmodel=medium
endif

# Flags for CMake
export CMAKE_OPTIONS := -DCMAKE_INSTALL_PREFIX=/usr

%:
	dh $@

override_dh_auto_build:
	# build docs
	make docs
	dh_auto_build
