#!/usr/bin/make -f
# -*- makefile -*-

# The magic debhelper rule
%:
	dh $@

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

override_dh_auto_build:
	find examples -type f -exec chmod 644 {} \;
	$(MAKE) -C terralibx/terralib
	$(MAKE) -C terralibx/stat
	$(MAKE) -C terralibx/image_processing
	ar rcs libterralib.a terralibx/Release/.obj/terralib/*.o
	ar rcs libstat.a terralibx/Release/.obj/stat/*.o
	ar rcs libterralibpdi.a terralibx/Release/.obj/libpdi/*.o

override_dh_clean:
	dh_clean
	$(MAKE) -C terralibx/terralib clean
	rm -f libterralib.a libstat.a libterralibpdi.a
	rm -rf terralibx/Release/.obj terralibx/Release/*

