#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# The build system doesn't use CPPFLAGS, pass them to CFLAGS/CXXFLAGS to
# enable the missing (hardening) flags
export DEB_CFLAGS_MAINT_APPEND   = -MMD -Wall $(shell dpkg-buildflags --get CPPFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)

BINDIR = /sbin
V = 1

include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

export CC BINDIR V

%:
	dh $@

override_dh_auto_build:
	dh_auto_build --sourcedirectory=hostapd --buildsystem=makefile

override_dh_install:
	chmod 755 hostapd/certs/bootstrap
	dh_install
