#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# The PS3's PPE (Cell): its scheduling, AltiVec for ov_read's conversion (our patch in
# debian/patches/ps3/) and for GCC's vectorizer at -O3 (configure's own -O3, which Debian's -O2
# otherwise overrides), as Mesa is built
ifeq ($(DEB_HOST_ARCH),ppc64)
export DEB_CFLAGS_MAINT_APPEND = -O3 -mcpu=cell -mtune=cell
endif

%:
	dh $@

override_dh_autoreconf:
	dh_autoreconf autoreconf -- -i -f -I m4

override_dh_auto_configure:
	dh_auto_configure -- --enable-static --with-pic

# Trac bug https://trac.xiph.org/ticket/1673
override_dh_install:
	rm debian/tmp/usr/share/doc/libvorbis-*/doxygen-build.stamp
	find debian/tmp -name '*.la' -delete
	dh_install

override_dh_installchangelogs:
	dh_installchangelogs CHANGES
