#!/usr/bin/make -f

export DEB_BUILD_HARDENING=1

DEB_CONFIGURE_USER_FLAGS = --libdir="\$${prefix}/lib/$(DEB_HOST_MULTIARCH)" \
	--disable-samples --enable-static --enable-weak-threads

# To distinguish variables that are truly local to this file (rather
# than for use by cdbs), we adopt the convention of starting local
# variables' names with l_.

l_SONAME := 48

# Turn off optimization on armel to avoid some internal compiler
# errors.  This can be removed once bug 484053 is resolved.
ifeq ($(shell dpkg --print-architecture),armel)
CFLAGS := $(filter-out -O%,$(CFLAGS)) -O0
CXXFLAGS := $(filter-out -O%,$(CXXFLAGS)) -O0
endif

# Include cdbs rules files.
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

# Variables used by cdbs
DEB_MAKE_INSTALL_TARGET := \
	$(DEB_MAKE_INSTALL_TARGET:install=install install-doc)
DEB_SRCDIR = source
DEB_COMPRESS_EXCLUDE = html examples
DEB_INSTALL_EXAMPLES_libicu-dev = \
	source/samples/*

DEB_DBG_PACKAGE_libicu$(l_SONAME) = libicu$(l_SONAME)-dbg

override DEB_MAKE_CHECK_TARGET = check

clean::
	$(RM) *.cdbs-config_list
