#!/usr/bin/make -f

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O3
endif
export CFLAGS

override_dh_auto_clean:
	dh_auto_clean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif

override_dh_auto_configure:
	dh_auto_configure -- --with-opengl --bindir=\$${prefix}/games

override_dh_auto_build:
	dh_auto_build
	ln Documentation/fceu-sdl.6 fceu.6

%:
	dh $@
