#!/usr/bin/make -f

export CFLAGS := $(shell DEB_CFLAGS_MAINT_STRIP='-fstack-protector --param=ssp-buffer-size=4 -fstack-protector-strong' dpkg-buildflags --get CFLAGS)

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(filter $(DEB_BUILD_ARCH), mips mipsel))
	CFLAGS+=-fPIC
	export CFLAGS
endif

#override_dh_auto_configure:
#	CC=clang ./configure --prefix=/usr

%:
	dh $@ --with autoreconf
