#!/usr/bin/make -f

%:
	dh $@

ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
override_dh_auto_configure:
       $(CC_FOR_BUILD) -o debian/lemon lemon/lemon.c
       printf 'add_executable(lemon IMPORTED GLOBAL)\nset_property(TARGET lemon
PROPERTY IMPORTED_LOCATION "$(CURDIR)/debian/lemon")\n' > debian/lemon.cmake
       dh_auto_configure -- -DIMPORT_LEMON=$(CURDIR)/debian/lemon.cmake
endif

override_dh_auto_clean:
	-rm -rf build/release/*
