#!/usr/bin/make -f

CFLAGS =
CXXFLAGS = $(CFLAGS)

# These are from the autotools-dev package documentation.
# /usr/share/doc/autotools-dev/README.Debian.gz
# from the section titled "Calling GNU configure properly"
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# FOR AUTOCONF 2.52 AND NEWER ONLY
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

%:
	dh $@ --parallel --with autotools_dev

override_dh_auto_configure:
	dh_auto_configure -- $(confflags)

override_dh_strip:
	dh_strip -plibopencore-amrnb0 --dbg-package=libopencore-amrnb0-dbg
	dh_strip -plibopencore-amrwb0 --dbg-package=libopencore-amrwb0-dbg
