#!/usr/bin/make -f

%:
	dh $@ --with cli

override_dh_auto_build:
	xbuild OpenTK.sln
	rm -rf monodocer
	mdoc update -i Source/Compatibility/OpenTK.Compatibility.xml \
	            -i Source/OpenTK/OpenTK.xml \
                    -i ./Source/GLControl/OpenTK.GLControl.xml  \
                    -o monodocer \
                    Binaries/OpenTK/Debug/OpenTK.GLControl.dll \
                    Binaries/OpenTK/Debug/OpenTK.Compatibility.dll \
                    Binaries/OpenTK/Debug/OpenTK.dll
	mdoc assemble -o opentk monodocer

override_dh_auto_clean:
	xbuild OpenTK.sln /target:Clean
	rm -fr Binaries
	rm -fr monodocer
	rm -f opentk.zip
	rm -f opentk.tree

override_dh_clideps:
	dh_clideps --exclude-moduleref=/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon \
		--exclude-moduleref=/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/ApplicationServices \
		--exclude-moduleref=/System/Library/Frameworks/AGL.framework/Versions/Current/AGL \
		--exclude-moduleref=libdl.dylib
