#!/usr/bin/make -f

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	DFLAGS = -fdebug
else
	DFLAGS = -frelease
endif


%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- DFLAGS="$(DFLAGS)"


get-orig-source:
	dh_testdir
	dh_testroot
	wget http://hizuoka.web.fc2.com/game/ES/ES_d.zip
	unzip ES_d.zip
	rm ES_d/music/*
	rm ES_d/*.dll
	rm ES_d/*.exe
	rm ES_d/lib/*.lib
	rm ES_d/resource/*.RES
	rm `find ES_d -name "*.obj"`
	rm ES_d/voice/*
	tar cvfz ../ii-esu_1.0a.dfsg1.orig.tar.gz ES_d
	rm -rf ES_d.zip ES_d
