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

bin_PROGRAMS = biof busyspheres matrixview spirographx sundancer2

biof_SOURCES = driver.c biof.c
busyspheres_SOURCES = driver.c busyspheres.c
matrixview_SOURCES = driver.c matrixview.c matrixview_textures.c
spirographx_SOURCES = driver.c spirographx.c
sundancer2_SOURCES = driver.c sundancer2.c

if INSTALL_XSCREENSAVER_CONFIG_FILES
dist_config_DATA = biof.xml busyspheres.xml matrixview.xml spirographx.xml sundancer2.xml 
endif

if INSTALL_KDE_CONFIG_FILES
dist_kdessconfig_DATA = biof.desktop busyspheres.desktop matrixview.desktop spirographx.desktop sundancer2.desktop
endif

man_MANS = biof.1 busyspheres.1 matrixview.1 spirographx.1 sundancer2.1

EXTRA_DIST = $(man_MANS)

noinst_PROGRAMS = stringify
stringify_LDADD = @BZIP2@

matrixview_LDADD = @BZIP2@
matrixview_textures.c: stringify matrixview_textures/cfont matrixview_textures/cpics
	./stringify matrixview_textures/cfont matrixview_textures/cpics > matrixview_textures.c

if WITHIMAGEMAGICK
matrixview_LDADD += @IMAGEMAGICK@ @BZIP2@
endif

if WITHPTHREADS
matrixview_LDADD += @PTHREADS@
endif

clean: delete-textures
distclean: delete-textures

delete-textures:
	rm -f matrixview_textures.c

