#!/usr/bin/make -f

DEFS = \
 -DHAVEFCNTL \
 -DHAVEMEMCMP \
 -DMEMCPY \
 -DMKDIR \
 -DHAVE_LCHOWN \
 -DPRG_COMPRESS='"gzip"' \
 -DDEFFMTCMD='"fdformat /dev/fd0H1440"'

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic $(DEFS)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

override_dh_auto_build:
	# save original (due to diff)
	cp exten_default.h exten_default_orig.h
	dh_auto_build

override_dh_clean:
	# restore original exten_default.h
	if test -e exten_default_orig.h; then \
	    mv exten_default_orig.h exten_default.h; \
	fi
	[ ! -f Makefile ] || $(MAKE) clean
	dh_clean

run-test:
	$(MAKE) regtest

override_dh_auto_install:
	# Disabled. See debian/install

override_dh_installchangelogs:
	dh_installchangelogs HISTORY

%:

	dh $@

# End of file
