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

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/buildtools.mk
include /usr/share/dpkg/architecture.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)
CPPFLAGS+=$(shell $(PKG_CONFIG) --cflags ncurses)
LDLIBS+=$(shell $(PKG_CONFIG) --libs ncurses) -lutil

# ftbfs-fix for armel
ifeq ($(DEB_TARGET_ARCH), armel)
  LDFLAGS+=-Wl,--copy-dt-needed-entries
endif

CC_FOR_BUILD ?= cc

# uncommect for more insights.
#override_dh_auto_configure:
#	env
#	cmake --system-information
#	dh_auto_configure $@ --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=TRUE

%:
	dh $@ --buildsystem=cmake
