#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
	exec dh $@ --parallel --builddirectory=build

override_dh_update_autotools_config:
	# Nope, do not touch config.sub or config.guess .

override_dh_auto_configure:
	CFLAGS_FOR_TARGET='-g -Os -mseparate-code-segment -D_IEEE_LIBM' \
	dh_auto_configure -O--parallel -- --target=ia16-elf \
	    --disable-elks-libc --disable-newlib-wide-orient \
	    --enable-newlib-nano-malloc --disable-newlib-multithread \
	    --enable-newlib-global-atexit --enable-newlib-reent-small \
	    --disable-newlib-fseek-optimization \
	    --disable-newlib-unbuf-stream-opt --enable-target-optspace \
	    --enable-newlib-iconv \
	    --enable-newlib-iconv-encodings=utf_8,utf_16,cp850,cp852,koi8_uni

override_dh_strip:
	# Not needed for now.  Note that stock GNU Binutils's strip(1) will
	# fail on the new (March 2019) Newlib libraries, as it does not
	# understand the IA16-specific segment relocations.
