#!/usr/bin/make -f

export DH_VERBOSE = 1
DESTDIR ?= $(abspath debian/elks-libc-gcc-ia16-elf)

%:
	exec dh $@

override_dh_auto_clean:
	# `./' is needed or dash(1) may not search for current directory.
	-. ./env.sh && make clean

override_dh_auto_configure:
	ls -la  # for debugging
	mkdir -p cross include
	. ./env.sh && make defconfig

override_dh_auto_build:
	. ./env.sh && cd libc && make all

override_dh_auto_test:
	# Unimplemented.

override_dh_auto_install:
	. ./env.sh && cd libc && make DESTDIR='$(DESTDIR)/usr' install
