INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src

bin_PROGRAMS = hufo_smoke hufo_tunnel colorfire

hufo_smoke_SOURCES = driver.cpp hufo_smoke.cpp FirePart.h SVector.h SVector.cpp FMotion.h FMotion.cpp
hufo_tunnel_SOURCES = driver.cpp hufo_tunnel.cpp hufo_tunnel.h hufo_tunnel_textures.h hufo_tunnel_textures.cpp SVector.h SVector.cpp
colorfire_SOURCES = driver.cpp colorfire.cpp colorfire_textures.h colorfire_textures.cpp SVector.h SVector.cpp

if INSTALL_XSCREENSAVER_CONFIG_FILES
dist_config_DATA = hufo_smoke.xml hufo_tunnel.xml colorfire.xml
endif

if INSTALL_KDE_CONFIG_FILES
dist_kdessconfig_DATA = hufo_smoke.desktop hufo_tunnel.desktop colorfire.desktop
endif

man_MANS = hufo_smoke.1 hufo_tunnel.1 colorfire.1

EXTRA_DIST = $(man_MANS)

noinst_PROGRAMS = stringify
stringify_LDADD = @BZIP2@

colorfire_LDADD = @BZIP2@
colorfire_textures.cpp: stringify colorfire_textures/ripplemap colorfire_textures/smokemap
	./stringify colorfire_textures/ripplemap colorfire_textures/smokemap > colorfire_textures.cpp

hufo_tunnel_LDADD = @BZIP2@
hufo_tunnel_textures.cpp: stringify hufo_tunnel_textures/marblemap hufo_tunnel_textures/swirlmap
	./stringify hufo_tunnel_textures/marblemap hufo_tunnel_textures/swirlmap > hufo_tunnel_textures.cpp

clean: delete-textures
distclean: delete-textures

delete-textures:
	rm -f colorfire_textures.cpp hufo_tunnel_textures.cpp
